Exemplo n.º 1
0
        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
        }
Exemplo n.º 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.");
        }
Exemplo n.º 3
0
 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);
                 }
             }
         }
     }
 }