private void btnSVXoa_Click(object sender, EventArgs e) { string _txtMaDocGia = ""; try { _txtMaDocGia = txtMaDocGia.Text; MessageBox.Show(_txtMaDocGia); } catch { } DialogResult dr = MessageBox.Show(" Bạn có chắc chắn xóa ?", "Xác nhận ", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); if (dr == DialogResult.Yes) { myTK = new Models.Taikhoan(txtMaDocGia.Text, txttendangnhap.Text, txtmatkhau.Text, cbbquyen.Text); var i = myTK.DeleteTaikhoan(); if (i > 0) { MessageBox.Show("Xóa Thành Công !"); } else { MessageBox.Show("Xóa Không thành công"); } } hienthidanhsach(); }