?? updacpta.pas
字號:
unit updACPTA;
interface
uses sysUtils, dbtables, Bde, updBase, ComObj, CONSTDEF,LibStrs, Messages, Dialogs;
type
TUpdateACPTA = class(TBaseUpdateUnit)
private
FOtherVar: variant;
function update_byPURI11(xQrySource: TQuery): Boolean;
function update_byPURI09(xQrySource: TQuery): Boolean;
function update_byMOCI06(xQrySource: TQuery): Boolean;
function update_byACPI03(xQrySource: TQuery): Boolean;
function update_byMOCI07(xQrySource: TQuery): Boolean;
function update_byACPI02(xQrySource: TQuery): Boolean;
function update_byRMAI15(xQrySource: TQuery): Boolean;
function Add1(xValue: string): string;
function ZeroATfirst64(xValue: Int64; xLen: Integer): string;
public
function update(xQrySource: TQuery; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
end;
implementation
function TUpdateACPTA.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, 'TXNACPI02') = 0 then
Result := update_byACPI02(xQrySource)
else
if compareText(self.SourceTxnCode, 'TXNACPI03') = 0 then
Result := update_byACPI03(xQrySource)
else
if compareText(self.SourceTxnCode, 'TXNPURI11') = 0 then
Result := update_byPURI11(xQrySource)
else
if ((compareText(self.SourceTxnCode, 'TXNPURI09') = 0) OR (compareText(self.SourceTxnCode, 'TXNPURI13') = 0)) then
Result := update_byPURI09(xQrySource)
else
if ((compareText(self.SourceTxnCode, 'TXNMOCI06') = 0) OR (compareText(self.SourceTxnCode, 'TXNMOCI11') = 0)) then
Result := update_byMOCI06(xQrySource)
else
if compareText(self.SourceTxnCode, 'TXNMOCI07') = 0 then
Result := update_byMOCI07(xQrySource)
else
if compareText(self.SourceTxnCode, 'TXNRMAI15') = 0 then
Result := update_byRMAI15(xQrySource)
else
begin
end;
finally
self.Query1.close;
self.Query1.UnPrepare;
end;
xMsg := self.Msg;
end;
function TUpdateACPTA.update_byACPI03(xQrySource: TQuery): Boolean;
var
mTA026,mACPTASeqNo,mDBNAME : string ;
mexist : Boolean ;
mSign:Integer;
mBit,mMONEY,mResult,mDate : string;
vValidator:OleVariant;
mTA037,mRate,mTA030,mm:Double;
begin
Result := True;
self.Msg[0] := 'skip';
self.Msg[1] := 'ACPTA:ACPTB';
with xQrySOurce do
self.Msg[2] := fieldByName('TD001').asString+' '+FieldByName('TD002').asString+' '+
fieldByName('TD003').asString;
mDBNAME:=FOtherVar[1]; // dbname
mDate:=FOtherVar[2]; //
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -