Example #1
0
        public void RenderTeam(NflTeam team)
        {
            if (team.MetricsHt == null)
            {
                LoadTeam(team, team.TeamCode);
            }
            var metricsHt = team.MetricsHt;
            var str       = new SimpleTableReport(string.Format("Metrics-{0}", team.TeamCode));

            str.AddStyle("#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 761px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }");
            str.AddStyle("#main { margin-left:1em; }");
            str.AddStyle("#dtStamp { font-size:0.8em; }");
            str.AddStyle(".end { clear: both; }");
            str.AddStyle(".gponame { color:white; background:black }");
            str.ColumnHeadings  = true;
            str.DoRowNumbers    = true;
            str.ShowElapsedTime = false;
            str.IsFooter        = false;
            str.AddColumn(new ReportColumn("Week", "WeekSeed", "{0}", typeof(String), false));
            str.AddColumn(new ReportColumn("OffTDp", "OffTDp", "{0}", typeof(Int32), true));
            str.AddColumn(new ReportColumn("Mult", "AvgOffTDp", "{0:#.#}", typeof(Decimal), false));
            str.AddColumn(new ReportColumn("OffTDr", "OFFTDR", "{0}", typeof(Int32), true));
            str.AddColumn(new ReportColumn("Mult", "AvgOffTDr", "{0:#.#}", typeof(Decimal), false));
            str.AddColumn(new ReportColumn("OffSAKa", "OFFSAKa", "{0}", typeof(Decimal), true));
            str.AddColumn(new ReportColumn("Mult", "AvgOffSaka", "{0:#.#}", typeof(Decimal), false));
            str.AddColumn(new ReportColumn("DefTDpa", "DefTDpa", "{0}", typeof(Int32), true));
            str.AddColumn(new ReportColumn("Mult", "AvgDefTDp", "{0:#.#}", typeof(Decimal), false));
            str.AddColumn(new ReportColumn("DefTDra", "DEFTDRa", "{0}", typeof(Int32), true));
            str.AddColumn(new ReportColumn("Mult", "AvgDefTDr", "{0:#.#}", typeof(Decimal), false));
            str.AddColumn(new ReportColumn("DefSAK", "DEFSAK", "{0}", typeof(Decimal), true));
            str.AddColumn(new ReportColumn("Mult", "AvgDefSak", "{0:#.#}", typeof(Decimal), false));
            BuildTable(str, metricsHt, team);
            str.SetSortOrder("WeekSeed");
            str.RenderAsHtml(string.Format("{0}Metrics-{1}.htm", Utility.OutputDirectory(), team.TeamCode), true);
        }
        /// <summary>
        /// Renders the object as a simple HTML report.
        /// </summary>
        public void Render()
        {
            MetricsBase = new MetricsBase(new PreStyleBreakdown(), Season)
            {
                DoBreakdowns = true
            };
            MetricsBase.Load(Season, skipPostseason: true);
            TeamList = MetricsBase.TeamList;
            var str = new SimpleTableReport(string.Format("Balance Report {0}", Season));

            str.AddStyle("#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }");
            str.AddStyle("#main { margin-left:1em; }");
            str.AddStyle("#dtStamp { font-size:0.8em; }");
            str.AddStyle(".end { clear: both; }");
            str.AddStyle(".gponame { color:white; background:black }");
            str.ColumnHeadings  = true;
            str.DoRowNumbers    = true;
            str.ShowElapsedTime = false;
            str.IsFooter        = false;
            str.AddColumn(new ReportColumn("Team", "TEAM", "{0}", typeof(String)));
            str.AddColumn(new ReportColumn("Rating", "RATING", "{0}", typeof(String)));
            str.AddColumn(new ReportColumn("Plays", "PLAYS", "{0}", typeof(Int32), true));
            str.AddColumn(new ReportColumn("Passes", "PASSES", "{0}", typeof(Int32), true));
            str.AddColumn(new ReportColumn("Runs", "RUNS", "{0}", typeof(Int32), true));
            str.AddColumn(new ReportColumn("Pass%", "PPERCENT", "{0:0.00}", typeof(decimal), false));
            str.AddColumn(new ReportColumn("Run%", "RPERCENT", "{0:0.00}", typeof(decimal), false));
            str.AddColumn(new ReportColumn("Tdp", "TDPASSES", "{0}", typeof(string)));
            str.AddColumn(new ReportColumn("Tdr", "TDRUNS", "{0}", typeof(String)));
            BuildTable(str);
            str.SetSortOrder("PASSES DESC");
            str.RenderAsHtml(OutputFilename(), true);
        }
