private void LoadAtsPredictions(string season, string method) { var ds = Utility.TflWs.GetAllPredictions(season, method); var totPredictions = ds.Tables["prediction"].Rows.Count; Utility.Announce(string.Format("{0} predictions loaded for method {1}", totPredictions, method)); if (totPredictions > 0) { var winLoss = new WinLossRecord(0, 0, 0); foreach (var result in from DataRow dr in ds.Tables["prediction"].Rows select new Prediction(dr) into prediction select prediction.CheckResultAts()) { switch (result) { case TipResult.Correct: winLoss.Wins++; break; case TipResult.Incorrect: winLoss.Losses++; break; default: winLoss.Ties++; break; } } Tipsters.Add(method, winLoss); } }
private void LoadAtsPredictions( string season, string method ) { var ds = Utility.TflWs.GetAllPredictions( season, method ); var totPredictions = ds.Tables["prediction"].Rows.Count; Utility.Announce( string.Format( "{0} predictions loaded for method {1}", totPredictions, method ) ); if ( totPredictions > 0) { var winLoss = new WinLossRecord( 0, 0, 0 ); foreach ( var result in from DataRow dr in ds.Tables[ "prediction" ].Rows select new Prediction( dr ) into prediction select prediction.CheckResultAts() ) { switch ( result ) { case TipResult.Correct: winLoss.Wins++; break; case TipResult.Incorrect: winLoss.Losses++; break; default: winLoss.Ties++; break; } } Tipsters.Add( method, winLoss ); } }