public ActionResult AjaxGetComment(FormCollection Fm) { Maticsoft.BLL.SNS.Comments comments = new Maticsoft.BLL.SNS.Comments(); int postID = Globals.SafeInt(Fm["PostId"], 0); if (postID > 0) { this.PostsModel = this.PostsBll.GetModel(postID); List<Maticsoft.Model.SNS.Comments> commentByPost = comments.GetCommentByPost(this.PostsModel); if (commentByPost.Count > 0) { return base.Content(this.jss.Serialize(commentByPost)); } } return base.Content("No"); }
public ActionResult AjaxGetCommentByPostId(FormCollection Fm) { Maticsoft.BLL.SNS.Comments comments = new Maticsoft.BLL.SNS.Comments(); int postID = Globals.SafeInt(Fm["PostId"], 0); if (postID > 0) { this.PostsModel = this.PostsBll.GetModel(postID); List<Maticsoft.Model.SNS.Comments> commentByPost = comments.GetCommentByPost(this.PostsModel); if (commentByPost.Count > 0) { ((dynamic) base.ViewBag).PostId = postID; return base.View(base.CurrentThemeViewPath + "/UserProfile/postCommentList.cshtml", commentByPost); } } return base.Content("No"); }