예제 #1
0
        private void dsSingVienTheoKhoa_Load(object sender, EventArgs e)
        {
            MH                           = new BindingSource();
            MH.DataSource                = bus_mh.ds_SV();
            dataDT.DataSource            = MH;
            dataDT.Columns[0].HeaderText = "Mã SV";
            dataDT.Columns[1].HeaderText = "Họ tên SV";
            dataDT.Columns[2].HeaderText = "Môn";
            dataDT.Columns[3].HeaderText = "Học kỳ";
            dataDT.Columns[4].HeaderText = "Điểm CC";
            dataDT.Columns[5].HeaderText = "Điểm TX";
            dataDT.Columns[6].HeaderText = "Điểm GK";
            dataDT.Columns[7].HeaderText = "Điểm CK";
            dataDT.Columns[8].HeaderText = "Điểm Tổng kết";


            //Có thể thiết lập độ rộng của từng cột
            dataDT.Columns[0].Width = 20;
            dataDT.Columns[1].Width = 50;
            dataDT.Columns[2].Width = 70;
            dataDT.Columns[3].Width = 20;
            dataDT.Columns[4].Width = 20;
            dataDT.Columns[5].Width = 20;
            dataDT.Columns[6].Width = 20;
            dataDT.Columns[7].Width = 20;
            dataDT.Columns[8].Width = 50;

            comboMH.DataSource    = bus_mh.MonHoc();
            comboMH.DisplayMember = "TENMH";
            comboMH.ValueMember   = "MAMH";
            comboMH.SelectedIndex = -1;
            comboMH.Text          = "[ Chọn môn học ...]";
        }
예제 #2
0
        private void MonHoc_Load(object sender, EventArgs e)
        {
            gridDS.DataSource            = bus_MonHoc.MonHoc();
            gridDS.Columns[0].HeaderText = "Mã MH";
            gridDS.Columns[1].HeaderText = "Tên môn học";
            gridDS.Columns[2].HeaderText = "Số tiết";

            gridDS.Columns[0].Width = 70;
            gridDS.Columns[1].Width = 200;
            gridDS.Columns[2].Width = 70;

            gridDS.AllowUserToAddRows    = false;
            gridDS.AllowUserToDeleteRows = false;
            gridDS.Width  = this.ClientSize.Width;
            gridDS.Height = this.ClientSize.Height;

            binding();
        }
        private void ThongKeDiemSVTheoLop_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'QLHSSV_TTLLDataSet1.SV_Select_DiemMonHocTheoLop' table. You can move, or remove it, as needed.

            comboLop.DataSource    = bus_lop.LOP();
            comboLop.DisplayMember = "TENLOP";
            comboLop.ValueMember   = "MALOP";
            comboLop.Text          = "[Chọn lớp ...]";

            combMon.DataSource    = bus_MH.MonHoc();
            combMon.DisplayMember = "TENMH";
            combMon.ValueMember   = "MAMH";
            combMon.Text          = "[Chọn môn ...]";


            this.reportViewer1.RefreshReport();
            this.reportViewer1.RefreshReport();
            this.reportViewer1.RefreshReport();
            this.reportViewer1.RefreshReport();
        }