示例#1
0
        public IList <KeyValuePair <IShow, IMyShow> > GetMyShowsFromMyShowsForUser(Guid userId)
        {
            var showService   = new ShowService(Ioc.GetInstance <IShowRepository>());
            var myShowService = new MyShowService(Ioc.GetInstance <IMyShowRepository>());

            var myShows = myShowService.GetMyShowsForUser(userId);

            if (myShows == null || myShows.Count() <= 0)
            {
                return(null);
            }

            var showIds = (from show in myShows
                           select show.ShowId).ToList();

            var shows = (from show in showService.GetAllShows()
                         from myShow in myShows.Where(x => x.ShowId == show.ShowId)
                         where showIds.Contains(show.ShowId)
                         select new { Show = show, MyShow = myShow }).OrderBy(x => x.Show.ShowDate).ToList();

            var showList = new List <KeyValuePair <IShow, IMyShow> >();

            shows.ForEach(x => { showList.Add(new KeyValuePair <IShow, IMyShow>(x.Show, x.MyShow)); });

            return(showList);
        }
示例#2
0
        private void Bind()
        {
            ShowService showService = new ShowService(Ioc.GetInstance<IShowRepository>());

            var shows = showService.GetAllShows();

            gridShows.DataSource = shows;
            gridShows.DataBind();
        }
示例#3
0
        public IList <IShow> GetShowsNotInUsersMyShows(Guid userId, Guid tourId)
        {
            TourService service     = new TourService(Ioc.GetInstance <ITourRepository>());
            var         showService = new ShowService(Ioc.GetInstance <IShowRepository>());

            var myShows = GetMyShowsForUser(userId);

            var tour = service.GetTour(tourId);

            if (myShows == null || myShows.Count() <= 0) //then just return all of them
            {
                return(showService.GetAllShows().Where(x => x.TourId == tourId).OrderBy(y => y.ShowDate).ToList());
            }

            var showIds = myShows.Select(x => x.ShowId).ToList();

            return(showService.GetAllShows().Where(x => x.TourId == tourId && !showIds.Contains(x.ShowId)).OrderBy(y => y.ShowDate).ToList());
        }
        private void Bind()
        {
            TourService tourService = new TourService(Ioc.GetInstance<ITourRepository>());
            ShowService showService = new ShowService(Ioc.GetInstance<IShowRepository>());

            ddlTourType.Items.AddRange((from x in tourService.GetAllToursDescending() select new ListItem(x.TourName, x.TourId.ToString())).ToArray());
            ddlShowType.Items.AddRange((from x in showService.GetAllShows() select new ListItem(x.GetShowName(), x.ShowId.ToString())).ToArray());

            ListItem item = new ListItem("Please select either a tour or a song", "-1");

            ddlTourType.Items.Insert(0, item);
            ddlShowType.Items.Insert(0, item);

            item.Selected = true;
        }
示例#5
0
        public IList <IShow> GetShowsFromMyShowsForUser(Guid userId)
        {
            var showIds = GetShowIdsFromMyShows(userId);

            if (showIds == null || showIds.Count() <= 0)
            {
                return(null);
            }

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

            return((from show in showService.GetAllShows().ToList()
                    where showIds.Contains(show.ShowId)
                    select show).OrderBy(x => x.ShowDate).ToList());
        }
