private void DeleteGroup_Closed(object sender, EventArgs e) { if (((Form)sender).DialogResult != DialogResult.Yes) { return; } try { foreach (ListViewItem item in groupListView.SelectedItems) { _currentUser.DeleteGroup((int)item.Tag); } LoadGroups(); } catch (Exception ex) { MessageBox.Show("删除用户组失败:" + ex.Message, "文档管理系统", MessageBoxButtons.OK, MessageBoxIcon.Error); } }