Ejemplo n.º 1
0
        public ActionResult Schedule()
        {
            ViewData["Message"] = "BookTV Schedule";
            ViewData["Segments"] = new SegmentService().GetSegments();

            return View();
        }
Ejemplo n.º 2
0
        public ActionResult SegmentDetail()
        {
            var titleHash = Convert.ToInt32(RouteData.Values["ID"]);
            var segmentService = new SegmentService();
            var segments = segmentService.GetSegments();

            //HACK: To keep working on UI, try to find one with the same title+airing, else return the last one in the list
            var segment = (segments.FirstOrDefault(s => (s.Title + s.DayDescription + s.Time).GetHashCode() == titleHash) ?? segments.Last());

            segment.SegmentDetail = segmentService.GetSegmentDetail(segment);

            ViewData.Model = segment;

            return View();
        }