Example #3
0
 /// <summary>
 /// Renders the object as a simple HTML report.
 /// </summary>
 public void Render()
 {
     MetricsBase = new MetricsBase(new PreStyleBreakdown(), Season) { DoBreakdowns = true };
      MetricsBase.Load(Season, skipPostseason:true);
      TeamList = MetricsBase.TeamList;
     var str = new SimpleTableReport( string.Format( "Balance Report {0}", Season ) );
     str.AddStyle(  "#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }" );
     str.AddStyle(  "#main { margin-left:1em; }" );
     str.AddStyle(  "#dtStamp { font-size:0.8em; }" );
     str.AddStyle(  ".end { clear: both; }" );
     str.AddStyle(  ".gponame { color:white; background:black }" );
     str.ColumnHeadings = true;
     str.DoRowNumbers = true;
     str.ShowElapsedTime = false;
     str.IsFooter = false;
     str.AddColumn( new ReportColumn( "Team",      "TEAM",   "{0}", typeof( String )       ) );
     str.AddColumn( new ReportColumn( "Rating",    "RATING", "{0}", typeof( String )       ) );
     str.AddColumn( new ReportColumn( "Plays",     "PLAYS",  "{0}", typeof( Int32 ), true       ) );
     str.AddColumn( new ReportColumn( "Passes",    "PASSES", "{0}", typeof( Int32 ), true       ) );
     str.AddColumn( new ReportColumn( "Runs",      "RUNS",   "{0}", typeof( Int32 ), true       ) );
     str.AddColumn( new ReportColumn( "Pass%",     "PPERCENT",  "{0:0.00}", typeof( decimal ), false ) );
     str.AddColumn( new ReportColumn( "Run%",      "RPERCENT",  "{0:0.00}", typeof( decimal ), false ) );
     str.AddColumn( new ReportColumn( "Tdp", "TDPASSES", "{0}", typeof( string ) ) );
     str.AddColumn( new ReportColumn( "Tdr", "TDRUNS", "{0}",   typeof( String ) ) );
     BuildTable( str );
     str.SetSortOrder( "PASSES DESC");
     str.RenderAsHtml( OutputFilename(), true );
 }
        /// <summary>
        ///   Looks at the EP xml to dump out a report
        /// </summary>
        public void RosterExperience()
        {
            Utility.Announce("NFLRosterReport.RosterExperience - creating simple report");

            CheckPreRequisites();

            var str =
                new SimpleTableReport(string.Format("Roster Experience {0}", Utility.CurrentSeason()));

            str.AddStyle(
                "#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }");
            str.AddStyle("#main { margin-left:1em; }");
            str.AddStyle("#dtStamp { font-size:0.8em; }");
            str.AddStyle(".end { clear: both; }");
            str.AddStyle(".gponame { color:white; background:black }");
            str.ColumnHeadings  = true;
            str.DoRowNumbers    = true;
            str.ShowElapsedTime = false;
            str.IsFooter        = false;
            str.AddColumn(new ReportColumn("Team", "TEAM", "{0}", typeof(String)));
            str.AddColumn(new ReportColumn("Player", "PLAYER", "{0}", typeof(String)));
            str.AddColumn(new ReportColumn("Unit", "UNIT", "{0}", typeof(String)));
            str.AddColumn(new ReportColumn("EP", "EP", "{0}", typeof(Int32), true));
            BuildTable(str);
            str.SetSortOrder("EP DESC");
            str.RenderAsHtml(
                string.Format("{0}Experience-{1}-{2}.htm", Utility.OutputDirectory(), Utility.CurrentSeason(),
                              Utility.CurrentWeek()), true);
        }
        private void BuildRatingsTable(SimpleTableReport str, string fTeamOwner, NFLWeek week)
        {
            //RosterLib.Utility.Announce( string.Format("  BuildRatingsTable"));

            if (_teamList == null)
            {
                Utility.Announce(string.Format("  BuildRatingsTable: Loading Teams"));
                LoadTeams();
            }

            if (_teamList != null)
            {
                foreach (GsTeam t in _teamList)
                {
                    BuildReportDataset(str, fTeamOwner, week, t);
                }
            }
            str.SetSortOrder("DAY, HOUR, RATING DESC");
            return;
        }
Example #6
0
 public void Render()
 {
     var str = new SimpleTableReport( string.Format( "Tipping Comp - {0:d}", DateTime.Now ) );
     str.AddStyle( "#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 761px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }" );
     str.AddStyle( "#main { margin-left:1em; }" );
     str.AddStyle( "#dtStamp { font-size:0.8em; }" );
     str.AddStyle( ".end { clear: both; }" );
     str.AddStyle( ".gponame { color:white; background:black }" );
     str.ColumnHeadings = true;
     str.DoRowNumbers = true;
     str.ShowElapsedTime = false;
     str.IsFooter = false;
     str.AddColumn( new ReportColumn( "Method", "METHOD", "{0}", typeof( String ), false ) );
     str.AddColumn( new ReportColumn( "Wins", "WINS", "{0}", typeof( Int32 ), tally: true ) );
     str.AddColumn( new ReportColumn( "Losses", "LOSSES", "{0}", typeof( Int32 ), tally:true ) );
     str.AddColumn( new ReportColumn( "Ties", "TIES", "{0}", typeof( Int32 ), tally: true ) );
     str.AddColumn( new ReportColumn( "Clip", "CLIP", "{0:#.##0}", typeof( Decimal ), false ) );
     BuildTable( str );
     str.SetSortOrder( "Clip DESC" );
     str.RenderAsHtml( OutputFilename, true );
 }
Example #7
0
        public void Render()
        {
            var str = new SimpleTableReport(string.Format("Tipping Comp - {0:d}", DateTime.Now));

            str.AddStyle("#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 761px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }");
            str.AddStyle("#main { margin-left:1em; }");
            str.AddStyle("#dtStamp { font-size:0.8em; }");
            str.AddStyle(".end { clear: both; }");
            str.AddStyle(".gponame { color:white; background:black }");
            str.ColumnHeadings  = true;
            str.DoRowNumbers    = true;
            str.ShowElapsedTime = false;
            str.IsFooter        = false;
            str.AddColumn(new ReportColumn("Method", "METHOD", "{0}", typeof(String), false));
            str.AddColumn(new ReportColumn("Wins", "WINS", "{0}", typeof(Int32), tally: true));
            str.AddColumn(new ReportColumn("Losses", "LOSSES", "{0}", typeof(Int32), tally: true));
            str.AddColumn(new ReportColumn("Ties", "TIES", "{0}", typeof(Int32), tally: true));
            str.AddColumn(new ReportColumn("Clip", "CLIP", "{0:#.##0}", typeof(Decimal), false));
            BuildTable(str);
            str.SetSortOrder("Clip DESC");
            str.RenderAsHtml(OutputFilename, true);
        }
Example #8
0
        public void Render()
        {
            var str = new SimpleTableReport(string.Format("Suggested Lineup {0}:{1:#0} {2}", Season, Week, LeagueId));

            str.AddStyle(
                "#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }");
            str.AddStyle("#main { margin-left:1em; }");
            str.AddStyle("#dtStamp { font-size:0.8em; }");
            str.AddStyle(".end { clear: both; }");
            str.AddStyle(".gponame { color:white; background:black }");
            str.AddStyle(
                "label { display:block; float:left; width:130px; padding: 3px 5px; margin: 0px 0px 5px 0px; text-align:right; }");
            str.AddStyle(
                "value { display:block; float:left; width:100px; padding: 3px 5px; margin: 0px 0px 5px 0px; text-align:left; font-weight: bold; color:blue }");
            str.AddStyle(
                "#notes { float:right; height:auto; width:308px; font-size: 88%; background-color: #ffffe1; border: 1px solid #666666; padding: 5px; margin: 0px 0px 10px 10px; color:#666666 }");
            str.AddStyle(
                "div.notes H4 { background-image: url(images/icon_info.gif); background-repeat: no-repeat; background-position: top left; padding: 3px 0px 3px 27px; border-width: 0px 0px 1px 0px; border-style: solid; border-color: #666666; color: #666666; font-size: 110%;}");
            str.ColumnHeadings  = true;
            str.DoRowNumbers    = false;
            str.ShowElapsedTime = false;
            str.IsFooter        = false;
            str.AddColumn(new ReportColumn("Slot", "SLOT", "{0:00}"));
            str.AddColumn(new ReportColumn("Player", "PLAYER", "{0}"));
            str.AddColumn(new ReportColumn("Team", "TEAM", "{0}"));
            str.AddColumn(new ReportColumn("Pos", "POS", "{0}"));
            str.AddColumn(new ReportColumn("RPoints", "PTS", "{0}"));
            str.AddColumn(new ReportColumn("Role", "ROLE", "{0}"));
            str.AddColumn(new ReportColumn("Game", "GAME", "{0}"));
            str.AddColumn(new ReportColumn("OppUnit", "OPPRATE", "{0}"));
            str.AddColumn(new ReportColumn("Spread", "SPREAD", "{0:##.#}"));
            str.AddColumn(new ReportColumn("Total", "TOTAL", "{0:##.#}"));
            str.AddColumn(new ReportColumn("Actual", "ACTUAL", "{0:##}"));
            str.LoadBody(BuildTable());
            str.SetSortOrder("SLOT,PTS DESC");
            str.RenderAsHtml(FileName(), true);
        }
Example #9
0
        public void Render()
        {
            var str = new SimpleTableReport($"Suggested Lineup {Season}:{Week:#0} {LeagueId}");

            str.AddDenisStyle();
            str.ColumnHeadings  = true;
            str.DoRowNumbers    = false;
            str.ShowElapsedTime = false;
            str.IsFooter        = false;
            str.AddColumn(new ReportColumn("Slot", "SLOT", "{0:00}"));
            str.AddColumn(new ReportColumn("Player", "PLAYER", "{0}"));
            str.AddColumn(new ReportColumn("Team", "TEAM", "{0}"));
            str.AddColumn(new ReportColumn("Pos", "POS", "{0}"));
            str.AddColumn(new ReportColumn("RPoints", "PTS", "{0}"));
            str.AddColumn(new ReportColumn("Role", "ROLE", "{0}"));
            str.AddColumn(new ReportColumn("Game", "GAME", "{0}"));
            str.AddColumn(new ReportColumn("OppUnit", "OPPRATE", "{0}"));
            str.AddColumn(new ReportColumn("Spread", "SPREAD", "{0:##.#}"));
            str.AddColumn(new ReportColumn("Total", "TOTAL", "{0:##.#}"));
            str.AddColumn(new ReportColumn("Actual", "ACTUAL", "{0:##}"));
            str.LoadBody(BuildTable());
            str.SetSortOrder("SLOT,PTS DESC");
            str.RenderAsHtml(FileName(), true);
        }
        /// <summary>
        ///   Looks at the EP xml to dump out a report
        /// </summary>
        public void RosterExperience()
        {
            Utility.Announce("NFLRosterReport.RosterExperience - creating simple report");

            CheckPreRequisites();

            var str =
                new SimpleTableReport(string.Format("Roster Experience {0}", Utility.CurrentSeason()));
            str.AddStyle(
                "#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }");
            str.AddStyle("#main { margin-left:1em; }");
            str.AddStyle("#dtStamp { font-size:0.8em; }");
            str.AddStyle(".end { clear: both; }");
            str.AddStyle(".gponame { color:white; background:black }");
            str.ColumnHeadings = true;
            str.DoRowNumbers = true;
            str.ShowElapsedTime = false;
            str.IsFooter = false;
            str.AddColumn(new ReportColumn("Team", "TEAM", "{0}", typeof (String)));
            str.AddColumn(new ReportColumn("Player", "PLAYER", "{0}", typeof (String)));
            str.AddColumn(new ReportColumn("Unit", "UNIT", "{0}", typeof (String)));
            str.AddColumn(new ReportColumn("EP", "EP", "{0}", typeof (Int32), true));
            BuildTable(str);
            str.SetSortOrder("EP DESC");
            str.RenderAsHtml(
                string.Format("{0}Experience-{1}-{2}.htm", Utility.OutputDirectory(), Utility.CurrentSeason(),
                              Utility.CurrentWeek()), true);
        }
