/// <summary> /// Renders the Welcome Page for the booklet. /// </summary> /// <param name="showInfo"> /// Reference to the show information. /// </param> public void WelcomePage(ShowInfo showInfo) { Paragraph p = new Paragraph("Welcome to the Market"); p.Font.Size = 20; p.Alignment = Element.ALIGN_CENTER; p.Font.SetStyle(Font.BOLD | Font.UNDERLINE); p.SpacingAfter = 20; Add(p); DateTime startDate = showInfo.StartDate; string txt = string.Format("Members of the Rocky Mountain Shoe Club welcome you to the {0}, {1} Denver Shoe Market.", startDate.ToString("MMMM"), startDate.Year); p = new Paragraph(txt); p.Font.Size = 20; p.SpacingAfter = 20; Add(p); txt = string.Format("We have over {0} Reps, marketing over {1} lines including shoes, socks, slippers and handbags.", ConfigurationManager.AppSettings["num_exhibitors"], ConfigurationManager.AppSettings["num_lines"]); p = new Paragraph(txt); p.Font.Size = 20; p.SpacingAfter = 72; Add(p); p = new Paragraph("Lunch"); p.Font.Size = 20; p.Alignment = Element.ALIGN_CENTER; p.Font.SetStyle(Font.BOLD | Font.UNDERLINE); p.SpacingAfter = 20; Add(p); p = new Paragraph("Lunch will be served Saturday and Sunday from 12:00pm to 1:30pm in the Aspen room and lounge area."); p.Font.Size = 20; p.SpacingAfter = 20; Add(p); p = new Paragraph("Retailers and exhibitors - We will be having a social hour on Saturday night in the Aspen room starting at 5:00pm."); p.Font.Size = 20; p.SpacingAfter = 20; Add(p); p = new Paragraph("Snacks and soft drinks will be provided."); p.Font.Size = 20; p.SpacingAfter = 20; Add(p); p = new Paragraph("Alcoholic beverages will be provided by the exhibitors."); p.Font.Size = 20; p.SpacingAfter = 72; Add(p); p = new Paragraph("NEXT SHOE MARKET"); p.Font.Size = 30; p.Alignment = Element.ALIGN_CENTER; p.Font.SetStyle(Font.BOLD); Add(p); p = new Paragraph(showInfo.NextShow); p.Font.Size = 30; p.Alignment = Element.ALIGN_CENTER; p.Font.SetStyle(Font.BOLD); p.SpacingAfter = 80; Add(p); p = new Paragraph(string.Format("Show Coordinator: {0}", showInfo.Coordinator)); p.Font.Size = 20; p.Alignment = Element.ALIGN_CENTER; Add(p); p = new Paragraph(string.Format("Phone: {0}", showInfo.CoordinatorPhone)); p.Font.Size = 20; p.Alignment = Element.ALIGN_CENTER; Add(p); p = new Paragraph(showInfo.CoordinatorEmail); p.Font.Size = 20; p.Alignment = Element.ALIGN_CENTER; Add(p); NewPage(); }
/// <summary> /// Renders the thank you page for the booklet. /// </summary> /// <param name="showInfo"> /// Reference to the Show Information object. /// </param> public void ThankYou(ShowInfo showInfo) { // The following comments are for the inclusion of notes pages. // We currently don't want this, but I'm leaving it in for the future. // int currentPage = this.PageNumber; Console.WriteLine(string.Format("Current Page: {0}", currentPage)); int remainder = currentPage % 4; int notesPagesToAdd = (remainder > 0) ? remainder - 1 : 3; // Console.WriteLine(string.Format("Notes pages to add: {0}", notesPagesToAdd)); // for (int i=0; i<notesPagesToAdd; i++) { NewPage(); Paragraph pNote = new Paragraph("NOTES"); pNote.Font.Size = 20; pNote.Font.SetStyle(Font.BOLD | Font.UNDERLINE); pNote.Alignment = Element.ALIGN_CENTER; Add(pNote); } NewPage(); Paragraph p = new Paragraph("THANK YOU"); p.Font.SetStyle(Font.BOLD); p.Font.Size = 20; p.Alignment = Element.ALIGN_CENTER; p.SpacingAfter = 20; Add(p); p = new Paragraph("FOR COMING TO THE SHOW"); p.Font.Size = 20; p.Alignment = Element.ALIGN_CENTER; p.SpacingAfter = 200; Add(p); p = new Paragraph("NEXT MARKET"); p.Font.Size = 20; p.Alignment = Element.ALIGN_CENTER; p.SpacingAfter = 20; Add(p); p = new Paragraph(showInfo.NextShow); p.Font.Size = 20; p.Alignment = Element.ALIGN_CENTER; p.SpacingAfter = 200; Add(p); p = new Paragraph(showInfo.Location); p.Font.Size = 20; p.Alignment = Element.ALIGN_CENTER; Add(p); p = new Paragraph(showInfo.LocationAddress); p.Font.Size = 20; p.Alignment = Element.ALIGN_CENTER; Add(p); string addr = string.Format("{0}, {1} {2}", showInfo.LocationCity, showInfo.LocationState, showInfo.LocationPostalCode); p = new Paragraph(addr); p.Font.Size = 20; p.Alignment = Element.ALIGN_CENTER; Add(p); string phone = string.Format("Phone: {0}", showInfo.LocationPhone); p = new Paragraph(phone); p.Font.Size = 20; p.Alignment = Element.ALIGN_CENTER; Add(p); string fax = string.Format("Fax: {0}", showInfo.LocationFax); p = new Paragraph(fax); p.Font.Size = 20; p.Alignment = Element.ALIGN_CENTER; Add(p); }
/// <summary> /// Renders the title page of the booklet. /// </summary> /// <param name="showInfo"> /// Reference to the Show Information for the booklet. /// </param> public void TitlePage(ShowInfo showInfo) { Image img = Image.GetInstance(ConfigurationManager.AppSettings["mountainsImage"]); img.Alignment = Image.MIDDLE_ALIGN; Console.WriteLine(string.Format("Image = {0}", img)); Add(img); Paragraph p = new Paragraph("Rocky Mountain"); p.Font.Size = 30; p.Font.SetStyle(Font.BOLD); p.Alignment = Element.ALIGN_CENTER; Add(p); p = new Paragraph("Shoe Show"); p.Font.Size = 30; p.Font.SetStyle(Font.BOLD); p.Alignment = Element.ALIGN_CENTER; p.SpacingBefore = 36; Add(p); p = new Paragraph("Denver Market"); p.Font.Size = 20; p.Font.SetStyle(Font.BOLD); p.Alignment = Element.ALIGN_CENTER; p.SpacingBefore = 72; Add(p); DateTime startDt = showInfo.StartDate; DateTime endDt = showInfo.EndDate; string nextShow = string.Format("{0} {1}-{2}, {3}", startDt.ToString("MMMM"), startDt.Day, endDt.Day, startDt.Year); p = new Paragraph(nextShow); p.Font.Size = 20; p.Font.SetStyle(Font.BOLD); p.Alignment = Element.ALIGN_CENTER; p.SpacingBefore = 144; Add(p); p = new Paragraph(showInfo.Location); p.Font.Size = 20; p.Font.SetStyle(Font.BOLD); p.Alignment = Element.ALIGN_CENTER; Add(p); p = new Paragraph(showInfo.LocationAddress); p.Font.Size = 20; p.Font.SetStyle(Font.BOLD); p.Alignment = Element.ALIGN_CENTER; Add(p); string addr = string.Format("{0}, {1} {2}", showInfo.LocationCity, showInfo.LocationState, showInfo.LocationPostalCode); p = new Paragraph(addr); p.Font.Size = 20; p.Font.SetStyle(Font.BOLD); p.Alignment = Element.ALIGN_CENTER; p.SpacingAfter = 72; Add(p); PdfPTable table = new PdfPTable(2); table.WidthPercentage = 40; p = new Paragraph("Saturday"); p.Font.Size = 15; PdfPCell cell = new PdfPCell(p); cell.Border = PdfPCell.NO_BORDER; table.AddCell(cell); p = new Paragraph("9am to 5pm"); p.Font.Size = 15; cell = new PdfPCell(p); cell.Border = PdfPCell.NO_BORDER; table.AddCell(cell); p = new Paragraph("Sunday"); p.Font.Size = 15; cell = new PdfPCell(p); cell.Border = PdfPCell.NO_BORDER; table.AddCell(cell); p = new Paragraph("9am to 5pm"); p.Font.Size = 15; cell = new PdfPCell(p); cell.Border = PdfPCell.NO_BORDER; table.AddCell(cell); Add(table); p = new Paragraph("Friday & Monday - by Appointment only"); p.Font.Size = 15; p.Alignment = Element.ALIGN_CENTER; Add(p); NewPage(); }
/// <summary> /// Returns the information about a specific show. /// </summary> /// <param name="showId"> /// The unique identifier of the show for which information is to be /// retrieved. /// </param> /// <returns> /// Reference to a ShowInfo object describing the show. /// </returns> public static ShowInfo GetShowInfo(long showId) { Console.WriteLine(string.Format("ShowInfo({0})", showId)); ShowInfo showInfo = null; NpgsqlConnection conn = DataSource.Instance.Connection; NpgsqlCommand cmd = new NpgsqlCommand(string.Format(GET_SHOW_INFO_SQL, showId), conn); try { IDataReader reader = cmd.ExecuteReader(); if (reader.Read()) { showInfo = new ShowInfo(); showInfo.ShowId = reader.GetInt64(0); showInfo.Description = reader.GetString(1); showInfo.StartDate = reader.GetDateTime(2); showInfo.EndDate = reader.GetDateTime(3); showInfo.Location = reader.GetString(4); showInfo.Coordinator = reader.GetString(9); showInfo.LocationPhone = reader.GetString(10); showInfo.LocationFax = reader.GetString(11); showInfo.LocationReservation = reader.GetString(12); showInfo.NextShow = reader.GetString(13); showInfo.CoordinatorPhone = reader.GetString(14); showInfo.CoordinatorEmail = reader.GetString(15); showInfo.LocationAddress = reader.GetString(16); showInfo.LocationCity = reader.GetString(17); showInfo.LocationState = reader.GetString(18); showInfo.LocationPostalCode = reader.GetString(19); } reader.Close(); } finally { DataSource.Instance.Close(); } return showInfo; }