Exemple #1
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));
        }
Exemple #2
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);
        }