Пример #1
0
 public ActionResult Delete(string keys)
 {
     if (string.IsNullOrEmpty(keys))
     {
         return(Json(ResultData.CreateError("主键为空,删除取消")));
     }
     if (keys.Contains(','))
     {
         //throw new Exception("角色不支持批量删除");
         return(Json(ResultData.CreateError("角色不支持批量删除")));
     }
     else
     {
         try
         {
             SysService.DeleteRole(keys);
             return(Json(ResultData.Create(true), "text/html"));
         }
         catch (Exception ex)
         {
             return(Json(ResultData.CreateError(ex.Message)));
         }
     }
 }