예제 #1
0
        private void RecentMeetings(ref string s)
        {
            //RosterLib.Utility.Announce( "Doing Recent Meetings");

            var s1             = String.Empty;
            var nonDeletedRecs = 0;

            s1 += HtmlLib.TableOpen("border='1'");
            s1 += HtmlLib.TableHeader("Season");
            s1 += HtmlLib.TableHeader("Week");
            s1 += HtmlLib.TableHeader("AT");
            s1 += HtmlLib.TableHeader("AS");
            s1 += HtmlLib.TableHeader("HT");
            s1 += HtmlLib.TableHeader("HS");
            s1 += HtmlLib.TableHeader("Spread");
            s1 += HtmlLib.TableHeader("O/U") + "<br>\n\n";
            //RosterLib.Utility.Announce(s1);
            var now         = DateTime.Now;
            var ts          = new TimeSpan((3 * 365), 0, 0, 0);
            var threeYrsAgo = now.Subtract(ts);

            //RosterLib.Utility.Announce( string.Format("3 years ago was {0}", threeYrsAgo ) );
            //RosterLib.Utility.Announce(string.Format("Getting games between {0} and {1}", game.AwayTeam, game.HomeTeam ));
            if (Utility.TflWs != null)
            {
                var ds = Utility.TflWs.GetGamesBetween(_game.AwayTeam, _game.HomeTeam, threeYrsAgo);
                if (ds != null)
                {
                    // RosterLib.Utility.Announce(string.Format("found {0} Recent Meetings", ds.Tables[0].Rows.Count));
                    for (var i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        if (ds.Tables[0].Rows[i].RowState != DataRowState.Deleted)
                        {
                            nonDeletedRecs++;
                            var theGame = new NFLGame(ds.Tables[0].Rows[i]);
                            s1 += theGame.ResultRow() + "<br>\n\n";
                        }
                    }
                    s1 += HtmlLib.TableClose() + "<br>\n\n";
                }
                else
                {
                    Utility.Announce("Null game set");
                }

                if (nonDeletedRecs > 0)
                {
                    s += s1;
                }
                else
                {
                    s += "<br>No Previous Meetings<br>";
                }
            }
            else
            {
                Utility.Announce("No Librarian!");
            }
        }
예제 #2
0
        private string ColHeaders()
        {
            string headers = "";

            if (_columns != null)
            {
                if (_rowNumbers)
                {
                    headers = HtmlLib.TableHeader("Row");
                }

                headers = _columns.Cast <ReportColumn>().Aggregate(headers,
                                                                   (current, col) => current + HtmlLib.TableHeader(col.Header));
            }
            return(headers);
        }
예제 #3
0
        private string ColHeaders()
        {
            var headers = "";

            if (!string.IsNullOrEmpty(CustomHeader))
            {
                return(CustomHeader);
            }

            if (_columns != null)
            {
                if (_rowNumbers)
                {
                    headers = HtmlLib.TableHeader("Row");
                }

                headers = _columns.Cast <ReportColumn>().Aggregate(headers,
                                                                   (current, col) => current + HtmlLib.TableHeader(col.Header));
            }
            return(headers);
        }