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();
 }
Exemplo n.º 3
0
 public FormHinhAnh()
 {
     InitializeComponent();
     hinhAnhBLL     = new HinhAnhBLL();
     phieuDangKyBLL = new PhieuDangKyBLL();
     nhanVienBLL    = new NhanVienBLL();
     diaOcBLL       = new DiaOcBLL();
     id             = "";
 }
Exemplo n.º 4
0
 public FormPhieuGiaHan()
 {
     InitializeComponent();
     id             = "";
     phieuGiaHanBLL = new PhieuGiaHanBLL();
     phieuDangKyBLL = new PhieuDangKyBLL();
     nhanVienBLL    = new NhanVienBLL();
     quyDinhBLL     = new QuyDinhBLL();
 }
Exemplo n.º 5
0
 public FormPhieuDangKy()
 {
     InitializeComponent();
     id                 = "";
     phieuDangKyBLL     = new PhieuDangKyBLL();
     khachHangBLL       = new KhachHangBLL();
     nhanVienBLL        = new NhanVienBLL();
     diaOcBLL           = new DiaOcBLL();
     chiTietQuangCaoBLL = new ChiTietQuangCaoBLL();
 }
Exemplo n.º 6
0
 public FormChiTietQuangCao()
 {
     InitializeComponent();
     id = "";
     chiTietQuangCaoBLL = new ChiTietQuangCaoBLL();
     phieuDangKyBLL     = new PhieuDangKyBLL();
     loaiQuangCaoBLL    = new LoaiQuangCaoBLL();
     viTriBLL           = new ViTriBLL();
     baoBLL             = new BaoBLL();
 }
Exemplo n.º 7
0
 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);
            }
        }
Exemplo n.º 10
0
        private void LoadData()
        {
            PhieuDangKyBLL Dt = new PhieuDangKyBLL();

            dGVdsphieudangky.DataSource = Dt.GetData();
        }