// GET: MLFSIncome/CreateClawback public async Task <IActionResult> CreateClawback() { ViewBag.AdvisorId = await _advisorData.SelectList(); ViewBag.ReportingPeriodId = await _periodData.SelectList(); return(PartialView("_CreateClawback")); }
// GET: Debtor public async Task <IActionResult> Index(int?advisorId, string financialYear) { List <MLFSReportingPeriod> periods = await _periodData.GetPeriods(); SelectList yearList = new SelectList(periods.Select(x => x.FinancialYear).Distinct()); ViewBag.Year = yearList; ViewBag.AdvisorId = await _advisorData.SelectList(); if (advisorId == null) { BudgetReview review = new BudgetReview(); return(View(review)); } else { if (String.IsNullOrEmpty(financialYear)) { financialYear = yearList.FirstOrDefault().Value; } MLFSAdvisor advisor = await _advisorData.GetAdvisor((int)advisorId); List <MLFSBudget> budgets = await _budgetData.GetBudgets(periods.Where(x => x.FinancialYear == financialYear).ToList()); BudgetReview review = new BudgetReview(advisor, budgets, periods, financialYear); return(View(review)); } }
public async Task <IActionResult> Create() { ViewBag.ReportingPeriodId = await _periodData.SelectList(); ViewBag.AdvisorId = await _advisorData.SelectList(); return(View()); }
// GET: MLFSAdvisors/Edit/5 public async Task <IActionResult> Edit(int?id) { if (id == null) { return(NotFound()); } var mLFSAdvisor = await _advisorData.GetAdvisor((int)id); if (mLFSAdvisor == null) { return(NotFound()); } ViewBag.ReplacementAdvisorId = await _advisorData.SelectList(); return(View(mLFSAdvisor)); }