public JsonResult UpdateContent(EditContentModel model) { JsonModel jm = new JsonModel(); try { ISocialCircleBLL socialCircleBLL = BLLFactory <ISocialCircleBLL> .GetBLL("SocialCircleBLL"); var sc = socialCircleBLL.GetEntity(s => s.Id == model.Id); if (sc != null) { //修改名称 sc.Content = model.Content; socialCircleBLL.Update(sc); } else { jm.Msg = "圈子已不存在"; } } catch { jm.Msg = "请求发生异常"; } return(Json(jm, JsonRequestBehavior.AllowGet)); }
public virtual async Task <IActionResult> ContentCategories(int id) { Content content = await _content.GetContentByIdAsync(id); EditContentModel model = new EditContentModel() { ContentType = Engine.Settings.Content.GetContentType(content.ContentType), Content = content }; return(View(model)); }
public ActionResult UpdateContent(int id) { ISocialCircleBLL socialCircleBLL = BLLFactory <ISocialCircleBLL> .GetBLL("SocialCircleBLL"); var sc = socialCircleBLL.GetEntity(s => s.Id == id); EditContentModel model = new EditContentModel() { Id = sc.Id, Content = sc.Content }; return(View(model)); }