private List<SelectListItem> GetReasonList()
 {
     List<SelectListItem> list = new List<SelectListItem>();
     list.Add(new SelectListItem() { Text = "I need to add some players to the site", Value = ((int)ContactReason.AddPlayers).ToString()});
     list.Add(new SelectListItem() { Text = "I've found a bug", Value = ((int)ContactReason.FoundBug).ToString() });
     list.Add(new SelectListItem() { Text = "I need some help with the website or iPhone app", Value = ((int)ContactReason.NeedWebsiteHelp).ToString() });
     list.Add(new SelectListItem() { Text = "Some other reason", Value = ((int)ContactReason.SomeOtherReason).ToString() });
     return list.ToSelectListWithHeader(x => x.Text, x => x.Value, null).OrderBy(x => x.Value).ToList();
 }
 public void PopulateData(string seasonName, List<Team> teams, List<League> leagues, List<Cup> cups, List<Fixture> fixtures)
 {
     this.SeasonName                                  = seasonName;
     this.Teams                                       = teams.ToSelectListWithHeader(x => x.TeamNameLong, x => x.Id.ToString(), null, "All", "-1");
     this.LeaguesAndCups                              = leagues.ToSelectListWithHeader(l => l.ToString(), l => LeagueIdentifier + l.Id.ToString(), null, "All", "-1");
     this.LeaguesAndCups.AddRange(cups.ToSelectList(c => c.CupName, l => CupIdentifier + l.Id.ToString(), null));
     this.Fixtures                                    = fixtures;
 }
        private void PopulateHeightLists(EditPlayerViewModel model)
        {
            List<SelectListItem> heightList = new List<SelectListItem>();

            // Feet
            for (int i = 4; i <= 7; i++)
                heightList.Add(new SelectListItem() { Text = i.ToString(), Value = i.ToString() });

            model.HeightFeet = heightList.ToSelectListWithHeader(x => x.Text,
                x => x.Value.ToString(),
                model.HeightFeet != null ? model.HeightFeet.ToString() : "");

            // Inches
            heightList.Clear();
            for (int i = 1; i <= 11; i++)
                heightList.Add(new SelectListItem() { Text = i.ToString(), Value = i.ToString() });

            model.HeightInches = heightList.ToSelectListWithHeader(
                x => x.Text,
                x => x.Value.ToString(),
                model.HeightInches != null ? model.HeightInches.ToString() : "");
        }