コード例 #1
0
    public override void GenerateReport()
    {
        ReportGeneration.CreatePDF(SettingsManager.Read("ExportPath") + "/WeeklyReport" + assignedDate.ToString().Replace('/', '_').Replace('\\', '_').Replace(':', '_') + ".pdf", true);
        ReportGeneration.OpenDoc();

        ReportGeneration.AddTitle(gManager.language.WeeklyGuideSchedule);
        ReportGeneration.AddEmptyLines(2);
        {
            PdfPTable table = new PdfPTable(5)
            {
                WidthPercentage = 100,
            };
            table.SetWidths(new float[] { .7f, .7f, 3, .9f, .9f });
            table.AddCell(ReportGeneration.AddCell(gManager.language.Date, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont));
            table.AddCell(ReportGeneration.AddCell(gManager.language.Time, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont));
            table.AddCell(ReportGeneration.AddCell(gManager.language.Details, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont));
            table.AddCell(ReportGeneration.AddCell(gManager.language.TourGuies, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont));
            table.AddCell(ReportGeneration.AddCell(gManager.language.OfficerOnDuty, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont));
            foreach (DayOfWeek day in days)
            {
                NewEntryList list = day.GetEvents();
                Event        e;
                for (int i = 0; i < list.Count(); i++)
                {
                    if (i == 0)
                    {
                        table.AddCell(ReportGeneration.AddCell(day.header.text, 1, list.Count(), Element.ALIGN_CENTER, ReportGeneration.boldFont));
                    }
                    if (list.TryGet(i, out e))
                    {
                        table.AddCell(ReportGeneration.AddCell(e.startTime + " - " + e.endTime, 1, Element.ALIGN_CENTER, ReportGeneration.normalFont));
                        table.AddCell(ReportGeneration.AddCell(e.ToString(), 1, Element.ALIGN_CENTER, ReportGeneration.normalFont));
                    }
                    if (i == 0)
                    {
                        table.AddCell(ReportGeneration.AddCell(day.Guides.text, 1, list.Count(), Element.ALIGN_CENTER, ReportGeneration.normalFont));
                        table.AddCell(ReportGeneration.AddCell(day.AF.text, 1, list.Count(), Element.ALIGN_CENTER, ReportGeneration.normalFont));
                    }
                }
                if (list == null || list.Count() == 0)
                {
                    table.AddCell(ReportGeneration.AddCell(day.header.text, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont));
                    table.AddCell(ReportGeneration.AddCell("", 1, Element.ALIGN_CENTER, ReportGeneration.normalFont));
                    table.AddCell(ReportGeneration.AddCell("", 1, Element.ALIGN_CENTER, ReportGeneration.normalFont));
                    table.AddCell(ReportGeneration.AddCell(day.Guides.text, 1, Element.ALIGN_CENTER, ReportGeneration.normalFont));
                    table.AddCell(ReportGeneration.AddCell(day.AF.text, 1, Element.ALIGN_CENTER, ReportGeneration.normalFont));
                }
            }
            ReportGeneration.AddElement(table);
            ReportGeneration.AddEmptyLines(1);
            ReportGeneration.AddElement(new Paragraph(gManager.language.ChiefOfMuseum + "                                                      " + gManager.language.NavalOfficer, ReportGeneration.titleFont));
        }
        ReportGeneration.CloseDoc();
    }
