public ActionResult Index(int id) { //get current username string loginName = User.Identity.Name; Session["LoginName"] = loginName; //instanciate model repositry PCMCaseModel caseModel = new PCMCaseModel(); //instanciate viewmodel PCMPersonViewModel personVM = new PCMPersonViewModel(); //get person id by assessment id personVM.IntakeAssPar = id; int ClientRefid = caseModel.GetClientRefIdssId(id); //Get Module Reference number .................... string ClientRef = caseModel.GetClientRef(ClientRefid); Session["ClientRef"] = ClientRef; Session["IntakeassId"] = id; ViewBag.ModuleRef = ClientRef; return(PartialView(personVM)); }
// GET: PCMPresentence_Sentence #region Child Details public ActionResult IndexPresentence(int id) { //get current username string loginName = User.Identity.Name; Session["LoginName"] = loginName; //instanciate model repositry PCMPresentenceModel caseModel = new PCMPresentenceModel(); //instanciate viewmodel PCMPersonViewModel personVM = new PCMPersonViewModel(); PCMCaseModel caseModelC = new PCMCaseModel(); //get person id by assessment id int personId = caseModel.GetPCMPersonIdByintAssId(id); //get person record personVM = caseModel.GetPCMPerson(personId); int ClientRefid = caseModelC.GetClientRefIdssId(id); //Get Module Reference number .................... string ClientRef = caseModelC.GetClientRef(ClientRefid); Session["ClientRef"] = ClientRef; ViewBag.ModuleRef = ClientRef; return(PartialView(personVM)); }
// GET: HBS public ActionResult Home(int id) { //get current username string loginName = User.Identity.Name; Session["LoginName"] = loginName; //instanciate model repositry //instanciate model repositry PCMCaseModel caseModel = new PCMCaseModel(); //instanciate viewmodel PCMPersonViewModel personVM = new PCMPersonViewModel(); //get person id by assessment id personVM.IntakeAssPar = id; bool IntakeAssessmentIdExisit = db.PCM_HB_Supervision.Any(x => x.Intake_Assessment_Id == id); int ClientRefid = caseModel.GetClientRefIdssId(id); //Get Module Reference number .................... string ClientRef = caseModel.GetClientRef(ClientRefid); Session["ClientRef"] = ClientRef; Session["IntakeassId"] = id; ViewBag.ModuleRef = ClientRef; int?Placementid = preModel.GetPlacementId(id); ViewBag.MessagePlacement = Placementid; Session["Placement"] = Placementid; if (IntakeAssessmentIdExisit) { Session["Idc1"] = id; Session["IntakeassId"] = id; return(View(personVM)); } else { Session["Idc1"] = id; Session["IntakeassId"] = id; //Response.Write("does not Exist"); return(View(personVM)); } }
public ActionResult IndexVO() { //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"]); //instanciate model repositry PCMCaseModel caseModel = new PCMCaseModel(); //instanciate viewmodel PCMPersonViewModel personVM = new PCMPersonViewModel(); //get person id by assessment id personVM.IntakeAssPar = assID; int ClientRefid = caseModel.GetClientRefIdssId(assID); //Get Module Reference number .................... string ClientRef = caseModel.GetClientRef(ClientRefid); Session["ClientRef"] = ClientRef; Session["IntakeassId"] = assID; ViewBag.ModuleRef = ClientRef; var Compliance_Type = m.GetComplianceType(); vm.Compliance_Type = m.GetComplianceType(); ViewBag.Compliance_List = new SelectList(db.apl_PCM_Compliance.ToList(), "Compliance_Id", "Description"); return(PartialView(vm)); }
public ActionResult Home(int id) { //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; } } //instanciate model repositry PCMCaseModel caseModel = new PCMCaseModel(); //instanciate viewmodel PCMPersonViewModel personVM = new PCMPersonViewModel(); //get person id by assessment id personVM.IntakeAssPar = id; int ClientRefid = caseModel.GetClientRefIdssId(id); //Get Module Reference number .................... string ClientRef = caseModel.GetClientRef(ClientRefid); Session["ClientRef"] = ClientRef; ViewBag.ModuleRef = ClientRef; Session["IntakeassId"] = id; return(View(personVM)); }
public ActionResult Home(int id) { //get current username string loginName = User.Identity.Name; Session["LoginName"] = loginName; //instanciate model repositry PCMCaseModel caseModel = new PCMCaseModel(); //instanciate viewmodel PCMPersonViewModel personVM = new PCMPersonViewModel(); //get person id by assessment id personVM.IntakeAssPar = id; int ClientRefid = caseModel.GetClientRefIdssId(id); //Get Module Reference number .................... string ClientRef = caseModel.GetClientRef(ClientRefid); Session["ClientRef"] = ClientRef; Session["IntakeassId"] = id; ViewBag.ModuleRef = ClientRef; //int assID = Convert.ToInt32(Session["IntakeassId"]); int?Placementid = preModel.GetPlacementId(id); ViewBag.MessagePlacement = Placementid; Session["Placement"] = Placementid; return(View(personVM)); }
public ActionResult Index(int id) { //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; } } var HBSConditionType = m.GetCondition(); vm.Condition_List = m.GetCondition(); var HBSsupersorType = m.GetHBSsupervisorType(); vm.HBSsupervisor_Type = m.GetHBSsupervisorType(); bool IntakeAssessmentIdExisit = db.PCM_HB_Supervision.Any(x => x.Intake_Assessment_Id == id); int assID = Convert.ToInt32(Session["IntakeassId"]); //instanciate model repositry PCMCaseModel caseModel = new PCMCaseModel(); //instanciate viewmodel PCMPersonViewModel personVM = new PCMPersonViewModel(); //get person id by assessment id personVM.IntakeAssPar = assID; int ClientRefid = caseModel.GetClientRefIdssId(assID); //Get Module Reference number .................... string ClientRef = caseModel.GetClientRef(ClientRefid); Session["ClientRef"] = ClientRef; Session["IntakeassId"] = assID; ViewBag.ModuleRef = ClientRef; if (IntakeAssessmentIdExisit) { Session["Idc1"] = id; Session["IntakeassId"] = id; return(PartialView(vm)); } else { Session["Idc1"] = id; Session["IntakeassId"] = id; //Response.Write("does not Exist"); return(PartialView(vm)); } }