Example #1
0
        public ActionResult Reject(int flowCaseId, string comments)
        {
            Approver      manager = new Approver(WFEntities, this.Username);
            ApproveResult result  = manager.Reject(flowCaseId, comments);

            manager.NotificationSender.Send();
            ViewBag.approveResult = result;
            ViewBag.InboxCount    = manager.CountInbox();
            return(PartialView("Result", manager.GetFlowAndCase(flowCaseId)));
        }
Example #2
0
        public ActionResult SendBack(int flowCaseId, string comments)
        {
            Approver      applicant = new Approver(WFEntities, this.Username);
            ApproveResult result    = applicant.Abort(flowCaseId, comments);

            applicant.NotificationSender.Send();
            ViewBag.approveResult = result;
            ViewBag.InboxCount    = applicant.CountInbox();
            return(PartialView("Result", applicant.GetFlowAndCase(flowCaseId)));
        }
Example #3
0
        public ActionResult Approve(int flowCaseId, string[] nextApprover)
        {
            Approver manager = new Approver(WFEntities, this.Username);

            if (nextApprover == null || nextApprover.Length == 0)
            {
                int          curGroupId = manager.GetCurrentStepGroupId(flowCaseId);
                NextStepData nsd        = manager.GetNextStepApprovers(flowCaseId, curGroupId);
                if (nsd.EmployeeList.Count > 0)
                {
                    ViewBag.flowCaseId = flowCaseId;
                    return(View("SelectNextApprover", "~/Views/Shared/_ModalLayout.cshtml", nsd.EmployeeList));
                }
            }
            ReturnApproveResult returnValue = manager.Approve(flowCaseId, nextApprover);

            manager.NotificationSender.Send();
            ViewBag.nextStepUsers = returnValue.NextApprovers;
            ViewBag.approveResult = returnValue.Result;
            ViewBag.InboxCount    = manager.CountInbox();
            return(PartialView("Result", manager.GetFlowAndCase(flowCaseId)));
        }