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

📄 transmanageri.pas

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

interface

uses
  ComObj, ActiveX, Classes, SysUtils, Forms, Dialogs, TransManager_TLB, TransManagerD;

type
  TTxnManager = class(TAutoObject, ITxnManager)
  private
    aTxnObj : TbaseTxnDM;
  protected
    function DoIt(xValue: OleVariant): WordBool; safecall;
    function Get_ErrorCode: Integer; safecall;
    function Get_ErrorDescript: WideString; safecall;
    procedure CloseCom; safecall;
    function Get_ResultDesc: OleVariant; safecall;
    function Get_ReturnSeq: WideString; safecall;
    { Protected declarations }
  end;

  TbaseTxnDMClass = class of TbaseTxnDM;

implementation

uses ComServ;

function TTxnManager.DoIt(xValue: OleVariant): WordBool;
var
  mTxnCode:string;
  mResult:Boolean;
begin
  Result:=False;
  mTxnCode:=UpperCase(xValue[0]);

  try
    aTxnObj := (TbaseTxnDMClass(getClass(mTxnCode))).Create(nil);
  except
    showMessage('You must registerClass('+mTxnCode+') first !');
    exit;
  end;
  aTxnObj.Option := xValue;
  try
    aTxnObj.DoIt(mResult);
    if ((aTxnObj.Rollbacks = 0) and (aTxnObj.Total > 0)) then
//    if (aTxnObj.Rollbacks = 0) then  //虫ō礚戈

⌨️ 快捷键说明

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