コード例 #2
0
    public override void GenerateReport()
    {
        ReportGeneration.CreatePDF(SettingsManager.Read("ExportPath") + "/DailyReport" + assignedDate.ToString().Replace('/', '_').Replace('\\', '_').Replace(':', '_') + ".pdf", true);
        ReportGeneration.OpenDoc();

        ReportGeneration.AddTitle(gManager.language.DailyGuideSchedule);
        ReportGeneration.AddEmptyLines(2);
        {
            PdfPTable table = new PdfPTable(2)
            {
                WidthPercentage = 100,
            };
            table.SetWidths(new float[] { .25f, 1 });

            table.AddCell(ReportGeneration.AddCell(header.text, 2, Element.ALIGN_CENTER, ReportGeneration.titleFont));

            table.AddCell(ReportGeneration.AddCell(gManager.language.OfficerOnDuty, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont));
            table.AddCell(ReportGeneration.AddCell(info.GetOfficer(), 1, Element.ALIGN_CENTER, ReportGeneration.normalFont));

            table.AddCell(ReportGeneration.AddCell(gManager.language.TourGuies, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont));
            table.AddCell(ReportGeneration.AddCell(info.GetTourGuides(), 1, Element.ALIGN_CENTER, ReportGeneration.normalFont));

            table.AddCell(ReportGeneration.AddCell(gManager.language.Time, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont));
            table.AddCell(ReportGeneration.AddCell(gManager.language.Details, 1, Element.ALIGN_CENTER, ReportGeneration.boldFont));

            Event e;
            for (int i = 0; i < info.Events.Count(); i++)
            {
                if (info.Events.TryGet(i, out e))
                {
                    table.AddCell(ReportGeneration.AddCell(e.startTime + " - " + e.endTime, 1, Element.ALIGN_CENTER, ReportGeneration.normalFont));
                    table.AddCell(ReportGeneration.AddCell(e.ToString(), 1, Element.ALIGN_CENTER, ReportGeneration.normalFont));
                }
            }

            ReportGeneration.AddElement(table);
            ReportGeneration.AddEmptyLines(3);
            ReportGeneration.AddElement(new Paragraph(gManager.language.ChiefOfMuseum + "                                                      " + gManager.language.NavalOfficer, ReportGeneration.titleFont));
        }
        ReportGeneration.CloseDoc();
    }
