private void LoadDB()
        {
            bs.DataSource = monhocBUS.DanhSach();

            gridviewhp.DataSource = bs;

            txtmahp.DataBindings.Add("Text", bs, "MaHP", false, DataSourceUpdateMode.Never);
            txttenhp.DataBindings.Add("Text", bs, "TenHP", false, DataSourceUpdateMode.Never);
            txtstchp.DataBindings.Add("Text", bs, "SoTinChi", false, DataSourceUpdateMode.Never);
            cbbLoaiHocPhan.DataBindings.Add("SelectedItem", bs, "LoaiHP");
            txtTrongSoDQT.DataBindings.Add("Text", bs, "TrongSoDQT", false, DataSourceUpdateMode.Never);
            txtTrongSoDThi.DataBindings.Add("Text", bs, "TrongSoDThi", false, DataSourceUpdateMode.Never);
        }
Exemple #2
0
        private void LoadDB()
        {
            bs.DataSource        = lophpBUS.DanhSach();
            gridLopHP.DataSource = bs;

            txtmalophp.DataBindings.Add("Text", bs, "MaLopHP");
            txtSLSVLopHP.DataBindings.Add("Text", bs, "SoLuongSV");

            cbbMaHPLopHP.DataSource    = monhocBUS.DanhSach();
            cbbMaHPLopHP.DisplayMember = "TenHP";
            cbbMaHPLopHP.ValueMember   = "MaHP";
            cbbMaHPLopHP.DataBindings.Add("SelectedValue", bs, "MaHP");

            /*cbbLopTruong.DataSource = danhsachlophpBUS.DanhSach();
             * cbbLopTruong.DisplayMember = "MaSV";
             * cbbLopTruong.ValueMember = "MaSV";*/
        }