Example #11
0
 //public void RenderTeam( string teamCode )
 //{
 //   var team = new NflTeam( teamCode );
 //   RenderTeam( team );
 //}
 public void RenderTeam( NflTeam team, bool skipPostseason )
 {
     if ( team.MetricsHt == null ) LoadTeam( team, team.TeamCode, skipPostseason );
     var metricsHt = team.MetricsHt;
     var str = new SimpleTableReport( string.Format( "Metrics-{0}", team.TeamCode ) );
     str.AddStyle(  "#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 761px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }" );
     str.AddStyle(  "#main { margin-left:1em; }" );
     str.AddStyle(  "#dtStamp { font-size:0.8em; }" );
     str.AddStyle(  ".end { clear: both; }" );
     str.AddStyle(  ".gponame { color:white; background:black }" );
     str.ColumnHeadings = true;
     str.DoRowNumbers = true;
     str.ShowElapsedTime = false;
     str.IsFooter = false;
     str.AddColumn( new ReportColumn( "Week",       "WeekSeed",  "{0}", typeof( String ), false       ) );
     str.AddColumn( new ReportColumn( "OffTDp",      "OffTDp",   "{0}", typeof( Int32 ), true       ) );
     str.AddColumn( new ReportColumn( "Mult",        "AvgOffTDp", "{0:#.#}", typeof( Decimal ), false   ) );
     str.AddColumn( new ReportColumn( "OffTDr",      "OFFTDR",   "{0}", typeof( Int32 ), true       ) );
     str.AddColumn( new ReportColumn( "Mult",         "AvgOffTDr", "{0:#.#}", typeof( Decimal ), false   ) );
     str.AddColumn( new ReportColumn( "OffSAKa",     "OFFSAKa",  "{0}", typeof( Decimal ), true ) );
     str.AddColumn( new ReportColumn( "Mult",         "AvgOffSaka", "{0:#.#}", typeof( Decimal ), false   ) );
     str.AddColumn( new ReportColumn( "DefTDpa",     "DefTDpa",  "{0}", typeof( Int32 ), true       ) );
     str.AddColumn( new ReportColumn( "Mult",         "AvgDefTDp", "{0:#.#}", typeof( Decimal ), false   ) );
     str.AddColumn( new ReportColumn( "DefTDra",     "DEFTDRa",  "{0}", typeof( Int32 ), true       ) );
     str.AddColumn( new ReportColumn( "Mult",         "AvgDefTDr", "{0:#.#}", typeof( Decimal ), false   ) );
     str.AddColumn( new ReportColumn( "DefSAK",      "DEFSAK",   "{0}", typeof( Decimal ), true ) );
     str.AddColumn( new ReportColumn( "Mult",         "AvgDefSak", "{0:#.#}", typeof( Decimal ), false   ) );
     BuildTable( str, metricsHt, team );
     str.SetSortOrder( "WeekSeed" );
      str.RenderAsHtml(string.Format("{0}Metrics-{1}.htm", Utility.OutputDirectory(), team.TeamCode), true);
 }
        private void BuildRatingsTable( SimpleTableReport str, string fTeamOwner, NFLWeek week )
        {
            //RosterLib.Utility.Announce( string.Format("  BuildRatingsTable"));

            if (_teamList == null)
            {
                Utility.Announce( string.Format("  BuildRatingsTable: Loading Teams"));
                LoadTeams();
            }

            if (_teamList != null)
            {
                foreach ( GsTeam t in _teamList )
                    BuildReportDataset( str, fTeamOwner, week, t);
            }
            str.SetSortOrder( "DAY, HOUR, RATING DESC" );
            return;
        }
 public void Render()
 {
     var str = new SimpleTableReport(string.Format("Suggested Lineup {0}:{1:#0} {2}", Season, Week, LeagueId));
      str.AddDenisStyle();
      str.ColumnHeadings = true;
      str.DoRowNumbers = false;
      str.ShowElapsedTime = false;
      str.IsFooter = false;
      str.AddColumn(new ReportColumn("Slot", "SLOT", "{0:00}"));
      str.AddColumn(new ReportColumn("Player", "PLAYER", "{0}"));
      str.AddColumn(new ReportColumn("Team", "TEAM", "{0}"));
      str.AddColumn(new ReportColumn("Pos", "POS", "{0}"));
      str.AddColumn(new ReportColumn("RPoints", "PTS", "{0}"));
      str.AddColumn(new ReportColumn("Role", "ROLE", "{0}"));
      str.AddColumn(new ReportColumn("Game", "GAME", "{0}"));
      str.AddColumn(new ReportColumn("OppUnit", "OPPRATE", "{0}"));
      str.AddColumn(new ReportColumn("Spread", "SPREAD", "{0:##.#}"));
      str.AddColumn(new ReportColumn("Total", "TOTAL", "{0:##.#}"));
      str.AddColumn(new ReportColumn("Actual", "ACTUAL", "{0:##}"));
      str.LoadBody(BuildTable());
      str.SetSortOrder( "SLOT,PTS DESC" );
      str.RenderAsHtml(FileName(), true);
 }
Example #14
0
 private void TeamExperience( DataTable dt )
 {
     var str = new SimpleTableReport("Experience Points : By Team " + _season)
               	{ColumnHeadings = true, DoRowNumbers = true};
     str.AddColumn( new ReportColumn( "Team", "TEAMNAME", "{0,-20}" ) );
     str.AddColumn( new ReportColumn( "EP", "EP", "{0,3}", true ) );
     str.LoadBody( dt );
     str.SetSortOrder( "EP DESC" );
     str.RenderAsHtml(
         string.Format("{0}\\Experience Points\\Teams\\Team-ep{1}-{2}.htm",
              Utility.OutputDirectory(), _season, Utility.CurrentWeek()),
         true );
 }
Example #15
0
 private void RenderPos( string position, SimpleTableReport str )
 {
     str.SetFilter( string.Format( "POS like '%{0}%'", position ) );
     str.SetSortOrder( "EP DESC" );
     str.RenderAsHtml(
         string.Format("{0}Experience Points\\Positional\\ep{3}-{1}-{2}.htm",
              Utility.OutputDirectory(), _season, Utility.CurrentWeek(), position ), true );
 }