Beispiel #1
0
 public ActionResult Edit(Mode entity)
 {
     if (entity.Id == -1)
     {
         entity.IsEnabled = true;
         _modeService.Add(entity);
     }
     else
     {
         _modeService.Update(entity);
     }
     return(Json(new { code = 200, message = "操作成功!" }));
 }