Exemple #1
0
        private void BT_Delete_Click(object sender, EventArgs e)
        {
            DialogResult res =
                MessageBox.Show("您正在试图删除一个用户,该操作是不可逆的,您是否确定要进行此操作?!", "警告!", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2);

            if (res == DialogResult.Cancel)
            {
                return;
            }
            try
            {
                UserManager_Client.DropUser(TB_UserName.Text.Trim());
            }
            catch
            {
                MessageBox.Show("请先删除其他对该用户的引用!如订单以及各种处理痕迹");
            }
            List_UserEX = UserManager_Client.SelectUserEXInfo_All().ToList();
            List_User   = UserManager_Client.SelectUserInfo_All().ToList();
            LB_UserName_SelectedIndexChanged(null, null);
        }