コード例 #1
0
        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));
        }
コード例 #2
0
ファイル: SelectLists.cs プロジェクト: rastographics/bvcms
        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);
        }
コード例 #3
0
        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));
        }