📄 updcmsmv.pas
字号:
unit updCMSMV;
interface
uses sysUtils, dbtables, bde, updBASE;
type
TUpdateCMSMV = class(TBaseUpdateUnit)
private
function update_byPALI20(xQrySource: TQuery): Boolean;
function update_byPALI19(xQrySource: TQuery): Boolean;
public
function update(xQrySource: TQuery; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
end;
implementation
uses LibStrs,CONSTDEF;
function TUpdateCMSMV.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, 'TXNPALI20') = 0) then
Result := update_byPALI20(xQrySource)
else
if (compareText(self.SourceTxnCode, 'TXNPALI19') = 0) then
Result := update_byPALI19(xQrySource)
else
begin
end;
finally
self.Query1.close;
self.Query2.close;
end;
xMsg := self.Msg;
end;
function TUpdateCMSMV.update_byPALI20(xQrySource: TQuery): Boolean;
var
mMF003,mMV033,mMV043,mMV045,mMoney:Double;
begin
Result := True;
self.Msg[0] := 'skip';
self.Msg[1] := 'CMSMV';
With xQrySource do
self.Msg[2] := FieldByName('TD001').asString+' '+
FieldByName('TD002').asString+' '+
FieldByName('TD003').asString;
try
with self.Query1 do
begin
if ((xQrySource.FieldByName('TD003').asString='0001') or
(xQrySource.FieldByName('TD003').asString='0002') or
(xQrySource.FieldByName('TD003').asString='0003')) then
begin //update CMSMV
close;
SQL.clear;
RequestLive := False;
SQL.add('select * from $$CMSMV ');
SQL.add(' where MV001=:MV001 ');
ParamByName('MV001').asString := xQrySource.FieldByName('TD001').asString;
Open;
first;
if not eof then //
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -