protected ICountryDetails GetContryDetailsModel(Country country)
 {
     return new CountryDetails
                             {
                                 EnglishName = country.EnglishName,
                                 LeagueID = country.HtCountryId,
                                 LeagueInWhoScored = country.CountryInWhoScored,
                                 LeagueName = country.CountryName,
                                 NumberOfLevels = country.NumberOfLevels,
                                 SeasonOffset = country.SeasonOffset,
                             };
 }
Beispiel #2
0
 public virtual void SetCountry(Country country)
 {
     country.Series.Add(this);
     Country = country;
 }
Beispiel #3
0
 private List<SelectListItem> GetSeriesForCountry(Country country, IList<Series> seriesFullDetails)
 {
     var leagues = new List<SelectListItem>();
     foreach (var series in country.SupportedSeriesId)
     {
         if (seriesFullDetails.Select(s => s.HtSeriesId).Contains(series.HtSeriesId))
         {
             var item = seriesFullDetails.First(s => s.HtSeriesId == series.HtSeriesId);
             leagues.Add(new SelectListItem
                             {
                                 Text = item.LeagueLevelUnitName,
                                 Value = item.HtSeriesId.ToString()
                             });
         }
         else
         {
             leagues.Add(new SelectListItem
                             {
                                 Text = series.HtSeriesId.ToString(),
                                 Value = series.HtSeriesId.ToString()
                             });
         }
     }
     return leagues;
 }
Beispiel #4
0
        private List<SelectListItem> GetSeasonsForCountry(Country country, Model.Settings settings)
        {
            var seasons = new List<SelectListItem>();
            int numberOfSeasons = settings.GlobalSeason + country.SeasonOffset;

            for (int i = numberOfSeasons; i >= 1; i--)
            {
                seasons.Add(new SelectListItem
                                {Text = i.ToString(), Value = i.ToString(), Selected = i == numberOfSeasons});
            }
            return seasons;
        }