private void btnXoaMH_Click(object sender, EventArgs e) { DialogResult traLoi; traLoi = MessageBox.Show("Bạn Có Muốn Xóa Môn Học Này Không?", "Thông Báo", MessageBoxButtons.YesNo); if (traLoi == DialogResult.Yes) { MH.MaMH = txtMaMH.Text; MH.TenMonHoc = txtTenMH.Text; MH.SoChi = Convert.ToInt32(txtSoChi.Text); MH.SoTiet = Convert.ToInt32(txtSoTiet.Text); MH.Khoa = txtKhoa.Text; if (monHocBUS.XoaMonHoc(MH) == true) { MessageBox.Show("Xóa Mon Hoc Thành Công", "Thông Báo"); loadMH(); } else { MessageBox.Show("Không Thể Xóa Mon Hoc", "Thông Báo"); } } }