📄 updasttd.pas
字号:
unit updASTTD;
interface
uses sysUtils, dbtables, db, bde, updBase;
type
TUpdateASTTD = class(TBaseUpdateUnit)
private
FOtherVar: variant;
function update_byASTI12(xQrySource: TQuery): Boolean;
public
function update(xQrySource: TQuery; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
end;
implementation
function TUpdateASTTD.update(xQrySource: TQuery; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
begin
Result := True;
self.saveVar(xAction, xOtherVar, xUserData);
FOtherVar:= xOtherVar;
try
setDBName(xQrySource.databaseName);
if compareText(self.SourceTxnCode, 'TXNASTI12') = 0 then
Result := update_byASTI12(xQrySource)
else
begin
end;
finally
//VarArrayUnlock(self.Msg);
self.Query1.close;
self.Query1.UnPrepare;
end;
xMsg := self.Msg;
end;
function TUpdateASTTD.update_byASTI12(xQrySource: TQuery): Boolean;
var
mExist: Boolean;
mTD005:Double;
begin
Result := True;
self.Msg[0] := 'skip';
self.Msg[1] := 'ASTTD';
with xqrySource do
begin
self.Msg[2] := FieldByName('TF001').asString+' '+
FieldByName('TF002').asString+' '+
FieldByName('TF003').asString;
end;
try
with self.Query1 do
begin
close;
SQL.clear;
RequestLive := False;
SQL.add('select * from $$ASTTD');
SQL.add(' where TD001=:TD001 and TD002=:TD002 and TD010=:TD010 ');
SQL.add(' and TD003=:TD003 and TD004=:TD004 ');
ParamByName('TD001').asString := xqrySource.FieldByName('TF001').asString;
ParamByName('TD002').asString := xqrySource.FieldByName('TF002').asString;
ParamByName('TD010').asString := xqrySource.FieldByName('TF003').asString;
ParamByName('TD003').asString := xqrySource.FieldByName('TF004').asString;
ParamByName('TD004').asString := xqrySource.FieldByName('TF005').asString;
open;
first;
mExist := not eof;
if ((not mExist) and (self.Action = 'A')) then //ぃ
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -