Exemple #1
0
        public MobileAttendee populate(RollsheetModel.AttendInfo p)
        {
            id = p.PeopleId;
            name = p.Name;
            memberType = p.CurrMemberType;
            orgMember = p.CurrMember;
            member = p.Member;
            attended = p.Attended;

            Person person = DbUtil.Db.People.SingleOrDefault(e => e.PeopleId == id);

            if (person.Picture != null)
            {
                var image = ImageData.DbUtil.Db.Images.SingleOrDefault(i => i.Id == person.Picture.SmallId);

                if (image != null)
                {
                    picture = Convert.ToBase64String(image.Bits);
                    pictureX = person.Picture.X ?? 0;
                    pictureY = person.Picture.Y ?? 0;
                }
            }

            return this;
        }
Exemple #2
0
        public MobileAttendee populate(RollsheetModel.AttendInfo p)
        {
            id = p.PeopleId;
            name = p.Name;
            member = p.Member;
            attended = p.Attended;

            return this;
        }
Exemple #3
0
        public override void ExecuteResult(ControllerContext context)
        {
            var Response = context.HttpContext.Response;

            var list1 = ReportList().ToList();

            if (!list1.Any())
            {
                Response.Write("no data found");
                return;
            }
            Response.ContentType = "application/pdf";
            Response.AddHeader("content-disposition", "filename=OrgLeaders.pdf");

            doc = new Document(PageSize.LETTER, 36, 36, 36, 36);
            var w = PdfWriter.GetInstance(doc, Response.OutputStream);

            w.PageEvent = pageEvents;
            doc.Open();
            dc = w.DirectContent;

            foreach (var o in list1)
            {
                var t = StartPageSet(o);

                var color = BaseColor.BLACK;
                foreach (var m in RollsheetModel.FetchOrgMembers(o.OrgId, null)
                         .Where(om => om.MemberTypeId != MemberTypeCode.Member))
                {
                    if (color == BaseColor.WHITE)
                    {
                        color = new GrayColor(240);
                    }
                    else
                    {
                        color = BaseColor.WHITE;
                    }
                    AddRow(t,
                           m.PeopleId,
                           m.Name,
                           m.Email,
                           m.HomePhone,
                           m.CellPhone,
                           m.WorkPhone,
                           m.MemberType,
                           color);
                }
                doc.Add(t);
            }
            pageEvents.EndPageSet();
            doc.Close();
        }
Exemple #4
0
        public override void ExecuteResult(ControllerContext context)
        {
            var Response = context.HttpContext.Response;

            var list1 = ReportList().ToList();

            if (!list1.Any())
            {
                Response.Write("no data found");
                return;
            }
            Response.ContentType = "application/pdf";
            Response.AddHeader("content-disposition", "filename=foo.pdf");

            doc = new Document(PageSize.LETTER, 36, 36, 36, 36);
            var w = PdfWriter.GetInstance(doc, Response.OutputStream);

            w.PageEvent = pageEvents;
            doc.Open();
            dc = w.DirectContent;

            var haddata = false;

            foreach (var o in list1)
            {
                var t = StartPageSet(o);

                var color = BaseColor.BLACK;
                foreach (var m in RollsheetModel.FetchOrgMembers(o.OrgId, null))
                {
                    if (color == BaseColor.WHITE)
                    {
                        color = new GrayColor(240);
                    }
                    else
                    {
                        color = BaseColor.WHITE;
                    }
                    AddRow(t, m, color);
                    haddata = true;
                }
                doc.Add(t);
            }
            if (!haddata)
            {
                doc.Add(new Phrase("\nno data"));
            }
            pageEvents.EndPageSet();
            doc.Close();
        }
Exemple #5
0
        private void AddRow(PdfPTable t, RollsheetModel.PersonMemberInfo p, BaseColor color)
        {
            t.DefaultCell.BackgroundColor = color;

            var c = new Phrase();
            c.Add(new Chunk(p.Name, boldfont));
            c.Add(new Chunk($"  ({p.PeopleId})\n", smallfont));
            var sb = new StringBuilder();
            AddLine(sb, p.Address);
            AddLine(sb, p.Address2);
            AddLine(sb, p.CityStateZip);
            c.Add(new Chunk(sb.ToString(), font));
            t.AddCell(c);

            sb = new StringBuilder();
            AddPhone(sb, p.HomePhone, "h ");
            AddPhone(sb, p.CellPhone, "c ");
            AddPhone(sb, p.WorkPhone, "w ");
            AddLine(sb, p.Email);
            t.AddCell(new Phrase(sb.ToString(), font));

            t.AddCell(new Phrase(p.MemberType));
        }
Exemple #6
0
        public override void ExecuteResult(ControllerContext context)
        {
            var Response = context.HttpContext.Response;

            if (MeetingId.HasValue)
            {
                meeting = DbUtil.Db.Meetings.Single(mt => mt.MeetingId == MeetingId);
                Debug.Assert(meeting.MeetingDate != null, "meeting.MeetingDate != null");
                NewMeetingInfo = new NewMeetingInfo {
                    MeetingDate = meeting.MeetingDate.Value
                };
            }

            var list1 = NewMeetingInfo.ByGroup ? ReportList2().ToList() : ReportList().ToList();

            if (!list1.Any())
            {
                Response.Write("no data found");
                return;
            }
            Response.ContentType = "application/pdf";
            Response.AddHeader("content-disposition", "filename=foo.pdf");

            doc = new Document(PageSize.LETTER.Rotate(), 36, 36, 64, 64);
            var w = PdfWriter.GetInstance(doc, Response.OutputStream);

            w.PageEvent = pageEvents;
            doc.Open();
            dc = w.DirectContent;

            box           = new PdfPCell();
            box.Border    = Rectangle.NO_BORDER;
            box.CellEvent = new CellEvent();

            OrgInfo lasto = null;

            foreach (var o in list1)
            {
                lasto = o;
                var table = new PdfPTable(1);
                table.DefaultCell.Border  = Rectangle.NO_BORDER;
                table.DefaultCell.Padding = 0;
                table.WidthPercentage     = 100;

                if (meeting != null)
                {
                    var q = from at in meeting.Attends
                            where at.AttendanceFlag || AttendCommitmentCode.committed.Contains(at.Commitment ?? 0)
                            orderby at.Person.LastName, at.Person.FamilyId, at.Person.Name2
                        select new
                    {
                        at.MemberType.Code,
                        Name2 = NewMeetingInfo.UseAltNames && at.Person.AltName.HasValue() ? at.Person.AltName : at.Person.Name2,
                        at.PeopleId,
                        at.Person.DOB
                    };
                    if (q.Any())
                    {
                        StartPageSet(o);
                    }
                    foreach (var a in q)
                    {
                        table.AddCell(AddRow(a.Code, a.Name2, a.PeopleId, a.DOB, "", font));
                    }
                }
                else if (OrgSearchModel != null)
                {
                    var q = from om in DbUtil.Db.OrganizationMembers
                            where om.OrganizationId == o.OrgId
                            join m in DbUtil.Db.OrgPeople(o.OrgId, o.Groups) on om.PeopleId equals m.PeopleId
                            where om.EnrollmentDate <= Util.Now
                            orderby om.Person.LastName, om.Person.FamilyId, om.Person.Name2
                    let p = om.Person
                            let ch = NewMeetingInfo.UseAltNames && p.AltName != null && p.AltName.Length > 0
                                     select new
                    {
                        p.PeopleId,
                        Name2     = ch ? p.AltName : p.Name2,
                        BirthDate = Person.FormatBirthday(
                            p.BirthYr,
                            p.BirthMonth,
                            p.BirthDay, p.PeopleId),
                        MemberTypeCode = om.MemberType.Code,
                        ch,
                        highlight =
                            om.OrgMemMemTags.Any(mm => mm.MemberTag.Name == NewMeetingInfo.HighlightGroup)
                                        ? NewMeetingInfo.HighlightGroup
                                        : ""
                    };
                    if (q.Any())
                    {
                        StartPageSet(o);
                    }
                    foreach (var m in q)
                    {
                        table.AddCell(AddRow(m.MemberTypeCode, m.Name2, m.PeopleId, m.BirthDate, m.highlight, m.ch ? china ?? font : font));
                    }
                }
                else if (Filter?.GroupSelect == GroupSelectCode.Member)
                {
                    var q = from om in DbUtil.Db.OrganizationMembers
                            where om.OrganizationId == Filter.Id
                            join m in DbUtil.Db.OrgFilterPeople(QueryId, null)
                            on om.PeopleId equals m.PeopleId
                            where om.EnrollmentDate <= Util.Now
                            where NewMeetingInfo.ByGroup == false || m.Groups.Contains((char)10 + o.Groups + (char)10)
                            orderby om.Person.LastName, om.Person.FamilyId, om.Person.Name2
                    let p = om.Person
                            let ch = NewMeetingInfo.UseAltNames && p.AltName != null && p.AltName.Length > 0
                                     select new
                    {
                        p.PeopleId,
                        Name2     = ch ? p.AltName : p.Name2,
                        BirthDate = Person.FormatBirthday(
                            p.BirthYr,
                            p.BirthMonth,
                            p.BirthDay,
                            p.PeopleId),
                        MemberTypeCode = om.MemberType.Code,
                        ch,
                        highlight =
                            om.OrgMemMemTags.Any(mm => mm.MemberTag.Name == NewMeetingInfo.HighlightGroup)
                                        ? NewMeetingInfo.HighlightGroup
                                        : ""
                    };
                    if (q.Any())
                    {
                        StartPageSet(o);
                    }
                    foreach (var m in q)
                    {
                        table.AddCell(AddRow(m.MemberTypeCode, m.Name2, m.PeopleId, m.BirthDate, m.highlight, m.ch ? china ?? font : font));
                    }
                }
                else
                {
                    var q = from m in DbUtil.Db.OrgFilterPeople(QueryId, null)
                            orderby m.Name2
                            let p                                              = DbUtil.Db.People.Single(pp => pp.PeopleId == m.PeopleId)
                                                      let om                   = p.OrganizationMembers.SingleOrDefault(mm => mm.OrganizationId == Filter.Id)
                                                                        let ch = NewMeetingInfo.UseAltNames && p.AltName != null && p.AltName.Length > 0
                                                                                 select new
                    {
                        p.PeopleId,
                        Name2     = ch ? p.AltName : p.Name2,
                        BirthDate = Person.FormatBirthday(
                            p.BirthYr,
                            p.BirthMonth,
                            p.BirthDay,
                            p.PeopleId),
                        MemberTypeCode = om == null ? "Guest" : om.MemberType.Code,
                        ch,
                        highlight = om.OrgMemMemTags.Any(mm => mm.MemberTag.Name == NewMeetingInfo.HighlightGroup) ? NewMeetingInfo.HighlightGroup : ""
                    };
                    if (q.Any())
                    {
                        StartPageSet(o);
                    }
                    foreach (var m in q)
                    {
                        table.AddCell(AddRow(m.MemberTypeCode, m.Name2, m.PeopleId, m.BirthDate, m.highlight, m.ch ? china ?? font : font));
                    }
                }
                if ((OrgSearchModel != null && NewMeetingInfo.ByGroup == false) ||
                    (Filter != null &&
                     Filter.GroupSelect == GroupSelectCode.Member &&
                     meeting == null &&
                     !Filter.SgFilter.HasValue() &&
                     !Filter.NameFilter.HasValue() &&
                     !Filter.FilterIndividuals == true &&
                     !Filter.FilterTag == true &&
                     NewMeetingInfo.ByGroup == false))
                {
                    foreach (var m in RollsheetModel.FetchVisitors(o.OrgId, NewMeetingInfo.MeetingDate, true, NewMeetingInfo.UseAltNames))
                    {
                        if (table.Rows.Count == 0)
                        {
                            StartPageSet(o);
                        }
                        table.AddCell(AddRow(m.VisitorType, m.Name2, m.PeopleId, m.BirthDate, "", boldfont));
                    }
                }
                if (!pageSetStarted)
                {
                    continue;
                }

                var col      = 0;
                var gutter   = 20f;
                var colwidth = (doc.Right - doc.Left - gutter) / 2;
                var ct       = new ColumnText(w.DirectContent);
                ct.AddElement(table);

                var status = 0;

                while (ColumnText.HasMoreText(status))
                {
                    if (col == 0)
                    {
                        ct.SetSimpleColumn(doc.Left, doc.Bottom, doc.Left + colwidth, doc.Top);
                    }
                    else
                    {
                        ct.SetSimpleColumn(doc.Right - colwidth, doc.Bottom, doc.Right, doc.Top);
                    }
                    status = ct.Go();
                    ++col;
                    if (col > 1)
                    {
                        col = 0;
                        doc.NewPage();
                    }
                }
            }
            if (!hasRows)
            {
                if (!pageSetStarted)
                {
                    StartPageSet(lasto);
                }
                doc.Add(new Paragraph("no members as of this meeting date and time to show on rollsheet"));
            }
            doc.Close();
        }
Exemple #7
0
        public override void ExecuteResult(ControllerContext context)
        {
            var Response = context.HttpContext.Response;

            Response.ContentType = "application/pdf";
            Response.AddHeader("content-disposition", "attachment;filename=foo.pdf");

            doc = new Document(PageSize.LETTER, 36, 36, 64, 64);
            var w = PdfWriter.GetInstance(doc, Response.OutputStream);

            w.PageEvent = pageEvents;
            doc.Open();

            dc = w.DirectContent;

            if (qid != null)
            {
                var o = ReportList().First();
                StartPageSet(o);
                var q  = DbUtil.Db.PeopleQuery(qid.Value);
                var q2 = from p in q
                         let rr = p.GetRecReg()
                                  join m in RollsheetModel.FetchOrgMembers(o.OrgId, null) on p.PeopleId equals m.PeopleId into j
                                  from m in j.DefaultIfEmpty()
                                  orderby p.Name2
                                  select new
                {
                    p.Name,
                    MembertypeCode = (m == null ? "V" : m.MemberTypeCode),
                    p.PeopleId,
                    rr.MedicalDescription
                };
                foreach (var i in q2)
                {
                    AddRow(i.MembertypeCode, i.Name, i.MedicalDescription, i.PeopleId, font);
                }
                if (t.Rows.Count > 1)
                {
                    doc.Add(t);
                }
                else
                {
                    doc.Add(new Phrase("no data"));
                }
            }
            else
            {
                foreach (var o in ReportList())
                {
                    var q = from m in RollsheetModel.FetchOrgMembers(o.OrgId, null)
                            orderby m.Name2
                            select new
                    {
                        m.Name,
                        m.MemberType,
                        m.PeopleId,
                        m.MedicalDescription
                    };
                    if (!q.Any())
                    {
                        continue;
                    }
                    StartPageSet(o);
                    foreach (var i in q)
                    {
                        AddRow(i.MemberType, i.Name, i.MedicalDescription, i.PeopleId, font);
                    }

                    if (t.Rows.Count > 1)
                    {
                        doc.Add(t);
                    }
                    else
                    {
                        doc.Add(new Phrase("no data"));
                    }
                }
            }
            if (!pagesetstarted)
            {
                w.PageEvent = null;
                doc.Add(new Phrase("no data"));
            }
            pageEvents.EndPageSet();
            doc.Close();
        }
        public override void ExecuteResult(ControllerContext context)
        {
            var Response = context.HttpContext.Response;

            Response.ContentType = "application/pdf";
            Response.AddHeader("content-disposition", "filename=RosterList.pdf");

            doc = new Document(PageSize.LETTER, 36, 36, 36, 36);
            var w = PdfWriter.GetInstance(doc, Response.OutputStream);

            w.PageEvent = pageEvents;
            doc.Open();
            dc = w.DirectContent;

            if (qid != null)
            {
                var color = BaseColor.BLACK;
                var o     = ReportList().First();
                var t     = StartPageSet(o);
                var q     = DbUtil.Db.PeopleQuery(qid.Value);
                var q2    = from p in q
                            let rr = p.RecRegs.FirstOrDefault()
                                     join m in RollsheetModel.FetchOrgMembers(o.OrgId, null) on p.PeopleId equals m.PeopleId into j
                                     from m in j.DefaultIfEmpty()
                                     orderby p.Name2
                                     select new MemberInfo
                {
                    ActiveOther   = rr.ActiveInAnotherChurch ?? false,
                    ThisChurch    = rr.Member ?? false,
                    Address       = p.PrimaryAddress,
                    Address2      = p.PrimaryAddress2,
                    CityStateZip  = p.CityStateZip5,
                    CellPhone     = p.CellPhone,
                    HomePhone     = p.HomePhone,
                    MemberStatus  = p.MemberStatus.Description,
                    MemberType    = m.MemberType,
                    FamMemberThis = p.Family.People.Any(f => f.PositionInFamilyId == 10 && f.MemberStatusId == MemberStatusCode.Member),
                    Name          = p.Name,
                    Medical       = rr.MedicalDescription,
                    PeopleId      = p.PeopleId,
                    Parents       = DbUtil.Db.ParentNamesAndCells(p.PeopleId),
                    Age           = p.Age
                };
                foreach (var m in q2)
                {
                    if (color.Equals(BaseColor.WHITE))
                    {
                        color = new GrayColor(240);
                    }
                    else
                    {
                        color = BaseColor.WHITE;
                    }

                    AddRow(t, m, color);
                }
                if (t.Rows.Count > 1)
                {
                    doc.Add(t);
                }
                else
                {
                    doc.Add(new Phrase("no data"));
                }
            }
            else
            {
                foreach (var o in ReportList())
                {
                    var t = StartPageSet(o);

                    var color = BaseColor.BLACK;

                    var q = from om in DbUtil.Db.OrganizationMembers
                            where om.OrganizationId == o.OrgId
                            where (om.Pending ?? false) == false
                            where om.MemberTypeId != MemberTypeCode.InActive
                            let rr = om.Person.RecRegs.FirstOrDefault()
                                     orderby om.Person.Name2
                                     select new MemberInfo
                    {
                        ActiveOther   = rr.ActiveInAnotherChurch ?? false,
                        ThisChurch    = rr.Member ?? false,
                        Address       = om.Person.PrimaryAddress,
                        Address2      = om.Person.PrimaryAddress2,
                        CityStateZip  = om.Person.CityStateZip5,
                        CellPhone     = om.Person.CellPhone,
                        HomePhone     = om.Person.HomePhone,
                        MemberStatus  = om.Person.MemberStatus.Description,
                        MemberType    = om.MemberType.Description,
                        FamMemberThis = om.Person.Family.People.Any(f => f.PositionInFamilyId == 10 && f.MemberStatusId == MemberStatusCode.Member),
                        Name          = om.Person.Name,
                        Medical       = rr.MedicalDescription,
                        PeopleId      = om.PeopleId,
                        Parents       = DbUtil.Db.ParentNamesAndCells(om.PeopleId),
                        Age           = om.Person.Age
                    };

                    foreach (var m in q)
                    {
                        if (color == BaseColor.WHITE)
                        {
                            color = new GrayColor(240);
                        }
                        else
                        {
                            color = BaseColor.WHITE;
                        }

                        AddRow(t, m, color);
                    }
                    doc.Add(t);
                }
            }

            pageEvents.EndPageSet();
            doc.Close();
        }
Exemple #9
0
        public override void ExecuteResult(ControllerContext context)
        {
            var Response = context.HttpContext.Response;

            CmsData.Meeting meeting = null;
            if (meetingid.HasValue)
            {
                meeting = DbUtil.Db.Meetings.Single(mt => mt.MeetingId == meetingid);
                dt      = meeting.MeetingDate;
                orgid   = meeting.OrganizationId;
            }

            var list1 = bygroup == true?ReportList2().ToList() : ReportList().ToList();

            if (!list1.Any())
            {
                Response.Write("no data found");
                return;
            }
            if (!dt.HasValue)
            {
                Response.Write("bad date");
                return;
            }
            Response.ContentType = "application/pdf";
            Response.AddHeader("content-disposition", "filename=foo.pdf");

            doc = new Document(PageSize.LETTER.Rotate(), 36, 36, 64, 64);
            var w = PdfWriter.GetInstance(doc, Response.OutputStream);

            w.PageEvent = pageEvents;
            doc.Open();
            dc = w.DirectContent;

            box           = new PdfPCell();
            box.Border    = PdfPCell.NO_BORDER;
            box.CellEvent = new CellEvent();
            PdfPTable table = null;

            OrgInfo lasto = null;

            foreach (var o in list1)
            {
                lasto = o;
                table = new PdfPTable(1);
                table.DefaultCell.Border  = PdfPCell.NO_BORDER;
                table.DefaultCell.Padding = 0;
                table.WidthPercentage     = 100;
                if (meeting != null)
                {
                    var Groups = o.Groups;
                    if (Groups[0] == 0)
                    {
                        var q = from at in meeting.Attends
                                where at.AttendanceFlag == true || at.Commitment == AttendCommitmentCode.Attending || at.Commitment == AttendCommitmentCode.Substitute
                                orderby at.Person.LastName, at.Person.FamilyId, at.Person.Name2
                            select new
                        {
                            at.MemberType.Code,
                            Name2 = (altnames == true && at.Person.AltName != null && at.Person.AltName.Length > 0) ? at.Person.AltName : at.Person.Name2,
                            at.PeopleId,
                            at.Person.DOB,
                        };
                        if (q.Any())
                        {
                            StartPageSet(o);
                        }
                        foreach (var a in q)
                        {
                            table.AddCell(AddRow(a.Code, a.Name2, a.PeopleId, a.DOB, "", font));
                        }
                    }
                    else
                    {
                        var q = from at in meeting.Attends
                                let om =
                            at.Organization.OrganizationMembers.SingleOrDefault(mm => mm.PeopleId == at.PeopleId)
                            let gc = om.OrgMemMemTags.Count(mt => Groups.Contains(mt.MemberTagId))
                                     where gc == Groups.Length || Groups[0] <= 0
                                     where gc > 0
                                     where !Groups.Contains(-1) || (Groups.Contains(-1) && om.OrgMemMemTags.Count() == 0)
                                     where
                                     at.AttendanceFlag == true || at.Commitment == AttendCommitmentCode.Attending ||
                                     at.Commitment == AttendCommitmentCode.Substitute
                                     orderby at.Person.LastName, at.Person.FamilyId, at.Person.Name2
                            select new
                        {
                            at.MemberType.Code,
                            Name2 = (altnames == true && at.Person.AltName != null && at.Person.AltName.Length > 0) ? at.Person.AltName : at.Person.Name2,
                            at.PeopleId,
                            at.Person.DOB,
                        };
                        if (q.Any())
                        {
                            StartPageSet(o);
                        }
                        foreach (var a in q)
                        {
                            table.AddCell(AddRow(a.Code, a.Name2, a.PeopleId, a.DOB, "", font));
                        }
                    }
                }
                else
                {
                    var Groups = o.Groups;
                    if (Groups == null)
                    {
                        Groups = new int[] { 0 }
                    }
                    ;
                    var q = from om in DbUtil.Db.OrganizationMembers
                            where om.OrganizationId == o.OrgId
                            let gc = om.OrgMemMemTags.Count(mt => Groups.Contains(mt.MemberTagId))
                                     where gc == Groups.Length || Groups[0] <= 0
                                     where !Groups.Contains(-1) || (Groups.Contains(-1) && om.OrgMemMemTags.Count() == 0)
                                     where (om.Pending ?? false) == false
                                     where om.MemberTypeId != MemberTypeCode.InActive
                                     where om.MemberTypeId != MemberTypeCode.Prospect
                                     where om.EnrollmentDate <= Util.Now
                                     orderby om.Person.LastName, om.Person.FamilyId, om.Person.Name2
                    let p = om.Person
                            let ch = altnames == true && p.AltName != null && p.AltName.Length > 0
                                     select new
                    {
                        PeopleId  = p.PeopleId,
                        Name2     = ch ? p.AltName : p.Name2,
                        BirthDate = Util.FormatBirthday(
                            p.BirthYear,
                            p.BirthMonth,
                            p.BirthDay),
                        MemberTypeCode = om.MemberType.Code,
                        ch,
                        highlight = om.OrgMemMemTags.Any(mm => mm.MemberTag.Name == highlightsg) ? highlightsg : ""
                    };
                    if (q.Any())
                    {
                        StartPageSet(o);
                    }
                    foreach (var m in q)
                    {
                        table.AddCell(AddRow(m.MemberTypeCode, m.Name2, m.PeopleId, m.BirthDate, m.highlight, m.ch ? china : font));
                    }
                }

                if (bygroup == false && groups[0] == 0 && meeting == null)
                {
                    foreach (var m in RollsheetModel.FetchVisitors(o.OrgId, dt.Value, NoCurrentMembers: true, UseAltNames: altnames == true))
                    {
                        if (table.Rows.Count == 0)
                        {
                            StartPageSet(o);
                        }
                        table.AddCell(AddRow(m.VisitorType, m.Name2, m.PeopleId, m.BirthDate, "", boldfont));
                    }
                }
                if (!pageSetStarted)
                {
                    continue;
                }

                var   col      = 0;
                float gutter   = 20f;
                float colwidth = (doc.Right - doc.Left - gutter) / 2;
                var   ct       = new ColumnText(w.DirectContent);
                ct.AddElement(table);

                int status = 0;

                while (ColumnText.HasMoreText(status))
                {
                    if (col == 0)
                    {
                        ct.SetSimpleColumn(doc.Left, doc.Bottom, doc.Left + colwidth, doc.Top);
                    }
                    else
                    {
                        ct.SetSimpleColumn(doc.Right - colwidth, doc.Bottom, doc.Right, doc.Top);
                    }
                    status = ct.Go();
                    ++col;
                    if (col > 1)
                    {
                        col = 0;
                        doc.NewPage();
                    }
                }

//                foreach (var li in list)
//                {
//                    y = ct.YLine;
//                    ct.AddElement(li);
//                    status = ct.Go(true);
//                    if (ColumnText.HasMoreText(status))
//                    {
//                        ++col;
//                        if (col > 1)
//                        {
//                            col = 0;
//                            doc.NewPage();
//                        }
//                        ct.SetSimpleColumn(cols[col]);
//                        y = doc.Top;
//                    }
//                    ct.YLine = y;
//                    ct.SetText(null);
//                    ct.AddElement(li);
//                    status = ct.Go();
//                }
            }
            if (!hasRows)
            {
                if (!pageSetStarted)
                {
                    StartPageSet(lasto);
                }
                doc.Add(new Paragraph("no members as of this meeting date and time to show on rollsheet"));
            }
            doc.Close();
        }