Beispiel #1
0
        public ActionResult AddComment(BinhLuan Comment)
        {
            CommentModel cm = new CommentModel();

            Comment.NgayDang = DateTime.Now;
            if (User.Identity.GetUserId() != null)
            {
                Comment.MaKH  = User.Identity.GetUserId();
                Comment.HoTen = cm.GetUser(User.Identity.GetUserId()).HoTen.ToString();
                Comment.Email = cm.GetUser(User.Identity.GetUserId()).Email.ToString();
            }
            Comment.DaTraLoi = "C";
            cm.AddComment(Comment);

            //Chatbot rep
            Chatbot bot = new Chatbot();

            bot.ChatbotRep(Comment);
            return(RedirectToAction("LoadComment", new { masp = Comment.MaSP }));
        }