Ejemplo n.º 1
0
 public JsonResult Delete(string staffId)
 {
     try
     {
         string funcId = PermissionEnum.CodeFormat((int)PermissionEnum.管理员管理.操作员管理.除);
         if (!IsPermission(funcId))
         {
             return(Error("您没有操作权限,请联系系统管理员!"));
         }
         if (staffId == StaffID)
         {
             return(Error("员工正在使用中,不能删除!"));
         }
         var result = OperatorService.DeleteOperatorPro(SystemID, CompanyID, staffId);
         if (result)
         {
             return(Success("ok"));
         }
         else
         {
             return(Error("fail"));
         }
     }
     catch (Exception ex)
     {
         return(Error(ex.Message));
     }
 }