Ejemplo n.º 1
0
        public bool ProcessTransactionFail(ISnApi objSn, IParamApi objParam, IFailureApi objFailure)
        {
            var r = false;

            _transId = ProcessTransaction(objSn, objSn.SnDetail.id, false);
            if (_transId > 0)
            {
                var nextcode = objSn.ValidateNextCode();
                if (nextcode != objSn.RouteDetail.next_pass)
                {
                    OnTransactionProceed(objSn.ReturnMsg);
                }
                var performId = ProcessEngageUpdate(objSn, nextcode);
                if (performId > 0)
                {
                    r = true;
                    if (objParam != null)
                    {
                        var pId = ProcessParam(objSn, objParam, performId);
                        if (pId < 0)
                        {
                            r = false;
                        }
                    }
                }
            }
            if (!r)
            {
                RollBackTransaction(objSn, null, objParam, objFailure);
            }
            return(r);
        }
Ejemplo n.º 2
0
        private int ProcessFailure(ISnApi objSn, IFailureApi objFailure, int performId)
        {
            //TODO : update failure
            //var paramValue = objFailure.GetParamItemValue(performId);
            //if (!paramValue.Any()) return 0;
            //var result = _objTrans.PerformParametric(paramValue, objSn.UnitSn);
            var result = 0;

            OnTransactionProceed(ReturnMsg);
            return(result);
        }
Ejemplo n.º 3
0
        private void RenderModule(IFailureApi objApi)
        {
            var objSn    = (ISnApi)_objCb.FindControlHasInterfaceInList <ISnApi>(_listOfObj);
            var objParam = (IParamApi)_objCb.FindControlHasInterfaceInList <IParamApi>(_listOfObjSnBase);
            var result   = _objTrans.ProcessTransactionFail(objSn, objParam, objApi);

            if (result)
            {
                CancelSn(true);
            }
        }
Ejemplo n.º 4
0
 private void RollBackFailure(IFailureApi objFailure)
 {
 }
Ejemplo n.º 5
0
 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);
     }
 }
Ejemplo n.º 6
0
 public UcFailure(IFailureApi objFailure, IControlBuilder objObjControlBuild) : base(objFailure.GetFlexObj, objFailure.GetWsObj, objFailure.GetMsgObj, objFailure.FormObject, objFailure.Operation, objObjControlBuild)
 {
     _objFailure = objFailure;
     InitializeComponent();
     HookCustomEvent(this, _objFailure);
 }