public void Load(List <NormalContribution> contributions, List <UnitPledgeSummary> pledges, List <GiftsInKind> giftsinkind, List <NonTaxContribution> nontaxitems)
        {
            var empty = contributions.Count == 0;

            loaded  = 1;
            count   = contributions.Count.ToString();
            comment = empty ? "No items found" : "";
            total   = contributions.Sum(c => c.ContributionAmount ?? 0).ToMoney();
            summary = new List <AnnualSummary>(new[] {
                new AnnualSummary(contributions),
                new AnnualSummary(nontaxitems),
                new AnnualSummary(pledges),
                new AnnualSummary(giftsinkind)
            });
            details = new AnnualGivingDetails(new GivingDetails(contributions), new GivingDetails(pledges), new GivingDetails(giftsinkind), new GivingDetails(nontaxitems));
        }
Exemple #2
0
        public void Load(int peopleId, List <NormalContribution> contributions, List <UnitPledgeSummary> pledges, List <NonTaxContribution> nontaxitems)
        {
            statement = $"/Person2/ContributionStatement/{peopleId}/{title}-01-01/{title}-12-31";
            var empty = contributions.Count == 0;

            loaded  = 1;
            count   = contributions.Count.ToString();
            comment = empty ? "No items found" : "";
            total   = contributions.Sum(c => c.ContributionAmount ?? 0).ToMoney();
            summary = new List <AnnualSummary>(new[] {
                new AnnualSummary(contributions),
                new AnnualSummary(nontaxitems),
                new AnnualSummary(pledges),
            });
            details = new AnnualGivingDetails(new GivingDetails(contributions), new GivingDetails(pledges), new GivingDetails(nontaxitems));
        }