public ActionResult EditReferrals(int Id, int CaseheaderId) { viewDHSReferral viewDHSReferral; if (Id != 0) { viewDHSReferral = CMSService.GetDHSReferrals(Id); } else { viewDHSReferral = new viewDHSReferral(); viewDHSReferral.DateCreated = DateTime.Now; } viewDHSReferral.caselookup = getcaselookup(username, ViewBag.UserContractId); viewDHSReferral.viewCaseHeader = new AGE.CMS.Data.Models.Intake.viewCaseHeader(); viewDHSReferral.viewCaseHeader = CMSService.GetCaseHeaderById(CaseheaderId); viewDHSReferral.CaseheaderId = viewDHSReferral.viewCaseHeader.Id; if (viewDHSReferral.caselookup.listofcontracts != null && viewDHSReferral.caselookup.listofcontracts.Any() && viewDHSReferral.caselookup.listofcontracts.Count == 1) { viewDHSReferral.ContractId = viewDHSReferral.caselookup.listofcontracts.FirstOrDefault().Id; viewDHSReferral.ContractName = (from contract in viewDHSReferral.caselookup.listofcontracts where contract.Id == viewDHSReferral.ContractId select contract.ContractName).FirstOrDefault(); } return(View(viewDHSReferral)); }
public ActionResult ViewNoticeOfInvestigation(int AssessmentPrepId) { AssessmentPreparationModel asp = CMSService.GetAssessmentForm(AssessmentPrepId); asp.viewIntake = new viewIntake(); asp.viewIntake = CMSService.GetIntake(Convert.ToInt32(asp.IntakeId)); asp.viewIntake.viewCaseHeader = CMSService.GetCaseHeaderById((int)asp.viewIntake.CaseheaderId); //if (userrole = IsDDD || userrole == IsDRS) //{ // asp.StatusDescription = CaseStatus.Verified.ToString(); // //} asp.StatusDescription = CaseStatus.Opened.ToString(); CMSService.UpdateNoticeofInvestigationStatus((int)asp.NoticeOfInvestigationId, asp.StatusDescription, username); return(View(asp)); }
public ActionResult ViewReferrals(int Id) { viewDHSReferral viewDHSReferral; if (Id != 0) { viewDHSReferral = CMSService.GetDHSReferrals(Id); viewDHSReferral.caselookup = getcaselookup(username, ViewBag.UserContractId); viewDHSReferral.viewCaseHeader = new AGE.CMS.Data.Models.Intake.viewCaseHeader(); viewDHSReferral.viewCaseHeader = CMSService.GetCaseHeaderById((int)viewDHSReferral.CaseheaderId); viewDHSReferral.CaseheaderId = viewDHSReferral.viewCaseHeader.Id; } else { viewDHSReferral = new viewDHSReferral(); viewDHSReferral.DateCreated = DateTime.Now; } var contractid = 0; if (viewDHSReferral != null) { contractid = viewDHSReferral.ContractId; } if (viewDHSReferral.caselookup.listofcontracts != null && viewDHSReferral.caselookup.listofcontracts.Any() && viewDHSReferral.caselookup.listofcontracts.Count == 1) { viewDHSReferral.ContractId = viewDHSReferral.caselookup.listofcontracts.FirstOrDefault().Id; viewDHSReferral.ContractName = (from contract in viewDHSReferral.caselookup.listofcontracts where contract.Id == viewDHSReferral.ContractId select contract.ContractName).FirstOrDefault(); } viewDHSReferral.caselookup = getcaselookup(username, ViewBag.UserContractId); viewDHSReferral.StatusDescription = CaseStatus.Opened.ToString(); CMSService.UpdateDHSReferralStatus(Id, viewDHSReferral.StatusDescription, username); viewDHSReferral.ContractAgencyName = CMSService.GetContract(contractid).DisplayContractName; return(View(viewDHSReferral)); }
public ActionResult ViewClientAssessement(int Id, int IntakeId, int ReportOfSubstantiationId) { ClientAssessmentModel viewClientAssessment; viewClientAssessment = CMSService.GetCA(Id); //viewClientAssessment.mode = "summary"; viewClientAssessment.caselookup = getcaselookup(username, ViewBag.UserContractId); viewClientAssessment.viewIntake = new viewIntake(); viewClientAssessment.viewIntake = CMSService.GetIntake(IntakeId); viewClientAssessment.viewIntake.viewCaseHeader = CMSService.GetCaseHeaderById((int)viewClientAssessment.viewIntake.CaseheaderId); viewClientAssessment.CaseheaderId = viewClientAssessment.viewIntake.viewCaseHeader.Id; CMSService.UpdateReportofSubstantiationStatusNew(ReportOfSubstantiationId, CaseStatus.Opened.ToString(), username); return(View(viewClientAssessment)); }