updpaltb.pas

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

PAS
67
字号
unit updPALTB;

interface

uses sysUtils, dbtables, bde, updBASE;

type
  TUpdatePALTB = class(TBaseUpdateUnit)
  private
    function update_byPALI12(xQrySource: TQuery): Boolean;
    function update_byPALI15(xQrySource: TQuery): Boolean;
  public
    function update(xQrySource: TQuery; xAction: string;
       var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
  end;

implementation

uses LibStrs,CONSTDEF;

function TUpdatePALTB.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, 'TXNPALI12') = 0) then
      Result := update_byPALI12(xQrySource)
    else
    if (compareText(self.SourceTxnCode, 'TXNPALI15') = 0) then
      Result := update_byPALI15(xQrySource)
    else
    begin
    end;
  finally
    self.Query1.close;
    self.Query2.close;
  end;
  xMsg := self.Msg;
end;

function TUpdatePALTB.update_byPALI12(xQrySource: TQuery): Boolean;
var
  mMV004,mMV027,mME004:STRING;
begin
  Result := True;
  self.Msg[0] := 'skip';
  self.Msg[1] := 'PALTB';
  With xQrySource do
    self.Msg[2] := FieldByName('TF001').asString+' '+
                   FieldByName('TF002').asString;

  if self.Action = 'B' then EXIT;
  try
    with self.Query1 do
    begin
      close;
      SQL.clear;
      RequestLive := False;
      SQL.add('select * from $$PALTB ');
      SQL.add(' where TB001=:TB001 AND TB002=:TB002 ');
      ParamByName('TB001').asString := xQrySource.FieldByName('TF001').asString;
      ParamByName('TB002').asString := xQrySource.FieldByName('TF002').asString;
      Open;
      first;
      if eof then //ぃ

⌨️ 快捷键说明

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