// GET: Channel public ActionResult Index(string channel) { HttpCookie cookie = HttpContext.Request.Cookies.Get("date"); var result = jsUnitOfWork.ProgramRepository.ListOfJsonProgram(cookie.Value, channel); IndexHomeVM model = new IndexHomeVM(channel) { ProgramJsonList = result }; return(View(model)); }
public IndexHomeVM PrepareForHomeIndex() { IndexHomeVM IndexVM = new IndexHomeVM() { ListPopularMenuItem = _unitOfWork.MenuItemRepository.FilterMostPopularMenuItems(), ListNewMenuItem = _unitOfWork.MenuItemRepository.FilterMostBestSellerMenuItems(), ListBestSellerMenuItem = _unitOfWork.MenuItemRepository.FilterMostBestSellerMenuItems(), ListNews = _unitOfWork.NewsRepository.ReadAllCouponOrNews().Take(2) }; return(IndexVM); }
public ActionResult Shows(string channel, string date) { // Cookie HttpCookie cookie = new HttpCookie("date"); cookie.Value = date; cookie.Expires = DateTime.Now.AddMinutes(60.0); HttpContext.Response.SetCookie(cookie); var result = jsUnitOfWork.ProgramRepository.ListOfJsonProgram(date, channel); IndexHomeVM model = new IndexHomeVM(channel) { ProgramJsonList = result, }; return(PartialView("Shows", model)); }
public IActionResult Index() { IndexHomeVM IndexVM = this._homeService.PrepareForHomeIndex(); return(View(IndexVM)); }