public ActionResult AddRepl(BinhLuan Comment)
        {
            Comment.NgayDang = DateTime.Now;
            Comment.MaKH     = User.Identity.GetUserId();
            CommentModel cm = new CommentModel();

            cm.AddComment(Comment);
            cm.UpdateComment(Comment);
            return(RedirectToAction("TimBinhLuan"));
        }
예제 #2
0
        public ActionResult AddRepl(BinhLuan Comment)
        {
            Comment.NgayDang = DateTime.Now;
            Comment.MaKH     = User.Identity.GetUserId();
            Comment.HoTen    = User.Identity.Name;
            if (User.IsInRole("Nhân viên"))
            {
                Comment.Email = "Nhân viên";
            }
            else
            {
                Comment.Email = "Quản trị viên";
            }
            CommentModel cm = new CommentModel();

            cm.AddComment(Comment);
            cm.UpdateComment(Comment);
            return(RedirectToAction("TimBinhLuan"));
        }