public IHttpActionResult DeleteMove(int ID) { var moveService = new MoveService(); var delMove = moveService.DeleteMove(ID); var result = new { Count = delMove ? "删除成功!" : "删除失败" }; return(Json(result)); }
public IHttpActionResult DelArr(List <int> delArr) { var moveService = new MoveService(); bool isResult = true; try { delArr.ForEach(item => { moveService.DeleteMove(item); }); } catch (Exception) { isResult = false; throw; } var result = new { Msg = isResult ? "删除成功" : "删除失败" }; return(Json(result)); }