Esempio n. 1
0
        public ActionResult RequestAction(int id)
        {
            Request request = this.requestTasks.Get(id);

            if (request != null)
            {
                ViewBag.Request           = request;
                ViewBag.ScreeningEntities = ScreeningEntity.GetNames(request.GetCreatedDate());
                ConsolidateViewModel cvm = new ConsolidateViewModel(request, this.screeningTasks.GetScreeningResults(request.GetCreatedDate()));
                return(View(cvm));
            }
            else
            {
                return(new HttpNotFoundResult());
            }
        }
Esempio n. 2
0
        public ActionResult RequestAction(int id)
        {
            Request request = this.requestTasks.Get(id);

            if (request != null)
            {
                ViewBag.Request           = request;
                ViewBag.ScreeningEntities = ScreeningEntity.GetNames(request.GetCreatedDate());
                this.screeningTasks.CreateScreeningRequestPersonFinalDecisionsForRequest(request, User.Identity.Name);  // prepopulate results from recommendations
                FinalizeViewModel cvm = new FinalizeViewModel(request,
                                                              this.screeningTasks.GetScreeningResults(request.GetCreatedDate()),
                                                              this.screeningTasks.GetScreeningSupportStatuses());
                return(View(cvm));
            }
            else
            {
                return(new HttpNotFoundResult());
            }
        }
Esempio n. 3
0
        public RequestPersonViewModel(RequestPerson rp)
        {
            this.Id    = rp.Id;
            this.Notes = rp.Notes;
            if (rp.Request != null)
            {
                this.RequestId   = rp.Request.Id;
                this.RequestName = rp.Request.Headline;
            }

            this.EntityResults = new List <ScreeningResultViewModel>();
            string[] entities = ScreeningEntity.GetNames(rp.Request.GetCreatedDate());
            foreach (string entity in entities)
            {
                ScreeningRequestPersonEntity srpe = rp.GetScreeningRequestPersonEntity(entity);
                if (srpe != null)
                {
                    this.EntityResults.Add(new ScreeningResultViewModel()
                    {
                        Name       = srpe.ScreeningEntity.ToString(),
                        Result     = srpe.ScreeningResult.ToString(),
                        Reason     = srpe.Reason,
                        Commentary = srpe.Commentary,
                        Date       = srpe.MostRecentHistory.DateStatusReached
                    });
                }
                else
                {
                    this.EntityResults.Add(new ScreeningResultViewModel()
                    {
                        Name = entity
                    });
                }
            }

            ScreeningRequestPersonRecommendation srpr = rp.GetScreeningRequestPersonRecommendation();

            if (srpr != null)
            {
                this.RecommendationResult = new ScreeningResultViewModel()
                {
                    Name       = "Recommended",
                    Result     = srpr.ScreeningResult.ToString(),
                    Commentary = srpr.Commentary,
                    Date       = srpr.MostRecentHistory.DateStatusReached
                }
            }
            ;

            ScreeningRequestPersonFinalDecision srpfd = rp.GetScreeningRequestPersonFinalDecision();

            if (srpfd != null)
            {
                this.FinalResult = new ScreeningResultViewModel()
                {
                    Name       = "Final Decision",
                    Result     = srpfd.ScreeningResult.ToString(),
                    Commentary = srpfd.Commentary,
                    Date       = srpfd.MostRecentHistory.DateStatusReached
                };
                this.FinalSupportStatus = srpfd.ScreeningSupportStatus.ToString();
            }
        }
    }