Exemple #1
0
        private void btn_xoa_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult DR = MessageBox.Show("Bạn có chắc chắn xoá môn học này!", "Thông báo", MessageBoxButtons.YesNo);
                if (DialogResult.Yes == DR)
                {
                    QLHS_DTO hs = new QLHS_DTO();
                    hs.MaMonHoc = txt_mamonhoc.Text;
                    QLHS_BUS bus = new QLHS_BUS();
                    bus.XoaMonHoc(hs);
                    MessageBox.Show("Xoá thành công môn học " + txt_mamonhoc.Text + " !", "Thông báo");
                    LoadData();
                }
                else
                {
                    LoadData();
                }
            }

            catch (Exception ex)
            {
            }
        }