Exemple #1
0
        private FamilyContributions GetFamilyContributions(DateTime frdt, DateTime todt, Person p)
        {
            var f = new FamilyContributions
            {
                status       = "ok",
                Contributors = (from ci in Contributors(Db, frdt, todt, 0, 0, p.FamilyId, funds: null, noaddressok: true, useMinAmt: false)
                                select new Contributor
                {
                    Name = ci.Name,
                    Type = ci.Joint ? "Joint" : "Individual",
                    Contributions = (from c in Contributions(Db, ci, frdt, todt, null)
                                     select new Contribution
                    {
                        Amount = c.ContributionAmount ?? 0,
                        Date = c.ContributionDate.ToString2("d"),
                        Description = c.Description,
                        CheckNo = c.CheckNo,
                        Fund = c.FundName,
                        Name = c.Name,
                    }).ToList()
                }).ToList()
            };

            return(f);
        }
Exemple #2
0
        private static string SerializeContributions(FamilyContributions f)
        {
            var sw = new StringWriter();
            var xs = new XmlSerializer(typeof(FamilyContributions));
            var ns = new XmlSerializerNamespaces();

            ns.Add("", "");
            xs.Serialize(sw, f, ns);
            return(sw.ToString());
        }
Exemple #3
0
 private static string SerializeContributions(FamilyContributions f)
 {
     var sw = new StringWriter();
     var xs = new XmlSerializer(typeof(FamilyContributions));
     var ns = new XmlSerializerNamespaces();
     ns.Add("", "");
     xs.Serialize(sw, f, ns);
     return sw.ToString();
 }
Exemple #4
0
 private FamilyContributions GetFamilyContributions(DateTime frdt, DateTime todt, Person p)
 {
     var f = new FamilyContributions
     {
         status = "ok",
         Contributors = (from ci in contributors(Db, frdt, todt, 0, 0, p.FamilyId, noaddressok: true, useMinAmt: false)
                         select new Contributor
                         {
                             Name = ci.Name,
                             Type = ci.Joint ? "Joint" : "Individual",
                             Contributions = (from c in contributions(Db, ci, frdt, todt)
                                              select new Contribution
                                              {
                                                  Amount = c.ContributionAmount,
                                                  Date = c.ContributionDate.ToShortDateString(),
                                                  Description = c.Description,
                                                  CheckNo = c.CheckNo,
                                                  Fund = c.Fund,
                                                  Name = c.Name,
                                              }).ToList()
                         }).ToList()
     };
     return f;
 }