Exemplo n.º 1
0
        public JsonResult Index(CommentDto dd)
        {
            if (Session["account"] == null)
            {
                return(Json(new Result {
                    Status = false, Message = "没有登陆信息,请先登陆再操作"
                }, JsonRequestBehavior.AllowGet));
            }
            Comment cmt = new Comment();

            cmt.FromUId   = Session["account"].ToString();
            cmt.Content   = dd.Content;
            cmt.ArticleId = dd.ArticleId;
            string msg;
            Result result = new Result {
                Status = CommentManage.AddComment(cmt, out msg), Message = msg
            };

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
 public bool AddComment(string content, int houseId, int userId)
 {
     return(_commentManage.AddComment(content, houseId, userId));
 }