private PdfPTable getHandlerDetails(UserShows userShow, User currentUser, int ShowDetailsID, List<int> dogsRunningToday) { Font headerFont = new Font(Font.HELVETICA, 17, Font.NORMAL, Color.BLACK); Font ringNumberFont = new Font(Font.HELVETICA, 10, Font.NORMAL, Color.BLACK); var summaryTable = new PdfPTable(2); summaryTable.WidthPercentage = 100; Paragraph p = new Paragraph(); p.Add(new Chunk(String.Format("Handler Name:{0}", currentUser.Name), headerFont)); p.Add(Chunk.NEWLINE); p.Add(new Chunk(String.Format("Show Ref:{0,6}", userShow.ID), headerFont)); p.Add(Chunk.NEWLINE); UserCamping userCamping = new UserCamping(userShow.ID); if (userCamping.ID > -1) { String tmp = ""; if (userCamping.PitchNo == -1) { tmp = "Not Allocated"; } else { tmp = userCamping.PitchNo.ToString(); } p.Add(new Phrase(new Chunk(String.Format("Camping PitchNo:{0}", tmp), headerFont))); p.Add(new Phrase(Chunk.NEWLINE)); } Helpers helper = new Helpers(currentUser.UserID, ShowDetailsID); if (helper.ID > -1) { p.Add(new Phrase(new Chunk(String.Format("Camping PitchNo:{0}", helper.RingNo), headerFont))); p.Add(new Phrase(Chunk.NEWLINE)); } var cell = new PdfPCell(p); cell.BorderWidth = 0; summaryTable.AddCell(cell); p = new Paragraph(); foreach (int dogid in dogsRunningToday) { Dogs dd = new Dogs(dogid); p.Add(new Phrase(new Chunk(String.Format("Ring Number:{0} - {1}", dd.GetRingNumbersForDog(userShow.ShowID), dd.KCName), ringNumberFont))); p.Add(new Phrase(Chunk.NEWLINE)); } cell = new PdfPCell(p); cell.BorderWidth = 0; summaryTable.AddCell(new PdfPCell(cell)); return summaryTable; }
private static String getHandlerDetails(UserShows userShow, User currentUser, int ShowDetailsID, List<int> dogsRunningToday) { String html = "<table ><tr><td style='width:600px' valign='top'><div class='handlerDetails'>"; html += "<div class='handler'>Handler Name:" + currentUser.Name + "</div>"; html += "<div class='showRef'>Show Ref:" + userShow.ID.ToString("000000") + "</div>"; UserCamping userCamping = new UserCamping(userShow.ID); if (userCamping.ID > -1) { String tmp = ""; if (userCamping.PitchNo == -1) { tmp = "Not Allocated"; } else { tmp = userCamping.PitchNo.ToString(); } html += "<div class='campingDetails'>Camping Pitch No:" + tmp + "</div>"; } Helpers helper = new Helpers(currentUser.UserID, ShowDetailsID); if (helper.ID > -1) { if (helper.RingNo > 0) { html += "<div class='helpingDetails'>Helping on Ring " + helper.RingNo.ToString() + " - " + helper.expandJob() + "</div>"; } else { html += "<div class='helpingDetails'>Helping " + helper.expandJob() + "</div>"; } } html += "</div>"; html += "</td><td valign='top' >"; foreach (int dogid in dogsRunningToday) { Dogs dd = new Dogs(dogid); html += String.Format("<div>Ring Number:{0} - {1}</div>", dd.GetRingNumbersForDog(userShow.ShowID), dd.KCName); } html += "</td></tr></table>"; return html; }