示例#6
0
        private void Bind()
        {
            ShowService service = new ShowService(Ioc.GetInstance<IShowRepository>());
            SetService setService = new SetService(Ioc.GetInstance<ISetRepository>());

            var shows = service.GetAllShows();
            var sets = setService.GetAllSets();

            foreach (var show in shows)
            {
                ddlShows.Items.Add(new ListItem(show.GetShowName(), show.ShowId.ToString()));
            }

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

            ddlShows.Items.Insert(0, item);

            item.Selected = true;

            foreach (Set set in sets)
            {
                StringBuilder setName = new StringBuilder();
                
                setName.Append(set.Notes);

                if (set.Official)
                    setName.Append("***");

                if (set.Encore)
                    setName.Append(" (E)");

                if (set.ShowId != null)
                    setName.Append(" (S)");

                if (set.SetNumber > 0)
                    setName.Append(string.Format(" - {0}", set.SetNumber));

                ddlSets.Items.Add(new ListItem(setName.ToString(), set.SetId.ToString()));
            }
            ListItem item2 = new ListItem("Please select a set", "-1");

            ddlSets.Items.Insert(0, item2);

            item2.Selected = true;
        }
        public void Process(IQueryable<IWantedList> activeWantedLists)
        {
            var showService = new ShowService(Ioc.GetInstance<IShowRepository>());
            var setService = new SetService(Ioc.GetInstance<ISetRepository>());
            var setSongService = new SetSongService(Ioc.GetInstance<ISetSongRepository>());

            var liveSongManglers = (from show in showService.GetAllShows().OrderByDescending(x => x.ShowDate).Take(10)
                          from set in setService.GetSetsForShow(show.ShowId)
                          from setsong in setSongService.GetSetSongsBySet(set.SetId)
                          select new LiveSongDateMangler { LiveSong = (SetSong)setsong, ShowDate = show.ShowDate.Value });

            foreach (var wanted in activeWantedLists)
            {

                //bust it raw dawg
                ///LEFT OFF HERE
            }
        }
示例#8
0
        private void Bind()
        {
            var showService = new ShowService(Ioc.GetInstance<IShowRepository>());

            var shows = showService.GetAllShows();

            foreach (var show in shows)
            {
                ddlShow.Items.Add(new ListItem(show.GetShowName(), show.ShowId.ToString()));
            }

            var item = new ListItem("None", "0");

            ddlShow.Items.Insert(0, item);

            item.Selected = true;
        }
示例#9
0
        public IList<IShow> GetShowsFromMyShowsForUser(Guid userId)
        {
            var showIds = GetShowIdsFromMyShows(userId);

            if (showIds == null || showIds.Count() <= 0) return null;

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

            return (from show in showService.GetAllShows().ToList()
                         where showIds.Contains(show.ShowId)
                         select show).OrderBy(x => x.ShowDate).ToList();
        }
示例#10
0
        public IList<KeyValuePair<IShow, IMyShow>> GetMyShowsFromMyShowsForUser(Guid userId)
        {
            var showService = new ShowService(Ioc.GetInstance<IShowRepository>());
            var myShowService = new MyShowService(Ioc.GetInstance<IMyShowRepository>());

            var myShows = myShowService.GetMyShowsForUser(userId);

            if (myShows == null || myShows.Count() <= 0)
                return null;

            var showIds = (from show in myShows
                           select show.ShowId).ToList();

            var shows = (from show in showService.GetAllShows()
                         from myShow in myShows.Where(x => x.ShowId == show.ShowId)
                         where showIds.Contains(show.ShowId)
                         select new { Show = show, MyShow = myShow }).OrderBy(x => x.Show.ShowDate).ToList();

            var showList = new List<KeyValuePair<IShow, IMyShow>>();

            shows.ForEach(x =>{ showList.Add(new KeyValuePair<IShow, IMyShow>(x.Show, x.MyShow)); });

            return showList;
        }
示例#11
0
        public IList<IShow> GetShowsNotInUsersMyShows(Guid userId, Guid tourId)
        {
            TourService service = new TourService(Ioc.GetInstance<ITourRepository>());
            var showService = new ShowService(Ioc.GetInstance<IShowRepository>());

            var myShows = GetMyShowsForUser(userId);

            var tour = service.GetTour(tourId);

            if (myShows == null || myShows.Count() <= 0) //then just return all of them
            {
                return showService.GetAllShows().Where(x => x.TourId == tourId).OrderBy(y => y.ShowDate).ToList();
            }

            var showIds = myShows.Select(x => x.ShowId).ToList();

            return showService.GetAllShows().Where(x => x.TourId == tourId && !showIds.Contains(x.ShowId)).OrderBy(y => y.ShowDate).ToList();
        }
示例#12
0
        private void Bind()
        {
            var showService = new ShowService(Ioc.GetInstance<IShowRepository>());

            var shows = showService.GetAllShows();

            foreach (var show in shows)
            {
                ddlShow.Items.Add(new ListItem(show.GetShowName(), show.ShowId.ToString()));
            }

            var item = new ListItem("None", "0");

            ddlShow.Items.Insert(0, item);

            item.Selected = true;

            ddlStatus.Items.AddRange(GetDropDownFromEnum(typeof(PosterStatus), 0, "Select a Status"));
        }