//GET: /Shows/Details/5 public ActionResult Details(string show, int?season, int?episode) { Show showObj = Service.GetShowByName(show); if (showObj == null) { return(HttpNotFound()); } return(View(showObj)); }
public HttpResponse XmlGetShow(string name) { Show show = ShowService.GetShowByName(name); if (show == null) { return(new HttpResponse(HttpStatusCode.NotFound)); } return(new HttpResponse(HttpStatusCode.OK, new XmlDoc(PI_NAMESPACE, show))); }
// // GET: /Proposals/Create // Creates Proposal Form based on an existing Show public ActionResult Create(string show) { if (show == null) { return(View()); } Show showObj = ShowService.GetShowByName(show); if (showObj == null) { return(HttpNotFound()); } User user = UserRepo.GetByUsername(User.Identity.Name); Proposal proposal = new Proposal { Show = showObj, User = user }; return(View(proposal)); }
// // GET: /Episodes/Details/5 public ActionResult Details(string show, int?season, int?episode) { Show showObj = Service.GetShowByName(show); if (showObj == null) { return(HttpNotFound()); } Episode episodeObj = Service.GetEpisodeByNumberShowAndSeason(show, season.GetValueOrDefault(), episode.GetValueOrDefault()); if (episodeObj == null) { return(HttpNotFound()); } return(View(episodeObj.ToEpisodeModel(show, season.Value))); }
public SeasonView(string show, Season season) : base("Season", A(ResolveUri.ForHome(), "Home") , H1(Text("TV Shows")) , H2(Text(show)) , H3(Text(string.Format("Starts: {0}", season.Debut.ToString("d")))) , H3(Text(string.Format("Ends: {0}", season.Finale.ToString("d")))) , Ul(season.Episodes.Select(episode => Li(A( ResolveUri.ForEpisode(ShowService.GetShowByName(show) , ShowService.GetSeason(show, season.Number) , ShowService.GetEpisodeByNumberShowAndSeason(show, season.Number, episode.Number) ) , episode.Title) ) ).ToArray() ) ) { }
public HttpResponse GetNewProposalFormFromExistingShow(string showname) { Show show = ShowService.GetShowByName(showname); return(new HttpResponse(HttpStatusCode.OK, new ProposalForm(show))); }