// // GET: /Shows/ public ActionResult Index(bool noPages = false) { if (!noPages) { return(RedirectToAction("Page", new { pageNumber = 1 })); } IEnumerable <Show> shows = Service.GetAllShows(); return(View(shows)); }
public ActionResult Shows() { return(View(new SearchShowsViewModel { Shows = ShowService.GetAllShows(User.Identity.GetUserId()) })); }
private List <ShowViewModel> EnactShowSearch(string searchTerm, int?releaseYear, int?rating, AwardStatus?accolades) { var results = ShowService.GetAllShows(User.Identity.GetUserId()); if (!String.IsNullOrEmpty(searchTerm)) { results = results.Where(r => r.MediaName.ToUpperInvariant().Contains(searchTerm.ToUpperInvariant())).ToList(); } if (releaseYear != null) { results = results.Where(r => r.DateOfRelease.Year == releaseYear).ToList(); } if (rating != null) { results = results.Where(r => (r.Rating >= rating - 1) && (r.Rating <= rating + 1)).ToList(); } if (accolades != null) { results = results.Where(r => r.Accolades == accolades).ToList(); } return(results); }
// GET: All Shows public ActionResult AllShows() { ShowService service = new ShowService(); IEnumerable <ShowListItem> allShows = service.GetAllShows(); return(View(allShows)); }
public async Task <IActionResult> GetShows(ShowParams showParams) { var shows = await _service.GetAllShows(showParams); Response.AddPagination(shows.CurrentPage, shows.PageSize, shows.TotalCount, shows.TotalPages); return(Ok(shows)); }
private void Bind() { ShowService showService = new ShowService(Ioc.GetInstance <IShowRepository>()); var shows = showService.GetAllShows(); gridShows.DataSource = shows; gridShows.DataBind(); }
public void ServiceTest() { var shows = showService.GetAllShows(); foreach (var show in shows) { var tl = showService.TicketsLeftForShow(show); Assert.IsTrue(tl >= 0 && tl <= Constants.Rows * Constants.Seats); } }
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 IActionResult GetAllShows() { try { return(Ok(_eventService.GetAllShows())); } catch (ServiceException) { //TODO: Exception-Logging/Tracing return(BadRequest()); } }
// // GET: /Search/ public ActionResult Index(string query) { if (!string.IsNullOrEmpty(query)) { IEnumerable <Show> shows = Service.GetAllShows().Where(show => show.Name.IndexOf(query, StringComparison.OrdinalIgnoreCase) >= 0); if (Request.IsAjaxRequest()) { return(PartialView("_Suggestion", shows)); } return(View("Index", shows)); } return(null); }
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; }
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; }
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")); }
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 } }
public ActionResult <List <Show> > GetAllShows() { return(_showService.GetAllShows()); }
public ActionResult ViewShows() { var shows = showService.GetAllShows(); return(View(shows)); }
public ActionResult Index() { return(View(ShowService.GetAllShows(User.Identity.GetUserId()))); }