public ActionResult GetSeasons(int LeagueID)
 {
     ViewSeasons vss = new ViewSeasons();
     try
     {
         vss.ViewSeasonList = GetViewSeasonList(LeagueID);
     }
     catch (Exception ex)
     {
         LogController.LogError(ex, LogEntryType.NormalError, "", "", "SystemUserID=" + base.CurrentUser.SystemUserID.ToString(), "");
     }
     return PartialView("_Seasons", vss);
 }
        private ViewSeasons GetSeasons(int LeagueID)
        {
            ViewSeasons vss = new ViewSeasons();
            vss.LeagueID = LeagueID;

            LeagueCollection leagues = BizMgr.GetLeaguesBySystemUserID(this.CurrentUser.SystemUserID);
            var lgs = leagues.Where<League>(l => l.LeagueID == LeagueID && l.IsAdmin);
            vss.IsAdmin = lgs.Count() > 0;

            SeasonCollection seasons = BizMgr.GetSeasonsByLeagueIDSystemUserID(LeagueID, this.CurrentUser.SystemUserID);
            ViewSeason vs;
            foreach (Season season in seasons)
            {
                vs = new ViewSeason();
                vs.LeagueDescription = season.Description;
                vs.LeagueID = season.LeagueID;
                vs.SeasonID = season.SeasonID;
                vs.StartDate = season.StartDate;
                vs.EndDate = season.EndDate;
                vs.LeagueID = season.LeagueID;
                vs.IsAdmin = season.IsAdmin;
                vss.ViewSeasonList.Add(vs);
            }
            return vss;
        }