Esempio n. 1
0
        public ActionResult Promote(BusinessProcessState st)
        {
            var isReject = _BusinessProcessService.CheckPlanBeforeReject(st);

            if (isReject)
            {
            }
            _BusinessProcessService.PromotWorkflow(st);
            return(RedirectToAction("Index"));
        }
        public ActionResult PromoteList(List <ProcessTemplateViewModel> requests, int transporterId, string actionType)
        {
            if (requests != null)
            {
                var          type    = typeof(ActionType);
                MemberInfo[] memInfo = null;

                if (String.Compare(actionType, Enum.GetName(typeof(ActionType), ActionType.Finance), true) == 0)
                {
                    memInfo = type.GetMember(ActionType.Finance.ToString());
                }

                if (String.Compare(actionType, Enum.GetName(typeof(ActionType), ActionType.Approve), true) == 0)
                {
                    memInfo = type.GetMember(ActionType.Approve.ToString());
                }

                var attributes    = memInfo[0].GetCustomAttributes(typeof(DescriptionAttribute), false);
                var description   = ((DescriptionAttribute)attributes[0]).Description;
                var templateModel = _flowTemplateService.FindBy(o => o.Name == description).First();

                if (templateModel != null)
                {
                    requests.ForEach(o => o.StateID = templateModel.FinalStateID);
                }

                var processTemplates = ProcessTemplateViewModelBinder.BindProcessTemplateViewModel(requests);

                foreach (var oTemplate in processTemplates)
                {
                    _BusinessProcessService.PromotWorkflow(oTemplate);
                }
            }

            return(RedirectToAction("PaymentRequests", "TransporterPaymentRequest",
                                    new { Area = "Logistics", transporterId }));
        }
Esempio n. 3
0
        public ActionResult Edit(BusinessProcessState st)
        {
            _BusinessProcessService.PromotWorkflow(st);
            BusinessProcess item = _BusinessProcessService.FindById(st.ParentBusinessProcessID);

            /*if (ModelState.IsValid)
             * {
             *
             *  item.CurrentStateID = st.StateID;
             *  _BusinessProcessService.Update(item);
             *  _BusinessProcessStateService.Add(st);
             *  return View(item);
             * //  _BusinessProcessService.Update(item);
             * //   return RedirectToAction("Index");
             * }*/
            return(View(item));
        }
Esempio n. 4
0
 public ActionResult Promote(BusinessProcessState st, int transporterID)
 {
     _businessProcessService.PromotWorkflow(st);
     return(RedirectToAction("PaymentRequests", "ValidatedPaymentRequest", new { Area = "Finance", transporterID }));
 }
 public ActionResult Promote(BusinessProcessState st)
 {
     _BusinessProcessService.PromotWorkflow(st);
     return(RedirectToAction("Index"));
 }
 public ActionResult Promote(BusinessProcessState st, int transporterID)
 {
     _BusinessProcessService.PromotWorkflow(st);
     return(RedirectToAction("PaymentRequests", "TransporterPaymentRequest", new { Area = "Logistics", transporterID }));
 }