?? updsfctc.pas
字號(hào):
unit updSFCTC;
interface
uses sysUtils, dbtables, bde, updBASE, ComObj, CONSTDEF;
type
TUpdateSFCTC = class(TBaseUpdateUnit)
private
FOtherVar: variant;
function update_bySFCI05(xQrySource: TQuery): Boolean;
function update_byQMSI10(xQrySource: TQuery): Boolean;
public
function update(xQrySource: TQuery; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
end;
implementation
uses LibStrs;
function TUpdateSFCTC.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, 'TXNSFCI05') = 0) then
Result := update_bySFCI05(xQrySource)
else
if (compareText(self.SourceTxnCode, 'TXNQMSI10') = 0) then
Result := update_byQMSI10(xQrySource)
else
begin
end;
finally
self.Query1.close;
self.Query2.close;
end;
xMsg := self.Msg;
end;
function TUpdateSFCTC.update_bySFCI05(xQrySource: TQuery): Boolean;
var
mTC026:String;
mTC014,mTC025:Double;
begin
Result := True;
self.Msg[0] := 'skip';
self.Msg[1] := 'SFCTC';
With xQrySource do
self.Msg[2] := FieldByName('TC028').asString+' '+
FieldByName('TC029').asString+' '+
FieldByName('TC030').asString;
if ((xQrySource.FieldByName('TB004').asString<>'2') OR ((xQrySource.FieldByName('TC028').asString='') or (xQrySource.FieldByName('TC028').isnull)) or
((xQrySource.FieldByName('TC029').asString='') or (xQrySource.FieldByName('TC029').isnull)) or
((xQrySource.FieldByName('TC030').asString='') or (xQrySource.FieldByName('TC030').isnull))) then Exit;
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 $$SFCTC ');
SQL.add(' where TC001=:TC001 AND TC002=:TC002 AND TC003=:TC003 ');
ParamByName('TC001').asString := xQrySource.FieldByName('TC028').asString;
ParamByName('TC002').asString := xQrySource.FieldByName('TC029').asString;
ParamByName('TC003').asString := xQrySource.FieldByName('TC030').asString;
Open;
first;
if not eof then //
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -