Пример #1
0
        private void PhanCongGD_Load(object sender, EventArgs e)
        {
            GiangDayPCDABLL cls = new GiangDayPCDABLL();

            dgvGiangday.DataSource          = cls.HienThiDS();
            dgvGiangday.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
        }
Пример #2
0
        private void PhanCongGD_Load(object sender, EventArgs e)
        {
            GiangDayPCDABLL cls = new GiangDayPCDABLL();

            dgvGiangday.DataSource = cls.HienThiDS();
            DataTable dt = new DataTable();

            cboMon.DataSource               = cls.getMamon();
            cboLop.DataSource               = cls.getMalop();
            cboGiaovien.DataSource          = cls.getGiaovien();
            cboMon.DisplayMember            = "TenMon";
            cboMon.ValueMember              = "MaMon";
            cboLop.DisplayMember            = "TenLop";
            cboLop.ValueMember              = "MaLop";
            cboGiaovien.DisplayMember       = "HoTen";
            cboGiaovien.ValueMember         = "MaCanBoGiaoVien";
            dgvGiangday.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
        }