Пример #1
0
        public void LoadTeams()
        {
            _teamList = new ArrayList();
            //  Part 1 - Get the Teams for the season
            DataSet   ds = _tflWs.GetFTeamsDs(Season, CompCode);
            DataTable dt = ds.Tables["comp"];

            //  Part 2 - Iterate through the teams
            foreach (DataRow dr in dt.Rows)
            {
                GsTeam t = new GsTeam(dr, CompCode, this);

                _teamList.Add(t);
            }
        }
Пример #2
0
        public void LoadTeams()
        {
            var teamCount = 0;

            _teamList = new ArrayList();
            //  Part 1 - Get the Teams for the season
            var ds = _tflWs.GetFTeamsDs(Season, CompCode);
            var dt = ds.Tables["comp"];

            //  Part 2 - Iterate through the teams
            foreach (var t in from DataRow dr in dt.Rows
                     select new GsTeam(dr, CompCode, this))
            {
                _teamList.Add(t);
                teamCount++;
            }
            if (teamCount == 0)
            {
                Utility.Announce(string.Format(
                                     "GridStatsLeague:LoadTeams did not fond any teams for {0}:{1}",
                                     CompCode, Season));
            }
        }