public ActionResult Edit([FromQuery] uint News_id) { NewsdescInfo item = Newsdesc.GetItem(News_id); if (item == null) { return(APIReturn.记录不存在_或者没有权限); } ViewBag.item = item; return(View()); }
public APIReturn _Edit([FromQuery] uint News_id, [FromForm] string Content) { NewsdescInfo item = Newsdesc.GetItem(News_id); if (item == null) { return(APIReturn.记录不存在_或者没有权限); } item.Content = Content; int affrows = Newsdesc.Update(item); if (affrows > 0) { return(APIReturn.成功.SetMessage($"更新成功,影响行数:{affrows}")); } return(APIReturn.失败); }