Ejemplo n.º 1
0
        public ActionResult NeedAssessmentRead([DataSourceRequest] DataSourceRequest request)
        {
            var needAssessment          = _needAssessmentService.FindBy(g => g.NeedAApproved == false).OrderByDescending(m => m.NeedAID).ToList(); //featch unapproved need assessments
            var needAssesmentsViewModel = NeedAssessmentViewModelBinder.ReturnViewModel(needAssessment);

            return(Json(needAssesmentsViewModel.ToDataSourceResult(request)));
        }
Ejemplo n.º 2
0
        public ActionResult PlannedNeedAssessmentInfo_Read([DataSourceRequest] DataSourceRequest request, int id = 0)
        {
            var needAssessment          = _needAssessmentService.FindBy(m => m.PlanID == id).OrderByDescending(m => m.NeedAID).ToList();
            var needAssesmentsViewModel = NeedAssessmentViewModelBinder.ReturnViewModel(needAssessment);

            return(Json(needAssesmentsViewModel.ToDataSourceResult(request), JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 3
0
        public ActionResult PlannedNeedAssessmentInfo_Read([DataSourceRequest] DataSourceRequest request, int id = 0)
        {
            var regionID       = _userAccountService.GetUserInfo(HttpContext.User.Identity.Name).RegionID;
            var needAssessment = regionID == null?_needAssessmentService.FindBy(m => m.PlanID == id).OrderByDescending(m => m.NeedAID).ToList() :
                                     _needAssessmentService.FindBy(m => m.PlanID == id && m.Region == regionID).OrderByDescending(m => m.NeedAID).ToList();

            var needAssesmentsViewModel = NeedAssessmentViewModelBinder.ReturnViewModel(needAssessment);

            return(Json(needAssesmentsViewModel.ToDataSourceResult(request), JsonRequestBehavior.AllowGet));
        }