Example #1
0
        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);
        }
Example #2
0
        public UcSo ConstructorTest(ISoApi objSoApi, IControlBuilder objObjControlBuilder)
        {
            UcSo target = new UcSo(objSoApi, objObjControlBuilder);

            return(target);
            // TODO: add assertions to method UcSoTest.ConstructorTest(ISoApi, IControlBuilder)
        }
Example #3
0
        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);
        }
Example #4
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);
     }
 }
Example #5
0
 private void RollBackEngage(ISnApi objSn, ISoApi objSo)
 {
 }
Example #6
0
File: UcSo.cs Project: cpuriwat/8mp
 public UcSo(ISoApi objSoApi, IControlBuilder objObjControlBuilder) : base(objSoApi.GetFlexObj, objSoApi.GetWsObj, objSoApi.GetMsgObj, objSoApi.FormObject, objSoApi.Operation, objObjControlBuilder)
 {
     ObjSoApi = objSoApi;
     InitializeComponent();
     HookCustomEvent(this, ObjSoApi);
 }