public ActionResult DonorTotalSummaryOptions() { var m = new DonorTotalSummaryOptionsModel { StartDate = DateTime.Today, NumberOfYears = 5, MinimumMedianTotal = 100, Campus = new CodeInfo("Campus0"), Fund = new CodeInfo("Fund"), }; var customfunds = ContributionStatements.CustomFundSetSelectList(); if (customfunds != null) { m.FundSet = new CodeInfo(null, customfunds); } return(View(m)); }
public IEnumerable <SelectListItem> CustomFundsList() { var clist = ContributionStatements.CustomFundSetSelectList(CurrentDatabase); if (clist.IsNull()) { return(null); } var q = from s in clist select new SelectListItem { Value = $"{s.Text}", Text = s.Text, Selected = s.Text == (Selected.FundSet ?? "(not specified)") }; var listItems = q.ToList(); return(listItems); }
public ActionResult DonorTotalSummaryOptions() { var model = new DonorTotalSummaryOptionsModel { StartDate = DateTime.Today, NumberOfYears = 5, MinimumMedianTotal = 100, Campus = CreateCodeInfoForField("Campus0"), Fund = CreateCodeInfoForField("Fund") }; var customFundsList = ContributionStatements.CustomFundSetSelectList(CurrentDatabase); if (customFundsList != null) { model.FundSet = new CodeInfo(null, customFundsList); } return(View(model)); }