Пример #1
0
        /// <summary>
        /// Load all namhoc to combobox danh sach hoc sinh
        /// </summary>
        void LoadNamHoc_DSHS()
        {
            if (listNamHoc.Count == 0)
            {
                listNamHoc = namhocbll.GetListNamHoc();
            }

            List <string> listTenNH = new List <string>();

            foreach (NamHoc namhoc in listNamHoc)
            {
                listTenNH.Add(namhoc.MaNamHoc);
            }

            cbNH_DSHS.DataSource = listTenNH;
        }
Пример #2
0
        private void ThemSuaKhoiLop_Load(object sender, EventArgs e)
        {
            btnHuyBo.IconVisible = btnLuu.IconVisible = true;
            NamHocBLL     nhbll  = new NamHocBLL();
            List <NamHoc> listNH = nhbll.GetListNamHoc();
            List <string> dsNH   = new List <string>();

            foreach (NamHoc namhoc in listNH)
            {
                dsNH.Add(namhoc.MaNamHoc);
            }

            cbMaNamHoc.DataSource = dsNH;
        }
Пример #3
0
        void LoadNamHoc()
        {
            NamHocBLL     namhocbll  = new NamHocBLL();
            List <NamHoc> listNamHoc = new List <NamHoc>();

            listNamHoc = namhocbll.GetListNamHoc();

            List <string> listTenNH = new List <string>();

            foreach (NamHoc namhoc in listNamHoc)
            {
                listTenNH.Add(namhoc.MaNamHoc);
            }

            cbDSNH.DataSource = listTenNH;
        }
Пример #4
0
        /// <summary>
        /// Load danh sach nam hoc len combobox theo tabpage
        /// </summary>
        void LoadDanhSachNamHoc(int index)
        {
            NamHocBLL     namhocbll      = new NamHocBLL();
            List <NamHoc> DanhSachNamHoc = namhocbll.GetListNamHoc();
            List <string> listMaNamHoc   = new List <string>();

            foreach (NamHoc namhoc in DanhSachNamHoc)
            {
                listMaNamHoc.Add(namhoc.MaNamHoc);
            }

            if (index == 1)
            {
                cbNamHoc_BCHK.DataSource = listMaNamHoc;
            }
            else
            {
                cbNamHoc_BCMH.DataSource = listMaNamHoc;
            }
        }