예제 #1
0
        public ActionResult GetComments(int lawId)
        {
            CommentsService   service = new CommentsService();
            CommentsListModel model   = service.GetCommentsForLaw(lawId, User.Identity.GetUserId(), Infrastructure.CommentOrder.Chronological);

            return(PartialView("_LawComments", model));
        }
예제 #2
0
        public ActionResult AddComment(int lawId, CommentModel comment)
        {
            TryUpdateModel(comment);

            CommentsService service = new CommentsService();

            service.MakeComment(lawId, User.Identity.GetUserId(), comment.Comment.Text);
            CommentsListModel model = service.GetCommentsForLaw(lawId, User.Identity.GetUserId(), Infrastructure.CommentOrder.Chronological);

            return(PartialView("_LawComments", model));
        }