コード例 #3
0
    public PdfPTable VisitorReportTable()
    {
        PdfPTable table = new PdfPTable(6)
        {
            WidthPercentage = 100,
        };

        table.SetWidths(new float[] { 1, .5f, .5f, .1f, 1, .5f });
        table.AddCell(ReportGeneration.AddCell("ΑΝΑΦΟΡΑ ΕΠΙΣΚΕΠΤΩΝ " + data[0] + " ΤΡΙΜΗΝΟΥ " + data[1], 6, Element.ALIGN_CENTER, ReportGeneration.boldFont));
        table.AddCell(ReportGeneration.AddCell(" ", 6, 1, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΕΠΙΣΚΕΠΤΕΣ ΜΕ ΜΕΙΩΜΕΝΟ ΕΙΣΙΤΗΡΙΟ", 3, Element.ALIGN_CENTER, ReportGeneration.boldFont));
        table.AddCell(ReportGeneration.AddCell("", 1, 17, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΕΠΙΣΚΕΠΤΕΣ ΧΩΡΙΣ ΕΙΣΙΤΗΡΙΟ", 2, Element.ALIGN_CENTER, ReportGeneration.boldFont));
        table.AddCell(ReportGeneration.AddCell("ΚΑΤΗΓΟΡΙΑ", 1, Element.ALIGN_CENTER, ReportGeneration.tableBoldFont));
        table.AddCell(ReportGeneration.AddCell("ΑΤΟΜΑ", 1, Element.ALIGN_CENTER, ReportGeneration.tableBoldFont));
        table.AddCell(ReportGeneration.AddCell("ΕΙΣΠΡΑΞΕΙΣ", 1, Element.ALIGN_CENTER, ReportGeneration.tableBoldFont));
        table.AddCell(ReportGeneration.AddCell("ΚΑΤΗΓΟΡΙΑ", 1, Element.ALIGN_CENTER, ReportGeneration.tableBoldFont));
        table.AddCell(ReportGeneration.AddCell("ΑΤΟΜΑ", 1, Element.ALIGN_CENTER, ReportGeneration.tableBoldFont));
        table.AddCell(ReportGeneration.AddCell("ΦΟΙΤΗΤΕΣ", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[2], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[3], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΝΗΠΕΙΑΓΩΓΕΙΟ", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[4], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("6 - 18 ΕΤΩΝ", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[5], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[6], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΔΗΜΟΤΙΚΟ", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[7], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΑΝΩ ΤΩΝ 65", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[8], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[9], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΓΥΜΝΑΣΙΟ", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[10], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΣΥΝΟΛΟ ΕΠΙΣΚΕΠΤΩΝ ΜΕ ΜΕΙΩΜΕΝΟ ΕΙΣΙΤΗΡΙΟ", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[11], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[12], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΛΥΚΕΙΟ", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[13], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(" ", 3, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΕΚΠΕΔΕΥΤΙΚΟ", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[14], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΕΠΙΣΚΕΠΤΕΣ ΜΕ ΚΑΝΟΝΙΚΟ ΕΙΣΙΤΗΡΙΟ", 3, Element.ALIGN_CENTER, ReportGeneration.boldFont));
        table.AddCell(ReportGeneration.AddCell("ΑΜΕΑ ΚΑΙ ΣΥΝΟΔΟΙ", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[15], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΚΑΤΗΓΟΡΙΑ", 1, Element.ALIGN_CENTER, ReportGeneration.tableBoldFont));
        table.AddCell(ReportGeneration.AddCell("ΑΤΟΜΑ", 1, Element.ALIGN_CENTER, ReportGeneration.tableBoldFont));
        table.AddCell(ReportGeneration.AddCell("ΕΙΣΠΡΑΚΣΕΙΣ", 1, Element.ALIGN_CENTER, ReportGeneration.tableBoldFont));
        table.AddCell(ReportGeneration.AddCell("ΚΑΤΩ ΤΩΝ 6", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[16], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΠΟΛΙΤΕΣ", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[17], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[18], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΠΟΛΥΤΕΚΝΟΙ", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[19], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΞΕΝΟΙ ΠΟΛΙΤΕΣ", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[20], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[21], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΣΤΡΑΤΙΩΤΙΚΟΙ", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[22], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΣΥΝΟΛΟ ΕΠΙΣΚΕΠΤΩΝ ΜΕ ΚΑΝΟΝΙΚΟ ΕΙΣΙΤΗΡΙΟ", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[23], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[24], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΑΝΕΡΓΟΙ", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[25], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(" ", 3, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΕΚΔΗΛΩΣΕΙΣ", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[26], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΣΥΝΟΛΙΚΟ", 3, Element.ALIGN_CENTER, ReportGeneration.boldFont));
        table.AddCell(ReportGeneration.AddCell("ΣΥΝΟΛΟ ΕΠΙΣΚΕΠΤΩΝ ΧΩΡΙΣ ΕΙΣΙΤΗΡΙΟ", 1, Element.ALIGN_LEFT, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[27], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΣΥΝΟΛΟ ΕΠΙΣΚΕΠΤΩΝ ΜΕ ΕΙΣΙΤΗΡΙΟ", 1, Element.ALIGN_LEFT, ReportGeneration.tableBoldFont));
        table.AddCell(ReportGeneration.AddCell(data[28], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[29], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(" ", 2, 3, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΣΥΝΟΛΟ ΕΠΙΣΚΕΠΤΩΝ ΧΩΡΙΣ ΕΙΣΙΤΗΡΙΟ", 1, Element.ALIGN_LEFT, ReportGeneration.tableBoldFont));
        table.AddCell(ReportGeneration.AddCell(data[30], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[31], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell("ΣΥΝΟΛΟ ΕΙΣΠΡΑΞΕΩΝ", 1, Element.ALIGN_LEFT, ReportGeneration.tableBoldFont));
        table.AddCell(ReportGeneration.AddCell(" ", 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        table.AddCell(ReportGeneration.AddCell(data[32], 1, Element.ALIGN_CENTER, ReportGeneration.tableFont));
        return(table);
    }