Ejemplo n.º 1
0
        private void Bind()
        {
            var yearService = new YearService();
            ddlYearReleased.Items.AddRange(yearService.GetAllPhishYears());

            var item = new ListItem("Please select a year", "-1");
            ddlYearReleased.Items.Add(item);
            item.Selected = true;
        }
Ejemplo n.º 2
0
        //public void btnNext_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        //{
        //    Response.Redirect(LinkBuilder.ProfileStep2Link());
        //}

        //public void btnPrevious_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        //{
        //    Response.Redirect(LinkBuilder.ChangeProfileLink());
        //}

        private void BindLists()
        {
            var yearService = new YearService();

            var item = new ListItem("Please select a year", "-1");

            ddlFavoriteYear.Items.AddRange(yearService.GetAllPhishYears());
            ddlFavorite3Year.Items.AddRange(yearService.GetPhish3Point0Years());

            ddlFavoriteYear.Items.Insert(0, item);
            ddlFavorite3Year.Items.Insert(0, item);

            item.Selected = true;

            BindSeasons();
            BindRuns();

            var albumService = new AlbumService(Ioc.GetInstance<IAlbumRepository>());
            var albums = albumService.GetAllAlbumsForDropDown();

            if (albums != null)
            {
                ddlFavoriteAlbums.Items.AddRange(albums);
            }

            item = new ListItem("Please select an album", "-1");

            ddlFavoriteAlbums.Items.Insert(0, item);

            item.Selected = true;

            //var studioSongs = songService.GetAllSongs().Where(y => y.Album.ToLower() != "live only").OrderBy(x => x.SongName).ToList();

            //if (studioSongs != null)
            //{
            //    studioSongs.ForEach(x => ddlFavoriteStudioSong.Items.Add(new ListItem(x.SongName, x.SongId.ToString())));
            //}

            //item = new ListItem("Please select a song", "-1");

            //ddlFavoriteStudioSong.Items.Insert(0, item);

            //item.Selected = true;
        }