public ActionResult ManyDeleted(string idsStr) { try { var ids = idsStr.Substring(0, idsStr.LastIndexOf(',')).Split(','); foreach (var id in ids) { RegionService.Deleted(long.Parse(id)); } return(Json(new AjaxResult <object> { code = 0, msg = "删除成功" })); } catch (Exception ex) { Log.ErrorFormat("删除区域错误:" + ex.Message); return(Json(new AjaxResult <object> { code = 0, msg = "删除失败" })); } }
public ActionResult Deleted(long id) { try { RegionService.Deleted(id); return(Json(new AjaxResult <object> { code = 0, msg = "删除成功" })); } catch (Exception ex) { Log.ErrorFormat("删除区域错误:" + ex.Message); return(Json(new AjaxResult <object> { code = 0, msg = "删除失败" })); } }