public ActionResult Index(int caseid) { if (!ViewBag.HasAccessToAdminModule) { WebHelper.CurrentSession.Content.ErrorMessage = "You are not eligible to do this action"; return(RedirectToAction(Constants.Actions.AccessDenied, Constants.Controllers.Home, new { Area = String.Empty })); } InitialAssessmentVM iniass = new InitialAssessmentVM(); iniass.CaseID = caseid; iniass.AssesmentIndicators = caseInitialAssessmentRepository.GetAllIndicators(); iniass.CaseInitialAssessment = caseInitialAssessmentRepository.GetCaseAssessment(caseid); iniass.CaseAssessmentReviewed = caseInitialAssessmentRepository.CaseAssessmentReviewed(caseid); iniass.CaseWorkerNote = new CaseWorkerNote(); iniass.CaseHouseholdIncome = caseHouseholdIncomeRepository.GetCurrentHouseholdIncome(caseid); if (iniass.CaseHouseholdIncome == null) { iniass.CaseHouseholdIncome = new CaseHouseholdIncome(); } iniass.CaseHouseholdIncome.IncomeRanges = incomeRangeRepository.GetAll().ToList(); var varCase = caseRepository.Find(caseid); ViewBag.DisplayID = varCase.DisplayID; ViewBag.CaseID = caseid; return(View(iniass)); }
public ActionResult Index(int CaseID) { CaseAssessmentSummaryVM caseAssessmentSummary = new CaseAssessmentSummaryVM(); caseAssessmentSummary.CaseID = CaseID; caseAssessmentSummary.AssesmentIndicators = caseInitialAssessmentRepository.GetAllIndicators(); //caseAssessmentSummary.CaseInitialAssessment = caseInitialAssessmentRepository.GetCaseAssessment(CaseID); caseAssessmentSummary.CaseInitialAssessment = new List <CaseInitialAssessmentVM>(); var varCase = caseRepository.Find(CaseID); ViewBag.DisplayID = varCase.DisplayID; ViewBag.CaseID = CaseID; ViewBag.ChartData = null; return(View(caseAssessmentSummary)); }
public ActionResult Index([DataSourceRequest(Prefix = "Grid")] DataSourceRequest dsRequest, Case searchCase, int caseID) { if (!ViewBag.HasAccessToCaseManagementModule) { WebHelper.CurrentSession.Content.ErrorMessage = "You are not eligible to do this action"; return(RedirectToAction(Constants.Actions.AccessDenied, Constants.Controllers.Home, new { Area = String.Empty })); } CaseGoalNewVM caseGoalNewVM = new CaseGoalNewVM(); caseGoalNewVM.CaseID = caseID; caseGoalNewVM.CaseWorkerNote = new CaseWorkerNote(); caseGoalNewVM.AssesmentIndicators = caseInitialAssessmentRepository.GetAllIndicators(); caseGoalNewVM.CaseInitialAssessment = caseInitialAssessmentRepository.GetCaseAssessment(caseID); caseGoalNewVM.CaseGoalDetailTemplate = caseGoalDetailTemplateRepository.GetByIndicatorType(); return(View(caseGoalNewVM)); }
public ActionResult Index([DataSourceRequest(Prefix = "Grid")] DataSourceRequest dsRequest, Case searchCase, int caseID) { var varCase = caseRepository.Find(caseID); bool hasAccess = workerroleactionpermissionnewRepository.HasPermission(caseID, CurrentLoggedInWorkerRoleIDs, CurrentLoggedInWorker.ID, varCase.ProgramID, varCase.RegionID, varCase.SubProgramID, varCase.JamatkhanaID, Constants.Areas.CaseManagement, Constants.Controllers.CaseMember, Constants.Actions.Index, true); if (!hasAccess) { WebHelper.CurrentSession.Content.ErrorMessage = "You are not eligible to do this action"; return(RedirectToAction(Constants.Actions.AccessDenied, Constants.Controllers.Home, new { Area = String.Empty })); } CaseSummaryVM caseSummary = _casesummaryrepository.GetCaseDetails(caseID); caseSummary.caseMember = new CaseMember(); caseSummary.caseMember.CaseID = caseID; caseSummary.CurrentHouseholdIncomeID = 0; caseSummary.CaseInitialHouseholdIncomeVM = caseHouseholdIncomeRepository.GetInitialIncomeForCaseSummary(caseID); caseSummary.CaseCurrentHouseholdIncomeVM = caseHouseholdIncomeRepository.GetCurrentIncomeForCaseSummary(caseID); if (caseSummary.CaseCurrentHouseholdIncomeVM == null && caseSummary.CaseInitialHouseholdIncomeVM != null) { caseSummary.CaseCurrentHouseholdIncomeVM = caseSummary.CaseInitialHouseholdIncomeVM; } if (caseSummary.CaseCurrentHouseholdIncomeVM != null) { caseSummary.CurrentHouseholdIncomeID = caseSummary.CaseCurrentHouseholdIncomeVM.ID; } caseSummary.AssesmentIndicators = caseInitialAssessmentRepository.GetAllIndicators(); caseSummary.CaseInitialAssessment = caseInitialAssessmentRepository.GetCaseAssessment(caseID); string status = caseStatusHistoryRepository.CaseStatusByCaseID(caseID); caseSummary.CaseStatus = status; caseSummary.caseGoalNewVM = new CaseGoalNewVM(); int TotalGoal = caseGoalNewRepository.CaseGoalNewCountByCaseID(caseID); caseSummary.caseGoalNewVM.TotalGoal = TotalGoal; int GoalCompleted = caseGoalNewRepository.CaseGoalNewCompleteByCaseID(caseID); caseSummary.caseGoalNewVM.GoalCompleted = GoalCompleted; return(View(caseSummary)); }