updastmc.pas

来自「拥有全套神州数码马易飞ERP源码,现上传部分源码」· PAS 代码 · 共 70 行

PAS
70
字号
unit updASTMC;

interface

uses sysUtils, dbtables, bde, updBASE, Messages, Dialogs;

type
  TUpdateASTMC = class(TBaseUpdateUnit)
  private
    function update_byASTI10(xQrySource: TQuery): Boolean;
    function update_byASTI08(xQrySource: TQuery): Boolean;    
    function update_byASTI12(xQrySource: TQuery): Boolean;
  public
    function update(xQrySource: TQuery; xAction: string;
       var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
  end;

implementation

uses LibStrs,CONSTDEF;

function TUpdateASTMC.update(xQrySource: TQuery; xAction: string;
          var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
begin
  Result := True;
  self.saveVar(xAction, xOtherVar, xUserData);
  try
    self.setDBname(xQrySource.DatabaseName);
    if (compareText(self.SourceTxnCode, 'TXNASTI10') = 0) then
      Result := update_byASTI10(xQrySource)
    else
    if ((compareText(self.SourceTxnCode, 'TXNASTI09') = 0) OR (compareText(self.SourceTxnCode, 'TXNASTI08') = 0) ) then
      Result := update_byASTI08(xQrySource)
    else
    if (compareText(self.SourceTxnCode, 'TXNASTI12') = 0) then
      Result := update_byASTI12(xQrySource)
    else
    begin
    end;
  finally
    self.Query1.close;
    self.Query2.close;
  end;
  xMsg := self.Msg;
end;

function TUpdateASTMC.update_byASTI10(xQrySource: TQuery): Boolean;
var
  mMC004:Double;
  mMA005:String;
begin
  Result := True;
  self.Msg[0] := 'skip';
  self.Msg[1] := 'ASTMC';
  With xQrySource do
    self.Msg[2] := FieldByName('TC004').asString+' '+
                   FieldByName('TD003').asString+' '+
                   FieldByName('TD004').asString;

  if self.Action = 'A' then self.Sign:=1 else self.Sign:=-1 ;
  try
    with self.Query1 do
    begin
      close;       //881012 add
      SQL.clear;
      RequestLive := False;
      SQL.add('select * from $$ASTMA ');
      Open;
      first;
      if not eof then //

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?