コード例 #1
0
ファイル: Controller.cs プロジェクト: prcion/NBA-LEAGUE
        public List <Player> raportTwo(int IDGame, int IDTeam)
        {
            List <Player> list = new List <Player>();

            foreach (ActivePlayer a in activePlayerService.GetAll())
            {
                string[] s = a.ID.Split('.');
                int      id;
                int      idPlayer;
                bool     ok = int.TryParse(s[1], out id);
                if (ok)
                {
                    ok = int.TryParse(s[0], out idPlayer);
                    if (ok)
                    {
                        if (id == IDGame)
                        {
                            var lst = from p in playerService.GetAll()
                                      where p.ID == idPlayer && p.team.ID == IDTeam
                                      select p;
                            foreach (var i in lst)
                            {
                                list.Add(i);
                            }
                        }
                    }
                }
            }
            return(list);
        }