Ejemplo 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));
        }
Ejemplo 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);
        }
Ejemplo n.º 3
0
        public ActionResult EditPost(String IDReview)
        {
            ReviewFilmService reviewS = new ReviewFilmService();

            TopReviewModels baiNhanXet = reviewS.getReview(IDReview);


            FilmService filmSV = new FilmService();
            PhimViewModels temp = filmSV.getFilmByID(baiNhanXet.MS_Phim.ToString());

            temp.contentPost = baiNhanXet.content;
            temp.title = baiNhanXet.title;
            temp.MaSoBaiNhanXet = baiNhanXet.MS_ReView;
            



            return View(temp);
        }