示例#1
0
        public ActionResult AO_CHECKING(Int32?Id)
        {
            ViewBag.Id = Id;
            if (Id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Request request = unitOfWork.RequestRepository.Get((Int32)Id);


            var requestForm = new Models.RequestFormViewModel
            {
                Id          = request.Id,
                CreatedBy   = request.CreatedBy,
                CreatedDate = (DateTime)request.CreatedDate
                ,
                RequestDescription = request.RequestDescription,
                eMail = request.NewAffiliation.eMail
            };

            ViewBag.returnAction = "ReturnToMaker";
            ViewBag.submitAction = "SubmitForPreScreen";
            ViewBag.actionName   = RequestConfigHelper.GetStatusConfig(request.Status).view;
            ViewBag.status       = RequestConfigHelper.GetStatusConfig(request.Status).Name;
            ViewBag.Title        = RequestConfigHelper.GetRequestTypeDisplayName(request.RequestType);

            //ViewBag.brnachList = request.NewAffiliation.Business.Branches.ToList();
            if (request == null)
            {
                return(HttpNotFound());
            }
            return(View(requestForm));
        }
示例#2
0
        // GET: Requests/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var urlRef = HttpContext.Request.UrlReferrer;

            if (urlRef.Segments.Count() > 3)
            {
                ViewBag.urlRef = urlRef.Segments[1] + urlRef.Segments[2].Replace("/", "");
            }


            Request request = unitOfWork.RequestRepository.Get((Int32)id, x => x.NewAffiliation);

            var requestForm = new Models.RequestFormViewModel {
                Id                   = request.Id,
                CreatedBy            = request.CreatedBy, CreatedDate = (DateTime)request.CreatedDate
                , RequestDescription = request.RequestDescription, eMail = request.NewAffiliation.eMail
            };

            ViewBag.Title  = RequestConfigHelper.GetRequestTypeDisplayName(request.RequestType);
            ViewBag.status = RequestConfigHelper.GetStatusConfig(request.Status).Name;
            if (request == null)
            {
                return(HttpNotFound());
            }
            return(View(requestForm));
        }
示例#3
0
        // GET: ApprovalSetup
        public ActionResult Index()
        {
            var matrix = new List <Models.ApprovalSetupViewModel>();


            db.ApprovalSetup.ToList().ForEach(x => {
                matrix.Add(new  Models.ApprovalSetupViewModel
                {
                    Id = x.Id, Rank = x.Rank, WithException = x.WithException,
                    WithRequirements = x.WithRequirements, RequestType = RequestConfigHelper.GetRequestTypeDisplayName(x.RequestType),
                    ApprovalCount    = x.ApprovalCount
                });
            });
            return(View(matrix));
        }
示例#4
0
        // GET: RequestUIFlow
        public ActionResult DRAFT(Int32?Id)
        {
            if (Id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Request request = unitOfWork.RequestRepository.Get(((Int32)Id), x => x.Branches);

            ViewBag.view   = "LoadRequestToWorkflow";
            ViewBag.Title  = RequestConfigHelper.GetRequestTypeDisplayName(request.RequestType);
            ViewBag.status = RequestConfigHelper.GetStatusConfig(request.Status).Name;
            if (request == null)
            {
                return(HttpNotFound());
            }
            return(View(request));
        }
示例#5
0
        // GET: RequestUIFlow
        public ActionResult DRAFT(Int32?Id)
        {
            if (Id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            // Request request = unitOfWork.RequestRepository.Get((int)Id, x => x.NewAffiliation, x => x.NewAffiliation.Branches);

            // Request request = unitOfWork.RequestRepository.Get((Int32)Id, x => x.NewAffiliation, x => x.NewAffiliation.Business.Branches);
            Request request = null;

            var requestForm = new Models.RequestFormViewModel
            {
                Id          = request.Id,
                CreatedBy   = request.CreatedBy,
                CreatedDate = (DateTime)request.CreatedDate
                ,
                //LegalName = request.NewAffiliation.Business.LegalName,
                // Ownership =
                RequestDescription = request.RequestDescription,
                eMail = request.NewAffiliation.eMail
            };

            ViewBag.view   = "LoadRequestToWorkflow";
            ViewBag.Title  = RequestConfigHelper.GetRequestTypeDisplayName(request.RequestType);
            ViewBag.status = RequestConfigHelper.GetStatusConfig(request.Status).Name;
            //  ViewBag.brnachList = request.NewAffiliation.Business.Branches.ToList();


            if (request == null)
            {
                return(HttpNotFound());
            }
            ViewBag.msg = "";
            var seg = Request.UrlReferrer.Segments.Where(x => !x.Equals("/")).ToList();

            if (Request.UrlReferrer.AbsolutePath.Contains("Create") || Request.UrlReferrer.AbsolutePath.Contains("Edit"))
            {
                ViewBag.msg = "Record Saved.";
            }


            return(View(requestForm));
        }
示例#6
0
        // GET: Requests
        public ActionResult Index()
        {
            List<Models.RequestViewModel> list = new List<Models.RequestViewModel>();
            int requestType = RequestConfigHelper.GetRequestType("NEW_AFFILIATION").Value;
            unitOfWork.RequestRepository.Find(x => x.RequestType.Equals(requestType), x => x.NewAffiliation).ToList().ForEach(x => list.Add(new Models.RequestViewModel
            {
                Id = x.Id,
                RequestDescription = x.RequestDescription,
                CreatedBy = x.CreatedBy,
                CreatedDate = x.CreatedDate,
                //Status = x.Status==1 || x.Status == 11 || x.Status == 12 || x.Status == 25 ?  RequestConfigHelper.GetStatusDisplayName(x.Status): "FOR " + RequestConfigHelper.GetStatusDisplayName(x.Status),
                Status = RequestConfigHelper.GetStatusDisplayName(x.Status),
                View = RequestConfigHelper.GetStatusConfig(x.Status).view,
                RequestType = RequestConfigHelper.GetRequestTypeDisplayName(x.RequestType)


            }));


            return View(list);
        }
示例#7
0
        // GET: Requests/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var urlRef = HttpContext.Request.UrlReferrer;

            if (urlRef.Segments.Count() > 3)
            {
                ViewBag.urlRef = urlRef.Segments[1] + urlRef.Segments[2].Replace("/", "");
            }


            Request request = unitOfWork.RequestRepository.Get((Int32)id);

            ViewBag.Title = RequestConfigHelper.GetRequestTypeDisplayName(request.RequestType);
            if (request == null)
            {
                return(HttpNotFound());
            }
            return(View(request));
        }
示例#8
0
        // GET: Requests
        public ActionResult Index()
        {
            List <Models.RequestViewModel> list = new List <Models.RequestViewModel>();

            unitOfWork.RequestRepository.GetAll().ToList().ForEach(x => list.Add(new Models.RequestViewModel {
                Id = x.Id, RequestDescription = x.RequestDescription, CreatedBy = x.CreatedBy, CreatedDate = x.CreatedDate,
                //Status = x.Status==1 || x.Status == 11 || x.Status == 12 || x.Status == 25 ?  RequestConfigHelper.GetStatusDisplayName(x.Status): "FOR " + RequestConfigHelper.GetStatusDisplayName(x.Status),
                Status = RequestConfigHelper.GetStatusDisplayName(x.Status),
                View   = RequestConfigHelper.GetStatusConfig(x.Status).view, RequestType = RequestConfigHelper.GetRequestTypeDisplayName(x.RequestType)
            }));


            return(View(list));
        }