private void delete(int row) {
        if (!MyFactory.getResourceService().hasRight(MyFactory.getCurrentUser(), Resource.USER_MNG)) {
            return;
        }
        User selectedRow = result == null ? null : result.get(row);
        if (selectedRow != null) {
            int result = JOptionPane.showConfirmDialog(null, "确定要删除" + selectedRow.getName() + "?");
            if (result == JOptionPane.YES_OPTION) {
                boolean flag = MyFactory.getUserService().delete(selectedRow.getId());
                if (flag) {
                    JOptionPane.showMessageDialog(null, "删除成功");
                    refresh();
                } else {
                    JOptionPane.showMessageDialog(null, "删除失败，请重试");
                }
            }
        }
    }