Beispiel #1
0
        public void LoadLop()
        {
            var list = LopService.getLopHP();

            dataGridViewLop.AutoGenerateColumns = false;
            bdsLop.DataSource          = list;
            dataGridViewLop.DataSource = bdsLop;
        }
Beispiel #2
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            MonHoc monSelected = (MonHoc)cbMH.SelectedItem;
            var    list        = LopService.getLopHP(monSelected.MaMonHoc);

            bdsLop.DataSource          = list;
            dataGridViewLop.DataSource = bdsLop;
            txtMaLopHP.Text            = monSelected.TenMonHoc;
        }
Beispiel #3
0
        private void dataGridViewLop_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            var lop = bdsLop.Current as LopHocPhan;

            txtMaLopHP.Text = lop.MaLopHP;
            txtMax.Text     = lop.ToiDa.ToString();
            txtMin.Text     = lop.ToiThieu.ToString();
            txtGV.Text      = lop.GiaoVienPT;
            txtSoLuong.Text = LopService.CountSv(lop.MaLopHP).ToString();
            LoadSV();
        }
Beispiel #4
0
        public void LoadSV()
        {
            var lop    = bdsLop.Current as LopHocPhan;
            var list   = LopService.getListMaSV(lop.MaLopHP);
            var listSV = new List <SinhVien>();

            foreach (string masv in list)
            {
                SinhVien sv = SinhVien.getSinhVienInfo(masv);
                listSV.Add(sv);
            }
            dataGridViewSV.AutoGenerateColumns = false;
            bdsSV.DataSource          = listSV;
            dataGridViewSV.DataSource = bdsSV;
            txtSoLuong.Text           = LopService.CountSv(lop.MaLopHP).ToString();
        }