⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 updastmb.pas

📁 拥有全套神州数码马易飞ERP源码,现上传部分源码
💻 PAS
字号:
unit updASTMB;

interface

uses sysUtils, dbtables, bde, updBASE;

type
  TUpdateASTMB = class(TBaseUpdateUnit)
  private
    FOtherVar: variant;
    function update_byASTI06(xQrySource: TQuery): Boolean;
    function update_byASTI07(xQrySource: TQuery): Boolean;
    function update_byASTI11(xQrySource: TQuery): Boolean;
    function update_byASTI10(xQrySource: TQuery): Boolean;
    function update_byASTI08(xQrySource: TQuery): Boolean;
    function update_byACPI02(xQrySource: TQuery): Boolean;
    function update_byASTI02(xQrySource: TQuery): Boolean;
  public
    function update(xQrySource: TQuery; xAction: string;
       var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
  end;

implementation

uses LibStrs,CONSTDEF;

function TUpdateASTMB.update(xQrySource: TQuery; xAction: string;
          var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
begin
  Result := True;
  FOtherVar:= xOtherVar;
  self.saveVar(xAction, xOtherVar, xUserData);
  try
    self.setDBname(xQrySource.DatabaseName);
    if (compareText(self.SourceTxnCode, 'TXNASTI06') = 0) then
      Result := update_byASTI06(xQrySource)
    else
    if (compareText(self.SourceTxnCode, 'TXNASTI07') = 0) then
      Result := update_byASTI07(xQrySource)
    else
    if (compareText(self.SourceTxnCode, 'TXNASTI11') = 0) then
      Result := update_byASTI11(xQrySource)
    else
    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, 'TXNACPI02') = 0) then
      Result := update_byACPI02(xQrySource)
    else
    if (compareText(self.SourceTxnCode, 'TXNASTI02') = 0) then
      Result := update_byASTI02(xQrySource)
    else
    begin
    end;
  finally
    self.Query1.close;
    self.Query2.close;
  end;
  xMsg := self.Msg;
end;

function TUpdateASTMB.update_byASTI06(xQrySource: TQuery): Boolean;
var
  T_MONEY,mRate,mMB020,mMB029,mMB014,mMB049,mMB021,mMB015,mMB022:Double;
  mMONEY,mBit1:String;
begin
  Result := True;
  self.Msg[0] := 'skip';
  self.Msg[1] := 'ASTMB';
  With xQrySource do
    self.Msg[2] := FieldByName('TC001').asString+' '+
                   FieldByName('TC002').asString;

  mMONEY:=FOtherVar[1];

  if self.Action = 'A' then self.Sign:=1 else self.Sign:=-1 ;
  try
    with self.Query1 do
    begin
      close;
      SQL.clear;
      RequestLive := False;
      SQL.add('select * from $$ASTMB ');
      SQL.add(' where MB001=:MB001 ');
      ParamByName('MB001').asString := xQrySource.FieldByName('TC004').asString;
      Open;
      first;
      if not eof then //

⌨️ 快捷键说明

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