📄 updpurmb.pas
字号:
unit updPURMB;
interface
uses sysUtils, dbtables, Bde, updBase, LibStrs,ConstDEF;
type
TUpdatePURMB = class(TBaseUpdateUnit)
private
FOtherVar: variant;
function update_byPURI03(xQrySource: TQuery): Boolean;
function update_byPURI07(xQrySource: TQuery): Boolean;
function update_byPURI08(xQrySource: TQuery): Boolean;
function update_byPURI09(xQrySource: TQuery): Boolean;
public
function update(xQrySource: TQuery; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
end;
implementation
function TUpdatePURMB.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, 'TXNPURI03') = 0 then
Result := update_byPURI03(xQrySource)
else if compareText(self.SourceTxnCode, 'TXNPURI07') = 0 then
Result := update_byPURI07(xQrySource)
else if compareText(self.SourceTxnCode, 'TXNPURI08') = 0 then
Result := update_byPURI08(xQrySource)
else
if ((compareText(self.SourceTxnCode, 'TXNPURI09') = 0) OR (compareText(self.SourceTxnCode, 'TXNPURI13') = 0)) then
Result := update_byPURI09(xQrySource)
else
begin
end;
finally
self.Query1.close;
self.Query1.UnPrepare;
end;
xMsg := self.Msg;
end;
function TUpdatePURMB.update_byPURI09(xQrySource: TQuery): Boolean;
var
mExist : Boolean;
mPRICE,mQUANTY,mMC005 : DOUBLE;
mUpdateField,mMB010,mMB001,mMB002,mMB003,mMB004,mMB014 : String;
begin
Result := True;
self.Msg[0] := 'skip';
self.Msg[1] := 'PURMB';
with xQrySOurce do
self.Msg[2] := fieldByName('TG005').asString+' '+FieldByName('TH004').asString+' '+
fieldByName('TH008').asString+' '+FieldByName('TG007').asString;
mPRICE := FOtherVar[1]; //獶だ秖璸基
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -