?? updrmatc.pas
字號:
unit UpdRMATC;
interface
uses sysUtils, dbtables, db, bde, updBase, ComObj, CONSTDEF, LibStrs;
type
TUpdateRMATC = class(TBaseUpdateUnit)
private
FOtherVar: variant;
function update_byRMAI14(xQrySource: TQuery): Boolean;
function update_byRMAI13(xQrySource: TQuery): Boolean;
function update_byACRI02(xQrySource: TQuery): Boolean;
public
function update(xQrySource: TQuery; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
end;
implementation
function TUpdateRMATC.update(xQrySource: TQuery; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
begin
Result := True;
self.saveVar(xAction, xOtherVar, xUserData);
FOtherVar:= xOtherVar;
try
self.setDBname(xQrySource.DatabaseName);
if compareText(self.SourceTxnCode, 'TXNRMAI14') = 0 then
Result := update_byRMAI14(xQrySource)
else
if compareText(self.SourceTxnCode, 'TXNRMAI13') = 0 then
Result := update_byRMAI13(xQrySource)
else
if compareText(self.SourceTxnCode, 'TXNACRI02') = 0 then
Result := update_byACRI02(xQrySource)
else
begin
end;
finally
self.Query1.Close;
self.Query1.UnPrepare;
end;
xMsg := self.Msg;
end;
function TUpdateRMATC.update_byRMAI14(xQrySource: TQuery): Boolean;
var
mExist: Boolean;
mTC020,mTC021:String;
begin
Result := True;
self.Msg[0] := 'skip';
self.Msg[1] := 'RMATC';
with xqrySource do
begin
self.Msg[2] := Format('%s %s',
[FieldByName('TG010').asString,FieldByName('TG011').asString]);
end;
try
with self.Query1 do
begin
close;
SQL.clear;
RequestLive := False;
SQL.add('select * from $$RMATC ');
SQL.add('where TC001=:TC001 and TC002=:TC002');
ParamByName('TC001').asString := xqrySource.FieldByName('TG010').asString;
ParamByName('TC002').asString := xqrySource.FieldByName('TG011').asString;
open;
first;
mExist := not eof;
if mExist then //Τт
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -