private void RenderTeams( SimpleTableReport str ) { var dt = new DataTable(); var cols = dt.Columns; cols.Add( "TEAMNAME", typeof ( String ) ); cols.Add( "EP", typeof ( Int32 ) ); foreach ( DataRow dr in _teams.Rows ) { var teamCode = dr[ "TEAMID" ].ToString(); str.SetFilter( string.Format( "TEAMCODE='{0}'", teamCode ) ); str.RenderAsHtml( string.Format("{0}Experience Points//ep-t-{3}-{1}-{2}.htm", Utility.OutputDirectory(), _season, Utility.CurrentWeek(), teamCode ), true ); // ask str what the tot was var ep = string.Format( "{0}", str.LastTotal ); // store it in a DataTable var tdr = dt.NewRow(); tdr[ "TEAMNAME" ] = Utility.TflWs.TeamFor( teamCode, _season ); tdr[ "EP" ] = ep; dt.Rows.Add( tdr ); } // throw the dt at a Reporter TeamExperience( dt ); }
private void RenderUnit( string unitCode, SimpleTableReport str ) { str.SetFilter( string.Format( "UNITCODE='{0}'", unitCode ) ); str.RenderAsHtml( string.Format( "{0}Experience Points\\Units\\ep{3}-{1}-{2}.htm", Utility.OutputDirectory(), _season, Utility.CurrentWeek(), unitCode ), true ); }
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 ); }