public gameInitScene(string localPlayerIdentity) { if (localPlayerIdentity == GameData.Static.PlayerIdentity.PLAYER_UP) { localPlayerInfo = new localPlayer(localPlayerIdentity); otherPlayerInfo = new otherPlayer(GameData.Static.PlayerIdentity.PLAYER_DOWN); } else if (localPlayerIdentity == GameData.Static.PlayerIdentity.PLAYER_DOWN) { localPlayerInfo = new localPlayer(localPlayerIdentity); otherPlayerInfo = new otherPlayer(GameData.Static.PlayerIdentity.PLAYER_UP); } else { throw new System.Exception("Expected local player Identity, but[" + localPlayerIdentity + "] found"); } this.localPlayerIdentity = localPlayerIdentity; }
private void BuildData() { List <MyTeam> teamList = new List <MyTeam>(); List <localPlayer> playerList = new List <localPlayer>(); using (FF2014Entities ptx = new FF2014Entities()) { var _players = from p in ptx.FF_Player where p.DRAFTED == false select p; foreach (var p in _players) { localPlayer l = new localPlayer(); l.ID = p.ID; l.FIRST = p.FIRST; l.LAST = p.LAST; l.FullName = p.FIRST.Trim() + " " + p.LAST.Trim(); l.OVERALL = p.OVERALL; l.ADP = p.ADP; l.Team = p.TEAM; l.Bye = p.BYE; l.Pos = p.POS; l.VDB = p.VBD; l.Pts = p.PTS; l.Drafted = p.DRAFTED; l.MyTeam = p.MYTEAM; l.SID = p.SID; playerList.Add(l); } getCounters(ptx); } rptPlayers.DataSource = playerList.OrderBy(x => x.OVERALL); rptPlayers.DataBind(); updateTeam(); teamList.Add(team); rptMyTeam.DataSource = teamList; rptMyTeam.DataBind(); }