public JsonResult OutComeList() { //get current username string loginName = User.Identity.Name; Session["LoginName"] = loginName; var currentUser = (User)Session["CurrentUser"]; var userProvince = -1; var userId = 0; if (currentUser != null) { userId = currentUser.User_Id; if (currentUser.Employees.Any()) { userProvince = currentUser.Employees.First().apl_Service_Office.apl_Local_Municipality.District.Province_Id; } if (currentUser.apl_Social_Worker.Any()) { userProvince = currentUser.apl_Social_Worker.First().apl_Service_Office.apl_Local_Municipality.District.Province_Id; } } int assID = Convert.ToInt32(Session["IntakeassId"]); var m = new PCMChildrensCourtModel(); return(Json(m.GetOutcometList(assID), JsonRequestBehavior.AllowGet)); }
public JsonResult GetOutcometList() { //get current username string loginName = User.Identity.Name; Session["LoginName"] = loginName; var currentUser = (User)Session["CurrentUser"]; var userProvince = -1; var userId = 0; if (currentUser != null) { userId = currentUser.User_Id; if (currentUser.Employees.Any()) { userProvince = currentUser.Employees.First().apl_Service_Office.apl_Local_Municipality.District.Province_Id; } if (currentUser.apl_Social_Worker.Any()) { userProvince = currentUser.apl_Social_Worker.First().apl_Service_Office.apl_Local_Municipality.District.Province_Id; } } int assID = Convert.ToInt32(Session["IntakeassId"]); PCMChildrensCourtModel cm = new PCMChildrensCourtModel(); PCMChildrensCourtViewModel vm = new PCMChildrensCourtViewModel(); vm.PlacementRecomendation_List = cm.GetPlacementRecomendation(); vm.Recommendation_Type_List = cm.GetRecommendationType(); vm.CourtOutcomeCaseStatusation_Type = cm.GetCourtOutcomeCaseStatusType(); ViewBag.Recommendation_Type_List = new SelectList(db.apl_Recommendation_Type.ToList(), "Recommendation_Type_Id", "Description"); ViewBag.PlacementRecomendation_List = new SelectList(db.apl_Placement_Type.ToList(), "Placement_Type_Id", "Description"); ViewBag.CourtOutcomeCaseStatusation_Type = new SelectList(db.apl_PCM_Court_Case_Status.ToList(), "Court_Case_Status_Id", "Description"); return(Json(cm.GetOutcometList(assID), JsonRequestBehavior.AllowGet)); }