private void btn_luu_Click(object sender, EventArgs e) { try { if ((txt_mamonhoc.Text != "") && (txt_tenmonhoc.Text != "")) { QLHS_BUS bus = new QLHS_BUS(); bus.CapNhatMonHoc(txt_mamonhoc.Text, txt_tenmonhoc.Text); MessageBox.Show("Cập nhật thành công môn học " + txt_mamonhoc.Text + " !", "Thông báo"); LoadData(); btn_capnhatmon.Visible = true; btn_luu.Visible = false; txt_mamonhoc.Enabled = false; txt_tenmonhoc.Enabled = false; btn_themmon.Enabled = true; btn_xoa.Enabled = true; btn_nhapdiemmonhoc.Enabled = true; } else { MessageBox.Show("Cập nhật không thành công! Mời bạn xem lại dữ liệu nhập! ", "Thông báo"); } } catch (Exception ex) { } }