コード例 #1
0
        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();
        }
コード例 #2
0
        private void Bind()
        {
            BindProfile();

            var myShowService = new MyShowService(Ioc.GetInstance <IMyShowRepository>());

            var shows = myShowService.GetShowsFromMyShowsForUser(userId);

            rptShows.DataSource = shows;
            rptShows.DataBind();
        }
コード例 #3
0
        private void SetShows(Guid tourId)
        {
            var myShowService = new MyShowService(Ioc.GetInstance <IMyShowRepository>());

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

            var shows = myShowService.GetShowsFromMyShowsForUser(userId, tourId);

            ddlShows.Items.Clear();

            ddlShows.Items.AddRange((from s in shows
                                     select new ListItem(s.GetShowName(), s.ShowId.ToString())).ToArray());
        }
コード例 #4
0
        private void DeleteShow(Guid showId)
        {
            var userId = new Guid(Membership.GetUser(User.Identity.Name).ProviderUserKey.ToString());

            var myShowService = new MyShowService(Ioc.GetInstance <IMyShowRepository>());

            var myShow = myShowService.GetMyShow(showId, userId);

            myShowService.DeleteCommit(myShow);

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

            var show = showService.GetShow(showId);

            if (show != null)
            {
                var shows = myShowService.GetShowsFromMyShowsForUser(userId);
                rptShows.DataSource = shows;
                rptShows.DataBind();
            }
        }