Esempio n. 1
0
        private void btnXoaGiangVien_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult result = MessageBox.Show("Bạn có chắc muốn xóa Giảng Viên này không?",
                                                      "Question",
                                                      MessageBoxButtons.YesNo,
                                                      MessageBoxIcon.Question,
                                                      MessageBoxDefaultButton.Button1);
                if (result == DialogResult.Yes)
                {
                    GiangVienBUS.Delete(giangVienUpdateDTO.MaGiangVien);
                    MessageBox.Show("Xóa Giảng Viên thành công");
                    layDanhSachGiangVien();

                    txtTenGiangVienUpdate.Text = "";
                    txtSoDienThoaiUpdate.Text  = "";
                    txtDiaChiUpdate.Text       = "";
                    txtEmailUpdate.Text        = "";
                }
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }