private void LoadTeamList(string yearIn)
        {
#if DEBUG
            Utility.Announce(string.Format("LoadTeamList: Loading {0} team List", yearIn));
#endif
            var ds    = Utility.TflWs.GetTeams(yearIn, "");
            var teams = ds.Tables["teams"];
            foreach (DataRow dr in teams.Rows)
            {
                TeamKeyList.Add(yearIn + dr["TEAMID"]);
                TeamList.Add(new NflTeam(dr["TEAMID"].ToString(), yearIn));
            }
#if DEBUG
            Utility.Announce(string.Format("LoadTeamList: Loaded {0} teams.", TeamList.Count));
#endif
        }
Exemple #2
0
        private void LoadTeamList(string yearIn)
        {
            Logger = LogManager.GetCurrentClassLogger();

            Logger.Trace($"LoadTeamList: Loading {yearIn} team List");

            var ds    = Utility.TflWs.GetTeams(yearIn, "");
            var teams = ds.Tables["team"];

            foreach (DataRow dr in teams.Rows)
            {
                TeamKeyList.Add(yearIn + dr["TEAMID"]);
                TeamList.Add(new NflTeam(dr["TEAMID"].ToString(), yearIn));
            }

            Logger.Trace($"LoadTeamList: Loaded {TeamList.Count} teams.");
        }
 private void ProcessTeams(XmlNode n)
 {
     foreach (XmlNode tn in n.ChildNodes)
     {
         if (tn.Attributes != null)
         {
             var teamKey = tn.Attributes["key"].Value;
             TeamKeyList.Add(teamKey);
             foreach (XmlNode rn in tn.ChildNodes)
             {
                 if (rn.Name.Equals("rating-list"))
                 {
                     ProcessRatings(rn, teamKey);
                 }
             }
         }
     }
 }