public IEnumerable<AgeRangeInfo> GetTotalsByFundAgeRange()
 {
     var model = new BundleModel();
     var ageRangeInfos = model.TotalsByFundAgeRange(0, Dt1.GetValueOrDefault(), Dt2.GetValueOrDefault(), string.Empty, CampusId);
     RangeTotal = model.RangeTotal;
     return ageRangeInfos;
 }
Beispiel #2
0
 public IEnumerable<RangeInfo> GetTotalsByFundRange()
 {
     var model = new BundleModel();
     var rangeInfos = model.TotalsByFundRange(FundId, Dt1.GetValueOrDefault(), Dt2.GetValueOrDefault(), string.IsNullOrWhiteSpace(Pledged) ? "false" : Pledged, CampusId);
     RangeTotal = model.RangeTotal;
     return rangeInfos;
 }
        public IEnumerable <AgeRangeInfo> GetTotalsByFundAgeRange()
        {
            var model         = new BundleModel();
            var ageRangeInfos = model.TotalsByFundAgeRange(0, Dt1.GetValueOrDefault(), Dt2.GetValueOrDefault(), string.Empty, CampusId);

            RangeTotal = model.RangeTotal;
            return(ageRangeInfos);
        }
        public IEnumerable <RangeInfo> GetTotalsByFundRange()
        {
            var model      = new BundleModel();
            var rangeInfos = model.TotalsByFundRange(FundId, Dt1.GetValueOrDefault(), Dt2.GetValueOrDefault(), string.IsNullOrWhiteSpace(Pledged) ? "false" : Pledged, CampusId);

            RangeTotal = model.RangeTotal;
            return(rangeInfos);
        }
        public IEnumerable <AgeRangeInfo> GetTotalsByFundAgeRange()
        {
            var model         = new BundleModel();
            var fundids       = APIContributionSearchModel.GetCustomFundSetList(DbUtil.Db, FundSet).JoinInts(",");
            var ageRangeInfos = model.TotalsByFundAgeRange(0, Dt1.GetValueOrDefault(), Dt2.GetValueOrDefault(), string.Empty, CampusId, fundids);

            RangeTotal = model.RangeTotal;
            return(ageRangeInfos);
        }
Beispiel #6
0
 protected void ListView1_DataBound(object sender, EventArgs e)
 {
     var ctl = new BundleModel();
     Total.Text = ctl.Total(peopleid,
         YearSearch.SelectedValue.ToInt(),
         StatusSearch.SelectedValue.ToInt(),
         TypeSearch.SelectedValue.ToInt(),
         FundSearch.SelectedValue.ToInt())
         .ToString("c");
 }
        public IEnumerable <AgeRangeInfo> GetTotalsByFundAgeRange()
        {
            var model             = new BundleModel();
            var customFundIds     = APIContributionSearchModel.GetCustomFundSetList(DbUtil.Db, FundSet);
            var authorizedFundIds = DbUtil.Db.ContributionFunds.ScopedByRoleMembership(DbUtil.Db).Select(f => f.FundId).ToList();

            string fundIds = string.Empty;

            if (customFundIds?.Count > 0)
            {
                fundIds = authorizedFundIds.Where(f => customFundIds.Contains(f)).JoinInts(",");
            }
            else
            {
                fundIds = authorizedFundIds.JoinInts(",");
            }

            var ageRangeInfos = model.TotalsByFundAgeRange(0, Dt1.GetValueOrDefault(), Dt2.GetValueOrDefault(), string.Empty, CampusId, fundIds);

            RangeTotal = model.RangeTotal;
            return(ageRangeInfos);
        }
Beispiel #8
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (!Page.IsValid)
         return;
     var dt1 = DateTime.Parse(FromDate.Text); // todo: tryparse here
     var dt2 = DateTime.Parse(ToDate.Text);
     Response.Clear();
     Response.Buffer = true;
     Response.ContentType = "text/plain";
     Response.AddHeader("Content-Disposition", "attachment;filename=GLTRN2000.txt");
     var ctl = new BundleModel();
     var q = ctl.GetGLExtract(dt1, dt2);
     var GLBundlePrefix = DbUtil.Db.Setting("GLBundlePrefix", "CM");
     foreach (var i in q)
     {
         Response.Write(
             "\"00000\",\"001{0}{1:00}{2}{3}\",\"000\",\"{4:MMddyy}\",\"{5}\",\"\",\"{6}0000{7}\",\"{8:00000000000}\",\"\"\r\n"
             .Fmt(i.Fund, i.Month, GLBundlePrefix, i.HeaderId.PadLeft(5, '0'), i.ContributionDate, i.FundName, i.FundDept, i.FundAcct, i.Amount * 100));
     }
     Response.Flush();
     Response.Close();
 }
Beispiel #9
0
 public IEnumerable<DepositInfo> GetDeposits()
 {
     var model = new BundleModel();
     return model.FetchDepositBundles(Dt1);
 }        
Beispiel #10
0
        public IEnumerable <DepositInfo> GetDeposits()
        {
            var model = new BundleModel();

            return(model.FetchDepositBundles(Dt1));
        }