Exemplo n.º 1
0
        public ActionResult CommentsOfTopReview(int? page, String IDPhim, String IDReview = "-1")
        {          
            List<CommentViewModels> result = new List<CommentViewModels>();
            ReviewFilmService reviewS = new ReviewFilmService();
            TopReviewModels top = null;
            ViewBag.IDPhim = IDPhim;
            ViewBag.IDReview = IDReview;
            if(IDReview.Equals("-1")) // Bài Review nổi bật nhất
            {
                top = reviewS.getTopReview(IDPhim);
            }
            else
            {
                top = reviewS.getReview(IDReview);
            }
            
            if(top != null)
            {
                result = reviewS.getComment(top.MS_ReView.ToString());

                TempData["IDPost"] = top.MS_ReView;
            }

            int pageNumber = page ?? 1;
            int pageSize = 10;
            
            return PartialView(result.ToPagedList(pageNumber, pageSize));
        }
Exemplo n.º 2
0
        public ActionResult TopReview(String IDPhim, String IDReview = "-1")
        {
            TopReviewModels result = null;
            ReviewFilmService reviewS = new ReviewFilmService();
            if(IDReview.Equals("-1"))
            {
              
                 result   = reviewS.getTopReview(IDPhim);
               
            }
            else{
                result = reviewS.getReview(IDReview);
            }
            
            

            return View(result);
        }