예제 #1
0
        private string GenerateBody()
        {
            var bodyOut = new StringBuilder();

             var ds = Utility.TflWs.GetTeams(Utility.CurrentSeason());
             var dt = ds.Tables[0];
             foreach (DataRow dr in dt.Rows)
             {
            var theKey = dr["TEAMID"].ToString();
            var team = new NflTeam(theKey);
            var inPlayoffs = false;
            if (team.WinningRecord())
            {
               bodyOut.AppendLine(string.Format("{0,-25} {1}", team.NameOut(), team.RecordOut()));
               inPlayoffs = true;
            }
            Utility.TflWs.UpdatePlayoff(team.Season, team.TeamCode, inPlayoffs);
             }

             return bodyOut.ToString();
        }
예제 #2
0
        private string GenerateBody()
        {
            var bodyOut = new StringBuilder();

            var ds = Utility.TflWs.GetTeams(Utility.CurrentSeason());
            var dt = ds.Tables[0];

            foreach (DataRow dr in dt.Rows)
            {
                var theKey     = dr["TEAMID"].ToString();
                var team       = new NflTeam(theKey);
                var inPlayoffs = false;
                if (team.Above500())
                {
                    bodyOut.AppendLine($"{team.NameOut(),-25} {team.RecordOut()}");
                    inPlayoffs = true;
                }
                Utility.TflWs.UpdatePlayoff(team.Season, team.TeamCode, inPlayoffs);
            }

            return(bodyOut.ToString());
        }