📄 transmanageri.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 + -