public bool ProcessTransaction(ISnApi objSn, ISoApi objSo, IParamApi objParam) { var r = false; var nextcode = objSn.ValidateNextCode(); if (nextcode != objSn.RouteDetail.next_pass) { OnTransactionProceed(objSn.ReturnMsg); } _engageId = ProcessEngage(objSn, objSo, nextcode); if (_engageId > 0) { _transId = ProcessTransaction(objSn, _engageId, true); if (_transId > 0) { r = true; if (objParam != null) { _paramId = ProcessParam(objSn, objParam, _engageId); if (_paramId < 0) { r = false; } } } } if (!r) { RollBackTransaction(objSn, objSo, objParam, null); } return(r); }
public UcSo ConstructorTest(ISoApi objSoApi, IControlBuilder objObjControlBuilder) { UcSo target = new UcSo(objSoApi, objObjControlBuilder); return(target); // TODO: add assertions to method UcSoTest.ConstructorTest(ISoApi, IControlBuilder) }
private int ProcessEngage(ISnApi objSn, ISoApi objSo, string nextcode) { var result = objSn.EngageTransaction(new SnEngageVm() { number = objSn.UnitSn, workorder = objSo.ShopOrderName, current_operation = nextcode, category1 = "", category2 = "", routing = null, description = "" }); OnTransactionProceed(ReturnMsg); return(result); }
private void RollBackTransaction(ISnApi objSn, ISoApi objSo, IParamApi objParam, IFailureApi objFailure) { if (_paramId != 0) { RollBackParameter(objParam); } if (_failureId != 0) { RollBackFailure(objFailure); } if (_engageId != 0) { RollBackEngage(objSn, objSo); } if (_transId != 0) { RollBackTransaction(objSn); } }
private void RollBackEngage(ISnApi objSn, ISoApi objSo) { }
public UcSo(ISoApi objSoApi, IControlBuilder objObjControlBuilder) : base(objSoApi.GetFlexObj, objSoApi.GetWsObj, objSoApi.GetMsgObj, objSoApi.FormObject, objSoApi.Operation, objObjControlBuilder) { ObjSoApi = objSoApi; InitializeComponent(); HookCustomEvent(this, ObjSoApi); }