public JsonResult updatePost([System.Web.Http.FromBody] Post data) { data.updateBy = User.UserId; var res = new PostBO().updatePost(data); return(Json(res)); }
public static PostBO PostPOToBO(PostPO from) { PostBO to = new PostBO(); to.PostId = from.PostId; to.UserId = from.UserId; to.Username = from.Username; to.ThreadId = from.ThreadId; to.CreationDate = from.CreationDate; to.EditDate = from.EditDate; to.Title = from.Title; to.Content = from.Content; return(to); }
public JsonResult getPost([System.Web.Http.FromBody] int id) { var data = new PostBO().getPost(id); return(Json(data)); }
public JsonResult hidePostFromList([System.Web.Http.FromBody] List <Post> datas) { var res = new PostBO().updatePostActiveFromList(datas, false); return(Json(res)); }
public JsonResult getPostList() { var datas = new PostBO().getPostList(); return(Json(datas)); }
public JsonResult deletePost([System.Web.Http.FromBody] Post data) { var res = new PostBO().deletePost(data); return(Json(res)); }