public void Load_CBB() { string sql_cbKhoa = "SELECT * FROM tblKhoa"; cbb_Makhoa.DataSource = Function_Connect.getdata(sql_cbKhoa); cbb_Makhoa.DisplayMember = "MaKhoa"; }
public void Load_DataGrid() { string sql = "select tblDiem.MaSV,tblDiem.MaMon,tblSinhVien.HoTen,tblSinhVien.NgaySinh,tblDiem.Diem from tblDiem inner join tblSinhVien on tblSinhVien.MaSV = tblDiem.MaSV"; dataGridView1.DataSource = Function_Connect.getdata(sql); dataGridView1.Columns[0].HeaderText = "MaSV"; dataGridView1.Columns[1].HeaderText = "MaMH"; dataGridView1.Columns[2].HeaderText = "TenSV"; dataGridView1.Columns[3].HeaderText = "Ngay Sinh"; dataGridView1.Columns[4].HeaderText = "Diem"; dataGridView1.Columns[0].Width = 120; dataGridView1.Columns[1].Width = 120; dataGridView1.Columns[2].Width = 150; dataGridView1.Columns[3].Width = 120; dataGridView1.Columns[4].Width = 110; }
public void Load_DataGrid() { string sql = "SELECT * FROM tblMonHoc"; tbl = Function_Connect.getdata(sql); dataGridView1.DataSource = tbl; dataGridView1.Columns[0].HeaderText = "Mã môn"; dataGridView1.Columns[1].HeaderText = "Tên môn"; dataGridView1.Columns[2].HeaderText = "Mã khoa"; dataGridView1.Columns[3].HeaderText = "Số phần học"; dataGridView1.Columns[4].HeaderText = "Giáo viên"; dataGridView1.Columns[0].Width = 65; dataGridView1.Columns[1].Width = 150; dataGridView1.Columns[2].Width = 65; dataGridView1.Columns[3].Width = 150; dataGridView1.Columns[4].Width = 166; }