Exemplo n.º 1
0
        private void DeleteUser_Closed(object sender, EventArgs e)
        {
            if (((Form)sender).DialogResult != DialogResult.Yes)
            {
                return;
            }

            try
            {
                foreach (ListViewItem item in userListView.SelectedItems)
                {
                    _currentUser.DeleteUser((int)item.Tag);
                }
                LoadUsers();
            }
            catch (Exception ex)
            {
                MessageBox.Show("删除用户失败:" + ex.Message, "文档管理系统", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }