Example #1
0
        public void yearSelector_YearSelected(object sender, PhishPond.Concrete.EventArgs.SelectYearCommandEventArgs e)
        {
            var showService = new ShowService(Ioc.GetInstance<IShowRepository>());
            var shows = showService.GetShowsByYear(e.Year);

            rptShows.DataSource = shows;
            rptShows.DataBind();
        }
Example #2
0
        public void yearSelector_YearSelected(object sender, PhishPond.Concrete.EventArgs.SelectYearCommandEventArgs e)
        {
            var year = e.Year;

            var showService = new ShowService(Ioc.GetInstance<IShowRepository>());
            var show = showService.GetShowsByYear(year);

            var scriptHelper = new ScriptHelper("SuccessAlert", "alertDiv", show.First().GetShowName());
            Page.RegisterStartupScript(scriptHelper.ScriptName, scriptHelper.GetSuccessScript());
        }
        public void yearSelector_YearSelected(object sender, PhishPond.Concrete.EventArgs.SelectYearCommandEventArgs e)
        {
            var myShowService = new MyShowService(Ioc.GetInstance<IMyShowRepository>());

            var userId = new Guid(Membership.GetUser(User.Identity.Name).ProviderUserKey.ToString());

            var shows = myShowService.GetShowsFromMyShowsForUser(userId, e.Year);

            rptShows.DataSource = shows;
            rptShows.DataBind();
        }
        public void selectAlbum_SongSelected(object sender, PhishPond.Concrete.EventArgs.SelectAlbumCommandEventArgs e)
        {
            ResetPanels();

            var wantedListService = new WantedListService(Ioc.GetInstance<IWantedListRepository>());

            if (wantedListService.SongAlreadyExistsForUser(userId, e.SongId))
            {
                phDuplicateError.Visible = true;
                return;
            }

            var rank = rptWantedList.Items.Count + 1;

            var wantedList = new WantedList 
            { 
                CreatedDate = DateTime.Now,
                Rank = rank,
                SongId = e.SongId,
                UserId = userId,
                WantedId = Guid.NewGuid()
            };

            bool success = false;

            wantedListService.SaveCommit(wantedList, out success);

            if (success)
            {
                phAddSongSuccess.Visible = true;
            }
            else
            {
                phAddSongError.Visible = true;
            }

            BindWantedList();
        }
 public void yearSelector_YearSelected(object sender, PhishPond.Concrete.EventArgs.SelectYearCommandEventArgs e)
 {
     SetShows(e.Year);
 }
        public void yearSelector_YearSelected(object sender, PhishPond.Concrete.EventArgs.SelectYearCommandEventArgs e)
        {
            var showService = new ShowService(Ioc.GetInstance<IShowRepository>());

            var shows = showService.GetShowsByYear(e.Year);

            ddlShows.Items.Clear();

            ddlShows.Items.AddRange((from s in shows
                                     select new ListItem(s.GetShowName(), s.ShowId.ToString())).ToArray());
        }