private void WriteGameRoster(StreamWriter sw, List<GameSlot> plgm, ArbWeb.Roster rst) { sw.WriteLine("<tr>"); sw.WriteLine(String.Format("<td class='rosterOuter'>{0}", plgm[0].GameNum)); sw.WriteLine(String.Format("<td class='rosterOuter'>{0}", plgm[0].Dttm.ToString("ddd M/dd"))); sw.WriteLine(String.Format("<td class='rosterOuter'>{0}", plgm[0].Dttm.ToString("h:mm tt"))); sw.WriteLine(String.Format("<td class='rosterOuter'>{0}", plgm[0].SportLevel)); sw.WriteLine(String.Format("<td class='rosterOuter'>{0}", plgm[0].Site)); sw.WriteLine(String.Format("<td class='rosterOuter'>{0}", plgm[0].Home)); sw.WriteLine(String.Format("<td class='rosterOuter'>{0}", plgm[0].Away)); sw.WriteLine("<tr><td colspan='7' class='rosterOuter'>"); sw.WriteLine("<table class='rosterInner'>"); foreach (GameSlot gm in plgm) { sw.WriteLine("<tr>"); if (gm.Open) { sw.WriteLine(String.Format("<td class='rosterInner'>{0}", gm.Pos)); sw.WriteLine("<td colspan='4'> "); } else { RosterEntry rste = rst.RsteLookupEmail(gm.Email); int nBaseRank; sw.WriteLine(String.Format("<td class='rosterInner'>{0} ({1})", gm.Pos, nBaseRank = rste.Rank(String.Format("{0}, {1}", gm.Sport, gm.Pos)))); sw.WriteLine(String.Format("<td class='rosterInnerName'>{0}", rste.Name)); sw.WriteLine(String.Format("<td class='rosterInner'>{0}", rste.CellPhone)); sw.WriteLine(String.Format("<td class='rosterInner'>{0}", rste.OtherRanks(gm.Sport, gm.Pos, nBaseRank))); sw.WriteLine(String.Format("<td class='rosterInner'>{0}", gm.Status)); } } sw.WriteLine("</table>"); }
public void GenSiteRosterReport(string sReportFile, ArbWeb.Roster rst, string[] rgsRosterFilter, DateTime dttmStart, DateTime dttmEnd) { StreamWriter sw = new StreamWriter(sReportFile, false, Encoding.Default); SortedList<string, int> plsSiteShort = Utils.PlsUniqueFromRgs(rgsRosterFilter); List<GameSlot> plgm = new List<GameSlot>(); sw.WriteLine("<html>"); sw.WriteLine("<head><style>"); sw.WriteLine(".rosterOuter, .rosterInner, td.rosterInnerName { margin-left: 5pt; font-family: 'Calibri'; font-size: 11pt; border-collapse: collapse; border-spacing: 0pt; }"); sw.WriteLine("td.rosterOuter { border-top: .5pt solid black; border-bottom: .5pt solid black; }"); sw.WriteLine("table.rosterInner { width: 100%;}"); sw.WriteLine("table.rosterOuter { width: 100%; max-width: 7.5in;}"); sw.WriteLine("td.rosterInner, td.rosterInnerName { padding-left: 5pt; padding-right: 5pt;} td.rosterInnerName { }"); sw.WriteLine("@page sec1 { margin: .25in; } div.sec1 { page:sec1} "); sw.WriteLine("</style></head>"); sw.WriteLine("<div class='sec1'><table class='rosterOuter'>"); // at this point we are ready to generate the report foreach (GameSlot gm in m_plgmsSortedGameNum.Values) { if (gm.Dttm < dttmStart || gm.Dttm > dttmEnd) continue; if (rgsRosterFilter != null) if (!plsSiteShort.ContainsKey(gm.SiteShort)) continue; if (plgm.Count > 0 && plgm[0].GameNum != gm.GameNum) { WriteGameRoster(sw, plgm, rst); plgm.Clear(); } plgm.Add(gm); } if (plgm.Count > 0) WriteGameRoster(sw, plgm, rst); sw.WriteLine("</table></div></html>"); sw.Close(); }
public void GenSiteRosterReport(string sReportFile, ArbWeb.Roster rst, string[] rgsRosterFilter, DateTime dttmStart, DateTime dttmEnd) { m_gms.GenSiteRosterReport(sReportFile, rst, rgsRosterFilter, dttmStart, dttmEnd); }