private void btnX_Click(object sender, EventArgs e) { if (txtTT.Text != "") { DialogResult dr; dr = XtraMessageBox.Show("Bạn có muốn xóa không?", "Thông báo!", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (dr == DialogResult.No) { } else { if (hdxbus.XoaHoaDonXuat(txtMHDX.Text)) { MessageBox.Show("Xóa thành công!", "Thông báo", MessageBoxButtons.OK); gridControl1.DataSource = hdxbus.DanhSachHoaDonXuat(); } else { MessageBox.Show("Xóa thất bại!"); } txtMHDX.EditValue = hdxbus.TangHD(); txtTT.Text = ""; txtMNV.Text = ""; txtMKH.Text = ""; } } else { XtraMessageBox.Show("Vui lòng chọn dòng cần xóa", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error); } }