public async Task <JsonResult> Update() { try { var id = Guid.Parse(Request.Form["id"]); var name = Request.Form["name"]; var archive = Boolean.Parse(Request.Form["archive"]); if (ItemCategoryService.Update(id, name, archive)) { return(Success(id.ToString())); } return(Failed(MessageUtility.ServerError())); } catch { return(Failed(MessageUtility.ServerError())); } }
public ActionResult Update(ItemCategory ctrg) { item.Update(ctrg); return(View()); }