private void simpleButtonThem_Click(object sender, EventArgs e)
 {
     if (_isAddButton)
     {
         _Disable_Control(editing: true);
         DataRow m_Row = m_HocKyCtrl.ThemDongMoi();
         m_Row["MaHocKy"]  = "HK" + quyDinh.LaySTT1(dGVHocKy.Rows.Count + 1);
         m_Row["TenHocKy"] = "";
         m_Row["MaNamHoc"] = "";
         m_HocKyCtrl.ThemHocKy(m_Row);
         bindingNavigatorHocKy.BindingSource.MoveLast();
     }
     else
     {
         _Disable_Control(editing: false);
         m_NamHocCtrl.HienThiDataGridViewComboBoxColumn(colMaNamHoc);
         m_HocKyCtrl.HienThi(dGVHocKy, bindingNavigatorHocKy);
     }
 }
        private void simpleButtonThem_Click(object sender, EventArgs e)
        {
            if (_isAddButton)
            {
                _Disable_Control(editing: true);

                DataRow m_Row = m_GiaoVienCtrl.ThemDongMoi();
                m_Row["MaGiaoVien"]  = "GV" + quyDinh.LaySTT1(dGVGiaoVien.Rows.Count + 1);
                m_Row["TenGiaoVien"] = "";
                m_Row["MaMonHoc"]    = "";
                m_GiaoVienCtrl.ThemGiaoVien(m_Row);
                bindingNavigatorGiaoVien.BindingSource.MoveLast();
            }
            else
            {
                _Disable_Control(editing: false);
                m_MonHocCtrl.HienThiDataGridViewComboBoxColumnGiaoVien(colMaMonHoc);
                m_GiaoVienCtrl.HienThi(dGVGiaoVien, bindingNavigatorGiaoVien);
            }
        }
 private void simpleButtonThem_Click(object sender, EventArgs e)
 {
     if (_isAddButton)
     {
         _Disable_Control(editing: true);
         DataRow m_Row = m_KhoiLopCtrl.ThemDongMoi();
         m_Row["MaKhoiLop"]  = "K" + quyDinh.LaySTT1(dGVKhoiLop.Rows.Count + 1);
         m_Row["TenKhoiLop"] = "";
         m_Row["KyHieu"]     = "";
         m_Row["SoLop"]      = 0;
         m_Row["MaNamHoc"]   = "";
         m_KhoiLopCtrl.ThemKhoiLop(m_Row);
         bindingNavigatorKhoiLop.BindingSource.MoveLast();
     }
     else
     {
         _Disable_Control(editing: false);
         m_NamHocCtrl.HienThiDataGridViewComboBoxColumn(colMaNamHoc);
         m_KhoiLopCtrl.HienThi(dGVKhoiLop, bindingNavigatorKhoiLop);
     }
 }
        private void simpleButtonThem_Click(object sender, EventArgs e)
        {
            if (_isAddButton)
            {
                _Disable_Control(editing: true);

                DataRow m_Row = m_HocSinhCtrl.ThemDongMoi();
                m_Row["MaHocSinh"] = "HS" + quyDinh.LaySTT1(dGVHocSinh.Rows.Count + 1);
                m_Row["HoTen"]     = "";
                m_Row["GioiTinh"]  = false;
                m_Row["NgaySinh"]  = DateTime.Today;
                m_Row["Email"]     = "";
                m_Row["DiaChi"]    = "";

                m_HocSinhCtrl.ThemHocSinh(m_Row);
                bindingNavigatorHocSinh.BindingSource.MoveLast();
            }
            else
            {
                _Disable_Control(editing: false);
                m_HocSinhCtrl.HienThi(dGVHocSinh, bindingNavigatorHocSinh);
            }
        }
示例#5
0
        private void simpleButtonThem_Click(object sender, EventArgs e)
        {
            if (_isAddButton)
            {
                _Disable_Control(editing: true);

                DataRow m_Row = m_NguoiDungCtrl.ThemDongMoi();
                m_Row["MaND"]       = "ND" + quyDinh.LaySTT1(dGVNguoiDung.Rows.Count + 1);
                m_Row["MaLoai"]     = "";
                m_Row["MaGiaoVien"] = "";
                m_Row["TenDNhap"]   = "";
                m_Row["MatKhau"]    = "";
                m_NguoiDungCtrl.ThemNguoiDung(m_Row);
                bindingNavigatorNguoiDung.BindingSource.MoveLast();
            }
            else
            {
                _Disable_Control(editing: false);
                m_LoaiNguoiDungCtrl.HienThiDataGridViewComboBoxColumn(colMaLoai);
                m_GiaoVienCtrl.HienThiDataGridViewComboBoxColumn(colMaGiaoVien);
                m_NguoiDungCtrl.HienThi(dGVNguoiDung, bindingNavigatorNguoiDung);
            }
        }