private void btnXoaVaiTro_Click(object sender, EventArgs e) { // save nhật kí b_nkht.Call_Insert_NhatKiHeThong(Users_Name, this.Text, btnXoaVaiTro.Text); // int index = dtgrNguoiDung.CurrentRow.Index; string s = dtgrNguoiDung.Rows[index].Cells[1].Value.ToString(); int id = int.Parse(dtgrNguoiDung.Rows[index].Cells[0].Value.ToString()); //code here DialogResult d; d = MessageBox.Show("Bạn có chắc muốn xoá tài khoản này " + s + " không", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (d == DialogResult.Yes) { b_per.Call_Delete_per(id); b_user.Call_Delete_Users(id); } // InitGridNguoiDung(); InitGridPhanQuyen(""); this.Refresh(); dtgrNguoiDung.Refresh(); dtgridPhanQuyen.Refresh(); Application.DoEvents(); }