//首次加载显示所有评论数量 public ActionResult AllReplyNum() { if (Baseid == Guid.Parse("00000000-0000-0000-0000-000000000000")) { return(Json(null)); } ServiceComments service = new ServiceComments(); int count = service.GetReplyNum(Baseid); return(Json(count)); }
public ActionResult PartialPlAddd() { if (Baseid == Guid.Parse("00000000-0000-0000-0000-000000000000")) { return(Json(null)); } var JsonData = Request.Form["JsonData"]; //var user = Session["User"] as User; //User user1 = new User(); //if (user == null) //{ var userName = "******"; var userId = Guid.Parse("9393ed42-7b3f-e711-afa3-002564ba5c19"); //} string Content = Request.Form["Content"]; string Title = Request.Form["title"]; ServiceComments service = new ServiceComments(); bool isWhere = service.GetPlAdd(Baseid, Content, userId, userName, Title); int count = service.GetReplyNum(Baseid); return(Json(new { isWhere = isWhere, count = count })); }