private void CheckStatsForWeek(int week) { NflWeek = new NFLWeek(Season, week); var statFactory = new StatFactory(); var ds = Utility.TflWs.PlayerStatsDs(Season, String.Format("{0:0#}", week)); var dt = ds.Tables["stat"]; foreach (DataRow dr in dt.Rows) { StatsChecked++; var stat = statFactory.CreateStat(dr["STAT"].ToString()); if (stat != null) { stat.Load(dr); #if DEBUG stat.Dump(); #endif if (stat.IsValid()) { if (!stat.IsReasonable()) { Warn(string.Format("{0} {1} not valid", stat.Name, stat.Quantity), stat); } } else { Error(stat); } } } }
public void CheckStats() { if (string.IsNullOrEmpty(Season)) { RosterLib.Utility.Announce("Please specify the Season and Week"); } else { NflWeek = new NFLWeek(Season, Week); var statFactory = new StatFactory(); var ds = Utility.TflWs.PlayerStatsDs(Season, String.Format("{0:0#}", Week)); var dt = ds.Tables["stat"]; foreach (DataRow dr in dt.Rows) { StatsChecked++; var stat = statFactory.CreateStat(dr["STAT"].ToString()); if (stat != null) { stat.Load(dr); #if DEBUG //stat.Dump(); #endif if (stat.IsValid()) { if (!stat.IsReasonable()) { Warn(string.Format("{0} {1} not valid", stat.Name, stat.Quantity), stat); } } else { Error(stat); } } } } ReportResults(StatsChecked, "Stats"); }
private void CheckStatsForWeek( int week ) { NflWeek = new NFLWeek(Season, week); var statFactory = new StatFactory(); var ds = Utility.TflWs.PlayerStatsDs(Season, String.Format("{0:0#}", week)); var dt = ds.Tables["stat"]; foreach (DataRow dr in dt.Rows) { StatsChecked++; var stat = statFactory.CreateStat(dr["STAT"].ToString()); if (stat != null) { stat.Load(dr); #if DEBUG stat.Dump(); #endif if (stat.IsValid()) { if (!stat.IsReasonable()) Warn(string.Format("{0} {1} not valid", stat.Name, stat.Quantity), stat); } else Error(stat); } } }