public void Save(PlayerGameMetrics pgm) { string commandStr; var oldPgm = Get(pgm.PlayerId, pgm.GameKey); if (oldPgm.IsEmpty) { Utility.TflWs.InsertPlayerGameMetric( pgm.PlayerId, pgm.GameKey, pgm.ProjYDp, pgm.YDp, pgm.ProjYDr, pgm.YDr, pgm.ProjTDp, pgm.TDp, pgm.ProjTDr, pgm.TDr, pgm.ProjTDc, pgm.TDc, pgm.ProjYDc, pgm.YDc, pgm.ProjFG, pgm.FG, pgm.ProjPat, pgm.Pat, pgm.FantasyPoints ); commandStr = "Player Metric not found"; } else { commandStr = Utility.TflWs.UpdatePlayerGameMetric( pgm.PlayerId, pgm.GameKey, pgm.ProjYDp, pgm.YDp, pgm.ProjYDr, pgm.YDr, pgm.ProjTDp, pgm.TDp, pgm.ProjTDr, pgm.TDr, pgm.ProjTDc, pgm.TDc, pgm.ProjYDc, pgm.YDc, pgm.ProjFG, pgm.FG, pgm.ProjPat, pgm.Pat ); #if DEBUG Utility.Announce($"Command is {commandStr} on {Utility.TflWs.NflConnectionString}"); #endif } }
private void AddCatchingPlayerGameMetric( PlayerGameProjectionMessage input, string playerId, int projYDc, int projTDc) { if (input == null || playerId == null) { return; } if (string.IsNullOrEmpty(playerId) || input.Game == null) { return; } var pgm = new PlayerGameMetrics { PlayerId = playerId, GameKey = input.Game.GameKey(), ProjYDc = projYDc, ProjTDc = projTDc }; #if DEBUG Utility.Announce(pgm.ToString()); #endif input.Game.PlayerGameMetrics.Add(pgm); }
public PlayerGameMetrics GetPlayerWeek(string gameCode, string playerId) { var pgm = new PlayerGameMetrics(); var ds = Utility.TflWs.GetPlayerGameMetrics(playerId, gameCode); var dt = ds.Tables[0]; foreach (DataRow dr in dt.Rows) { pgm.PlayerId = dr["PLAYERID"].ToString(); pgm.GameKey = dr["GAMECODE"].ToString(); pgm.ProjTDp = IntValue(dr, "projtdp"); pgm.ProjTDr = DecimalValue(dr, "projtdr"); pgm.ProjTDc = IntValue(dr, "projtdc"); pgm.ProjYDp = IntValue(dr, "projydp"); pgm.ProjYDr = IntValue(dr, "projydr"); pgm.ProjYDc = IntValue(dr, "projydc"); pgm.ProjFG = IntValue(dr, "projfg"); pgm.ProjPat = IntValue(dr, "projpat"); pgm.TDp = IntValue(dr, "tdp"); pgm.TDr = IntValue(dr, "tdr"); pgm.TDc = IntValue(dr, "tdc"); pgm.YDp = IntValue(dr, "ydp"); pgm.YDr = IntValue(dr, "ydr"); pgm.YDc = IntValue(dr, "ydc"); pgm.FG = IntValue(dr, "fg"); pgm.Pat = IntValue(dr, "pat"); break; } return(pgm); }
public PlayerGameMetrics GetPlayerWeek(string gameCode, string playerId ) { var pgm = new PlayerGameMetrics(); var ds = Utility.TflWs.GetPlayerGameMetrics( playerId, gameCode); var dt = ds.Tables[0]; foreach (DataRow dr in dt.Rows) { pgm.PlayerId = dr["PLAYERID"].ToString(); pgm.GameKey = dr["GAMECODE"].ToString(); pgm.ProjTDp = IntValue(dr, "projtdp"); pgm.ProjTDr = DecimalValue(dr, "projtdr"); pgm.ProjTDc = IntValue(dr, "projtdc"); pgm.ProjYDp = IntValue(dr, "projydp"); pgm.ProjYDr = IntValue(dr, "projydr"); pgm.ProjYDc = IntValue(dr, "projydc"); pgm.ProjFG = IntValue(dr, "projfg"); pgm.ProjPat = IntValue(dr, "projpat"); pgm.TDp = IntValue( dr, "tdp" ); pgm.TDr = IntValue( dr, "tdr" ); pgm.TDc = IntValue( dr, "tdc" ); pgm.YDp = IntValue( dr, "ydp" ); pgm.YDr = IntValue( dr, "ydr" ); pgm.YDc = IntValue( dr, "ydc" ); pgm.FG = IntValue( dr, "fg" ); pgm.Pat = IntValue( dr, "pat" ); break; } return pgm; }
public void SaveActuals(PlayerGameMetrics pgm, decimal fpts) { string commandStr; var oldPgm = Get(pgm.PlayerId, pgm.GameKey); if (oldPgm.IsEmpty) { Utility.TflWs.InsertPlayerGameMetric( pgm.PlayerId, pgm.GameKey, pgm.ProjYDp, pgm.YDp, pgm.ProjYDr, pgm.YDr, pgm.ProjTDp, pgm.TDp, pgm.ProjTDr, pgm.TDr, pgm.ProjTDc, pgm.TDc, pgm.ProjYDc, pgm.YDc, pgm.ProjFG, pgm.FG, pgm.ProjPat, pgm.Pat, fpts ); commandStr = "Player Metric not found"; } else { commandStr = Utility.TflWs.UpdatePlayerGameMetricWithActuals( pgm.PlayerId, pgm.GameKey, pgm.YDp, pgm.YDr, pgm.TDp, pgm.TDr, pgm.TDc, pgm.YDc, pgm.FG, pgm.Pat, fpts ); } #if DEBUG Utility.Announce(string.Format("Command is {0} on {1}", commandStr, Utility.TflWs.NflConnectionString)); #endif }
public List <PlayerGameMetrics> GetWeek(string season, string week) { var pgmList = new List <PlayerGameMetrics>(); DataSet ds = Utility.TflWs.GetAllPlayerGameMetrics(season, week); DataTable dt = ds.Tables[0]; foreach (DataRow dr in dt.Rows) { var pgm = new PlayerGameMetrics(); pgm.PlayerId = dr["PLAYERID"].ToString(); pgm.GameKey = dr["GAMECODE"].ToString(); pgm.ProjTDp = IntValue(dr, "projtdp"); pgm.ProjTDr = IntValue(dr, "projtdr"); pgm.ProjTDc = IntValue(dr, "projtdc"); pgm.ProjYDp = IntValue(dr, "projydp"); pgm.ProjYDr = IntValue(dr, "projydr"); pgm.ProjYDc = IntValue(dr, "projydc"); pgm.ProjFG = IntValue(dr, "projfg"); pgm.ProjPat = IntValue(dr, "projpat"); pgmList.Add(pgm); } #if DEBUG Utility.Announce(string.Format("Metric records loaded : {0}", pgmList.Count)); #endif return(pgmList); }
public List <PlayerGameMetrics> GetSeason(string season, string playerCode) { var pgmList = new List <PlayerGameMetrics>(); var ds = Utility.TflWs.GetAllPlayerGameMetricsForPlayer(season, playerCode); var dt = ds.Tables[0]; foreach (DataRow dr in dt.Rows) { var pgm = new PlayerGameMetrics { PlayerId = dr["PLAYERID"].ToString(), GameKey = dr["GAMECODE"].ToString(), ProjTDp = IntValue(dr, "projtdp"), ProjTDr = DecimalValue(dr, "projtdr"), ProjTDc = IntValue(dr, "projtdc"), ProjYDp = IntValue(dr, "projydp"), ProjYDr = IntValue(dr, "projydr"), ProjYDc = IntValue(dr, "projydc"), ProjFG = IntValue(dr, "projfg"), ProjPat = IntValue(dr, "projpat") }; pgmList.Add(pgm); } #if DEBUG Utility.Announce(string.Format("Metric records loaded : {0}", pgmList.Count)); #endif return(pgmList); }
private void AddKickingPlayerGameMetric(PlayerGameProjectionMessage input, string playerId, int projFg, int projPat) { var pgm = new PlayerGameMetrics(); pgm.PlayerId = playerId; pgm.GameKey = input.Game.GameKey(); pgm.ProjFG = projFg; pgm.ProjPat = projPat; input.Game.PlayerGameMetrics.Add(pgm); }
private static void AddKickingPlayerGameMetric(PlayerGameProjectionMessage input, string playerId, int projFg, int projPat) { if (input == null || playerId == null) return; var pgm = new PlayerGameMetrics { PlayerId = playerId, GameKey = input.Game.GameKey(), ProjFG = projFg, ProjPat = projPat }; input.Game.PlayerGameMetrics.Add(pgm); }
private void AddPassinglayerGameMetric(PlayerGameProjectionMessage input, string playerId, int projYDp, int projTDp) { var pgm = new PlayerGameMetrics(); pgm.PlayerId = playerId; pgm.GameKey = input.Game.GameKey(); pgm.ProjYDp = projYDp; pgm.ProjTDp = projTDp; #if DEBUG Utility.Announce(pgm.ToString()); #endif input.Game.PlayerGameMetrics.Add(pgm); }
private void AddCatchingPlayerGameMetric(PlayerGameProjectionMessage input, string playerId, int projYDc, int projTDc) { var pgm = new PlayerGameMetrics(); pgm.PlayerId = playerId; pgm.GameKey = input.Game.GameKey(); pgm.ProjYDc = projYDc; pgm.ProjTDc = projTDc; #if DEBUG //Utility.Announce( pgm.ToString() ); #endif input.Game.PlayerGameMetrics.Add(pgm); }
public PlayerGameMetrics GetPgmFor(string playerId) { var pgm = new PlayerGameMetrics(); foreach (var m in Game.PlayerGameMetrics) { if (m.PlayerId.Equals(playerId)) { pgm = m; break; } } return(pgm); }
public PlayerGameMetrics Get(string playerCode, string gameCode) { PlayerGameMetrics pgm; var ds = Utility.TflWs.GetPlayerGameMetrics(playerCode, gameCode); if (ds.Tables[0].Rows.Count > 0) { pgm = new PlayerGameMetrics { PlayerId = playerCode, GameKey = gameCode, ProjTDp = IntValue(ds, "projtdp"), ProjTDr = DecimalValue(ds, "projtdr"), ProjTDc = IntValue(ds, "projtdc"), ProjYDp = IntValue(ds, "projydp"), ProjYDr = IntValue(ds, "projydr"), ProjYDc = IntValue(ds, "projydc"), ProjFG = IntValue(ds, "projfg"), ProjPat = IntValue(ds, "projpat"), TDp = IntValue(ds, "tdp"), TDr = IntValue(ds, "tdr"), TDc = IntValue(ds, "tdc"), YDp = IntValue(ds, "ydp"), YDr = IntValue(ds, "ydr"), YDc = IntValue(ds, "ydc"), FG = IntValue(ds, "fg"), Pat = IntValue(ds, "pat"), FantasyPoints = DecimalValue(ds, "YahooPts"), IsEmpty = false }; } else { pgm = new PlayerGameMetrics() { PlayerId = playerCode, GameKey = gameCode, ProjTDp = 0, ProjTDr = 0M, ProjTDc = 0, ProjYDp = 0, ProjYDr = 0, ProjYDc = 0, ProjFG = 0, ProjPat = 0 }; } return(pgm); }
public void Update(PlayerGameMetrics pgm) { var index = Pgms.FindIndex(i => i.PlayerId == pgm.PlayerId); if (index == -1) { pgm.GameKey = GameKey; Pgms.Add(pgm); } else { Pgms[index] = pgm; } }
private static void AddPassinglayerGameMetric( PlayerGameProjectionMessage input, string playerId, int projYDp, int projTDp ) { if (input == null || playerId == null) return; var pgm = new PlayerGameMetrics { PlayerId = playerId, GameKey = input.Game.GameKey(), ProjYDp = projYDp, ProjTDp = projTDp }; #if DEBUG Utility.Announce(pgm.ToString()); #endif input.Game.PlayerGameMetrics.Add(pgm); }
public PlayerGameMetrics Get(string playerCode, string gameCode) { PlayerGameMetrics pgm; var ds = Utility.TflWs.GetPlayerGameMetrics(playerCode, gameCode); if (ds.Tables[0].Rows.Count > 0) { pgm = new PlayerGameMetrics { PlayerId = playerCode, GameKey = gameCode, ProjTDp = IntValue( ds, "projtdp" ), ProjTDr = DecimalValue( ds, "projtdr" ), ProjTDc = IntValue( ds, "projtdc" ), ProjYDp = IntValue( ds, "projydp" ), ProjYDr = IntValue( ds, "projydr" ), ProjYDc = IntValue( ds, "projydc" ), ProjFG = IntValue( ds, "projfg" ), ProjPat = IntValue( ds, "projpat" ), TDp = IntValue(ds, "tdp"), TDr = IntValue(ds, "tdr"), TDc = IntValue(ds, "tdc"), YDp = IntValue(ds, "ydp"), YDr = IntValue(ds, "ydr"), YDc = IntValue(ds, "ydc"), FG = IntValue(ds, "fg"), Pat = IntValue(ds, "pat"), FantasyPoints = DecimalValue(ds, "YahooPts"), IsEmpty = false }; } else { pgm = new PlayerGameMetrics(); pgm.PlayerId = playerCode; pgm.GameKey = gameCode; pgm.ProjTDp = 0; pgm.ProjTDr = 0M; pgm.ProjTDc = 0; pgm.ProjYDp = 0; pgm.ProjYDr = 0; pgm.ProjYDc = 0; pgm.ProjFG = 0; pgm.ProjPat = 0; } return pgm; }
private static void AddPlayerGameMetric(PlayerGameProjectionMessage input, string playerId, int projYDr, int projTDr) { var pgm = new PlayerGameMetrics(); pgm.PlayerId = playerId; pgm.GameKey = input.Game.GameKey(); pgm.ProjYDr = projYDr; pgm.ProjTDr = projTDr; #if DEBUG Utility.Announce(pgm.ToString()); #endif if (input.Game.PlayerGameMetrics == null) { input.Game.PlayerGameMetrics = new List <PlayerGameMetrics>(); } input.Game.PlayerGameMetrics.Add(pgm); }
private static void AddKickingPlayerGameMetric(PlayerGameProjectionMessage input, string playerId, int projFg, int projPat) { if (input == null || playerId == null) { return; } var pgm = new PlayerGameMetrics { PlayerId = playerId, GameKey = input.Game.GameKey(), ProjFG = projFg, ProjPat = projPat }; input.Game.PlayerGameMetrics.Add(pgm); }
private static void AddPassinglayerGameMetric(PlayerGameProjectionMessage input, string playerId, int projYDp, int projTDp) { if (input == null || playerId == null) { return; } var pgm = new PlayerGameMetrics { PlayerId = playerId, GameKey = input.Game.GameKey(), ProjYDp = projYDp, ProjTDp = projTDp }; #if DEBUG Utility.Announce(pgm.ToString()); #endif input.Game.PlayerGameMetrics.Add(pgm); }
public decimal ProjectedStatsOfType(string forStatType, PlayerGameMetrics pgm) { var qty = 0.0M; switch (forStatType) { case Constants.K_STATCODE_RECEPTION_YARDS: qty = pgm.ProjYDc; break; case Constants.K_STATCODE_RUSHING_YARDS: qty = pgm.ProjYDr; break; case Constants.K_STATCODE_PASSING_YARDS: qty = pgm.ProjYDp; break; } return(qty); }
public PlayerGameMetrics Get(string playerCode, string gameCode) { PlayerGameMetrics pgm = null; var ds = Utility.TflWs.GetPlayerGameMetrics(playerCode, gameCode); if (ds.Tables[0].Rows.Count == 1) { pgm = new PlayerGameMetrics(); pgm.PlayerId = playerCode; pgm.GameKey = gameCode; pgm.ProjTDp = IntValue(ds, "projtdp"); pgm.ProjTDr = IntValue(ds, "projtdr"); pgm.ProjTDc = IntValue(ds, "projtdc"); pgm.ProjYDp = IntValue(ds, "projydp"); pgm.ProjYDr = IntValue(ds, "projydr"); pgm.ProjYDc = IntValue(ds, "projydc"); pgm.ProjFG = IntValue(ds, "projfg"); pgm.ProjPat = IntValue(ds, "projpat"); } return(pgm); }
public void Save(PlayerGameMetrics pgm) { var oldPgm = Get(pgm.PlayerId, pgm.GameKey); if (oldPgm == null) { Utility.TflWs.InsertPlayerGameMetric( pgm.PlayerId, pgm.GameKey, pgm.ProjYDp, pgm.YDp, pgm.ProjYDr, pgm.YDr, pgm.ProjTDp, pgm.TDp, pgm.ProjTDr, pgm.TDr, pgm.ProjTDc, pgm.TDc, pgm.ProjYDc, pgm.YDc, pgm.ProjFG, pgm.FG, pgm.ProjPat, pgm.Pat ); } else { Utility.TflWs.UpdatePlayerGameMetric( pgm.PlayerId, pgm.GameKey, pgm.ProjYDp, pgm.YDp, pgm.ProjYDr, pgm.YDr, pgm.ProjTDp, pgm.TDp, pgm.ProjTDr, pgm.TDr, pgm.ProjTDc, pgm.TDc, pgm.ProjYDc, pgm.YDc, pgm.ProjFG, pgm.FG, pgm.ProjPat, pgm.Pat ); } }
public List <PlayerGameMetrics> GetGame(string gameCode) { var pgmList = new List <PlayerGameMetrics>(); DataSet ds = Utility.TflWs.GetPlayerGameMetrics(gameCode); DataTable dt = ds.Tables[0]; foreach (DataRow dr in dt.Rows) { var pgm = new PlayerGameMetrics() { PlayerId = dr["PLAYERID"].ToString(), GameKey = dr["GAMECODE"].ToString(), ProjTDp = IntValue(dr, "projtdp"), ProjTDr = DecimalValue(dr, "projtdr"), ProjTDc = IntValue(dr, "projtdc"), ProjYDp = IntValue(dr, "projydp"), ProjYDr = IntValue(dr, "projydr"), ProjYDc = IntValue(dr, "projydc"), ProjFG = IntValue(dr, "projfg"), ProjPat = IntValue(dr, "projpat"), TDp = IntValue(dr, "tdp"), TDr = IntValue(dr, "tdr"), TDc = IntValue(dr, "tdc"), YDp = IntValue(dr, "ydp"), YDr = IntValue(dr, "ydr"), YDc = IntValue(dr, "ydc"), FG = IntValue(dr, "fg"), Pat = IntValue(dr, "pat") }; pgmList.Add(pgm); } #if DEBUG2 Utility.Announce($"Metric records loaded : {pgmList.Count}"); #endif return(pgmList); }
private string PlayerProjectionsHtml(NflTeam nflTeam) { var html = HtmlLib.H4(nflTeam.NameOut()) + Environment.NewLine; html += HtmlLib.TableWithBorderOpen(); if (nflTeam.PlayerList.Count == 0) nflTeam.LoadPlayerUnits(); if (PgmDao == null) PgmDao = new DbfPlayerGameMetricsDao(); if (GameWeek == null) GameWeek = new NFLWeek( Season, Week ); var scorer = new YahooProjectionScorer(); var nPlayers = 0; var nTotPts = 0.0M; var totPgm = new PlayerGameMetrics(); foreach (NFLPlayer p in nflTeam.PlayerList) { if (!p.IsFantasyOffence()) continue; nPlayers++; var pgm = PgmDao.Get(p.PlayerCode, GameKey()); if (nPlayers == 1) html += pgm.PgmHeaderRow(); if (!pgm.HasNumbers()) continue; SetProjectedStats( p, pgm ); var fpts = scorer.RatePlayer( p, GameWeek ); nTotPts += fpts; html += HtmlLib.Para(pgm.FormatAsTableRow(p.PlayerName, p.PlayerRole, fpts)) + Environment.NewLine; totPgm.ProjYDp += pgm.ProjYDp; totPgm.ProjTDp += pgm.ProjTDp; totPgm.ProjYDr += pgm.ProjYDr; totPgm.ProjTDr += pgm.ProjTDr; totPgm.ProjYDc += pgm.ProjYDc; totPgm.ProjTDc += pgm.ProjTDc; totPgm.ProjFG += pgm.ProjFG; totPgm.ProjPat += pgm.ProjPat; } html += HtmlLib.Para(totPgm.FormatAsTableRow("Totals", "", nTotPts)) + Environment.NewLine; html += HtmlLib.TableClose(); return html; }
private static void AddPlayerGameMetric( PlayerGameProjectionMessage input, string playerId, int projYDr, decimal projTDr ) { var pgm = new PlayerGameMetrics { PlayerId = playerId, GameKey = input.Game.GameKey(), ProjYDr = projYDr, ProjTDr = projTDr }; #if DEBUG Utility.Announce( pgm.ToString() ); #endif if (input.Game.PlayerGameMetrics == null) input.Game.PlayerGameMetrics = new List<PlayerGameMetrics>(); input.Game.PlayerGameMetrics.Add( pgm ); }
public decimal ProjectedStatsOfType( string forStatType, PlayerGameMetrics pgm ) { var qty = 0.0M; switch (forStatType) { case Constants.K_STATCODE_RECEPTION_YARDS: qty = pgm.ProjYDc; break; case Constants.K_STATCODE_RUSHING_YARDS: qty = pgm.ProjYDr; break; case Constants.K_STATCODE_PASSING_YARDS: qty = pgm.ProjYDp; break; } return qty; }
public void SaveActuals(PlayerGameMetrics pgm) { string commandStr; var oldPgm = Get(pgm.PlayerId, pgm.GameKey); if (oldPgm.IsEmpty) { Utility.TflWs.InsertPlayerGameMetric( pgm.PlayerId, pgm.GameKey, pgm.ProjYDp, pgm.YDp, pgm.ProjYDr, pgm.YDr, pgm.ProjTDp, pgm.TDp, pgm.ProjTDr, pgm.TDr, pgm.ProjTDc, pgm.TDc, pgm.ProjYDc, pgm.YDc, pgm.ProjFG, pgm.FG, pgm.ProjPat, pgm.Pat, pgm.FantasyPoints ); commandStr = "Player Metric not found"; } else { commandStr = Utility.TflWs.UpdatePlayerGameMetricWithActuals( pgm.PlayerId, pgm.GameKey, pgm.YDp, pgm.YDr, pgm.TDp, pgm.TDr, pgm.TDc, pgm.YDc, pgm.FG, pgm.Pat, pgm.FantasyPoints ); } #if DEBUG Utility.Announce(string.Format("Command is {0} on {1}", commandStr, Utility.TflWs.NflConnectionString)); #endif }
private void SetProjectedStats( NFLPlayer p, PlayerGameMetrics pgm ) { p.ProjectedFg = pgm.ProjFG; p.ProjectedPat = pgm.ProjPat; p.ProjectedReceptions = pgm.ProjRec; p.ProjectedTDc = pgm.ProjTDc; p.ProjectedTDp = pgm.ProjTDp; p.ProjectedTDr = pgm.ProjTDr; p.ProjectedYDp = pgm.ProjYDp; p.ProjectedYDr = pgm.ProjYDr; p.ProjectedYDc = pgm.ProjYDc; }
public List<PlayerGameMetrics> GetSeason(string season, string playerCode) { var pgmList = new List<PlayerGameMetrics>(); var ds = Utility.TflWs.GetAllPlayerGameMetricsForPlayer(season, playerCode ); var dt = ds.Tables[0]; foreach (DataRow dr in dt.Rows) { var pgm = new PlayerGameMetrics { PlayerId = dr[ "PLAYERID" ].ToString(), GameKey = dr[ "GAMECODE" ].ToString(), ProjTDp = IntValue( dr, "projtdp" ), ProjTDr = DecimalValue( dr, "projtdr" ), ProjTDc = IntValue( dr, "projtdc" ), ProjYDp = IntValue( dr, "projydp" ), ProjYDr = IntValue( dr, "projydr" ), ProjYDc = IntValue( dr, "projydc" ), ProjFG = IntValue( dr, "projfg" ), ProjPat = IntValue( dr, "projpat" ) }; pgmList.Add(pgm); } #if DEBUG Utility.Announce(string.Format("Metric records loaded : {0}", pgmList.Count)); #endif return pgmList; }
public List<PlayerGameMetrics> GetWeek(string season, string week) { var pgmList = new List<PlayerGameMetrics>(); DataSet ds = Utility.TflWs.GetAllPlayerGameMetrics(season, week); DataTable dt = ds.Tables[0]; foreach (DataRow dr in dt.Rows) { var pgm = new PlayerGameMetrics(); pgm.PlayerId = dr["PLAYERID"].ToString(); pgm.GameKey = dr["GAMECODE"].ToString(); pgm.ProjTDp = IntValue(dr, "projtdp"); pgm.ProjTDr = IntValue(dr, "projtdr"); pgm.ProjTDc = IntValue(dr, "projtdc"); pgm.ProjYDp = IntValue(dr, "projydp"); pgm.ProjYDr = IntValue(dr, "projydr"); pgm.ProjYDc = IntValue(dr, "projydc"); pgm.ProjFG = IntValue(dr, "projfg"); pgm.ProjPat = IntValue(dr, "projpat"); pgmList.Add(pgm); } #if DEBUG Utility.Announce(string.Format("Metric records loaded : {0}", pgmList.Count)); #endif return pgmList; }
private void AddCatchingPlayerGameMetric(PlayerGameProjectionMessage input, string playerId, int projYDc, int projTDc) { if (input == null || playerId == null) return; if (string.IsNullOrEmpty( playerId ) || input.Game == null) return; var pgm = new PlayerGameMetrics { PlayerId = playerId, GameKey = input.Game.GameKey(), ProjYDc = projYDc, ProjTDc = projTDc }; #if DEBUG Utility.Announce(pgm.ToString()); #endif input.Game.PlayerGameMetrics.Add(pgm); }