⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 updpurtg.pas

📁 拥有全套神州数码马易飞ERP源码,现上传部分源码
💻 PAS
字号:
unit updPURTG;

interface

uses sysUtils, dbtables, bde, updBASE, ComObj, CONSTDEF, LibStrs;

type
  TUpdatePURTG = class(TBaseUpdateUnit)
  private
    FOtherVar: variant;
    function update_byPURI13(xQrySource: TQuery): Boolean;
    function update_byQMSI07(xQrySource: TQuery): Boolean;
  public
    function update(xQrySource: TQuery; xAction: string;
       var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
  end;

implementation

function TUpdatePURTG.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, 'TXNPURI13') = 0 then
      Result := update_byPURI13(xQrySource)
    else
    if compareText(self.SourceTxnCode, 'TXNQMSI07') = 0 then
      Result := update_byQMSI07(xQrySource)
    else
    begin
    end;
  finally
    self.Query1.close;
    self.Query2.close;
  end;
  xMsg := self.Msg;
end;

function TUpdatePURTG.update_byPURI13(xQrySource: TQuery): Boolean;
var
  mExist:Boolean;
  mDBNAME: String ;
  mTG031,mTG032,mTG017,mTG018,mTG028,mTG019,mTG020,mTG026,mTG041:Double;
  mMA024,mBit:String;
begin
  Result := True;
  self.Msg[0] := 'skip';
  self.Msg[1] := 'PURTG';
  With xQrySource do
  self.Msg[2] := FieldByName('TG001').asString+' '+
                 FieldByName('TG002').asString;

  mDBNAME:=FOtherVar[1]; //
  mMA024 :=FOtherVar[2];

  try
    with self.Query1 do
    begin
      close;
      SQL.clear;
      RequestLive := False;
      SQL.add('select MF004 from $$CMSMF WHERE MF001=:MF001');
      ParamByName('MF001').asString := xQrySource.FieldByName('TG007').AsString;
      Open;
      first;
      if not eof then
        mBit:=FieldByName('MF004').asString //刽

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -