private void btnLuu_Click(object sender, EventArgs e) { if (them) { try { BLLopSinhVien blLSV = new BLLopSinhVien(); blLSV.ThemLopSinhVien(this.txtMaLop.Text, this.LookUpKhoa.Text, this.txtTenLop.Text, ref err); LoadData(); XtraMessageBox.Show("Đã thêm xong!"); } catch { XtraMessageBox.Show("Không thêm được. Lỗi rồi!"); } } else { BLLopSinhVien blLSV = new BLLopSinhVien(); blLSV.CapNhatLopSinhVien(this.txtMaLop.Text, this.LookUpKhoa.Text, this.txtTenLop.Text, ref err); LoadData(); XtraMessageBox.Show("Đã sửa xong!"); } }