private void btndangky_Click(object sender, EventArgs e) { try { PhieuDangKy PDK = new PhieuDangKy(); PDK.MaPhieuDK = tbxmapdk.Text.Trim(); PDK.MaDeTai = tbxmadt.Text.Trim(); PDK.NgayDK = dtpngaydkdt.Value; PDK.MSSV = tbxmssv.Text.Trim(); PhieuDangKyBLL PDKBLL = new PhieuDangKyBLL(); string _MaPhieuDK = tbxmapdk.Text.Trim(); if (!(PDKBLL.CheckID(_MaPhieuDK))) { PDKBLL.Insert(PDK); LoadData(); } else { MessageBox.Show("Mã lớp " + _MaPhieuDK.ToString() + "đã tồn tại", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch (Exception ex) { MessageBox.Show("Thêm bị lỗi: " + ex.Message.ToString(), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
public FormChiTietPhieuDangKy() { InitializeComponent(); phieuDangKyBLL = new PhieuDangKyBLL(); khachHangBLL = new KhachHangBLL(); diaOcBLL = new DiaOcBLL(); nhanVienBLL = new NhanVienBLL(); }
public FormHinhAnh() { InitializeComponent(); hinhAnhBLL = new HinhAnhBLL(); phieuDangKyBLL = new PhieuDangKyBLL(); nhanVienBLL = new NhanVienBLL(); diaOcBLL = new DiaOcBLL(); id = ""; }
public FormPhieuGiaHan() { InitializeComponent(); id = ""; phieuGiaHanBLL = new PhieuGiaHanBLL(); phieuDangKyBLL = new PhieuDangKyBLL(); nhanVienBLL = new NhanVienBLL(); quyDinhBLL = new QuyDinhBLL(); }
public FormPhieuDangKy() { InitializeComponent(); id = ""; phieuDangKyBLL = new PhieuDangKyBLL(); khachHangBLL = new KhachHangBLL(); nhanVienBLL = new NhanVienBLL(); diaOcBLL = new DiaOcBLL(); chiTietQuangCaoBLL = new ChiTietQuangCaoBLL(); }
public FormChiTietQuangCao() { InitializeComponent(); id = ""; chiTietQuangCaoBLL = new ChiTietQuangCaoBLL(); phieuDangKyBLL = new PhieuDangKyBLL(); loaiQuangCaoBLL = new LoaiQuangCaoBLL(); viTriBLL = new ViTriBLL(); baoBLL = new BaoBLL(); }
public FormKiemDuyet() { InitializeComponent(); phieuDangKyBLL = new PhieuDangKyBLL(); phieuGiaHanBLL = new PhieuGiaHanBLL(); huyDangKyBLL = new HuyDangKyBLL(); chiTietQuangCaoBLL = new ChiTietQuangCaoBLL(); baiVietBLL = new BaiVietBLL(); diaOcBLL = new DiaOcBLL(); }
private void btnxoa_Click(object sender, EventArgs e) { try { string _MaPhieuDK = tbxmapdk.Text.Trim(); PhieuDangKyBLL PDKBLL = new PhieuDangKyBLL(); PDKBLL.Delete(_MaPhieuDK); LoadData(); } catch (Exception ex) { MessageBox.Show("Xóa bị lỗi: " + ex.Message.ToString(), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void btncapnhat_Click(object sender, EventArgs e) { try { PhieuDangKy PDK = new PhieuDangKy(); PDK.MaPhieuDK = tbxmapdk.Text.Trim(); PDK.MaDeTai = tbxmadt.Text.Trim(); PDK.NgayDK = dtpngaydkdt.Value; PDK.MSSV = tbxmssv.Text.Trim(); PhieuDangKyBLL PDKBLL = new PhieuDangKyBLL(); string _MaPhieuDK = tbxmapdk.Text.Trim(); PDKBLL.Update(PDK); LoadData(); } catch (Exception ex) { MessageBox.Show("Sửa bị lỗi: " + ex.Message.ToString(), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void LoadData() { PhieuDangKyBLL Dt = new PhieuDangKyBLL(); dGVdsphieudangky.DataSource = Dt.GetData(); }