コード例 #1
0
 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())); }
 }
コード例 #2
0
 public ActionResult Update(ItemCategory ctrg)
 {
     item.Update(ctrg);
     return(View());
 }