Ejemplo n.º 1
0
        private string GameBlock()
        {
            string s;

            if (_game != null)
            {
                var weekOut = Int32.Parse(_game.Week) > 17 ? "PO" : "W" + _game.Week;
                if (_game.Week.Equals("21"))
                {
                    weekOut = "SB";
                }
                s = HtmlLib.TableOpen("BORDER='1' CELLSPACING='3' CELLPADDING='3'") +
                    HtmlLib.TableRowOpen() +
                    HtmlLib.TableData(_game.AussieDate()) +
                    HtmlLib.TableData(_game.AussieHour(true)) +
                    HtmlLib.TableData(weekOut) +
                    HtmlLib.TableData(_game.Season) +
                    HtmlLib.TableRowClose() +
                    HtmlLib.TableRowOpen() +
                    HtmlLib.TableData(HtmlLib.Bold(_game.HomeTeamName), SetColour(true)) +
                    HtmlLib.TableData("vs. " + _game.AwayTeamName, SetColour(false)) +
                    HtmlLib.TableData(_game.Spread.ToString()) +
                    HtmlLib.TableData(_game.Total.ToString()) +
                    HtmlLib.TableRowClose() +
                    HtmlLib.TableRowOpen();
                if (_game.HomeNflTeam != null)
                {
                    s += HtmlLib.TableData(_game.HomeNflTeam.RecordOut());
                }
                else
                {
                    s += HtmlLib.TableData(" ");
                }
                if (_game.AwayNflTeam != null)
                {
                    s += HtmlLib.TableData(_game.AwayNflTeam.RecordOut());
                }
                else
                {
                    s += HtmlLib.TableData(" ");
                }

                s += HtmlLib.TableData("") +
                     HtmlLib.TableData("") +
                     HtmlLib.TableRowClose() +
                     HtmlLib.TableClose();
            }
            else
            {
                s = "no game object";
            }
            return(s);
        }