public frm_SinhVien()
        {
            InitializeComponent();
            conn = new TV_kncsdl();
            if (conn.Moketnoi())
            {
                string sql = "select * from Lop";
                cbb_tenLop.DataSource    = conn.LayBang(sql);
                cbb_tenLop.DisplayMember = "ten_lop";
                cbb_tenLop.ValueMember   = "ma_lop";

                reloadDGV();
            }
            refresh();
            button(true, false, false, false, false, false, false, false);
        }
        public void reloadDGV()
        {
            string sql = "select mssv as MSSV, ho_ten as 'Họ tên', ma_lop as 'Mã lớp' from SinhVien";

            dgv_sinhVien.DataSource = conn.LayBang(sql);
        }
Exemple #3
0
        public void reloadDGV()
        {
            string sql = "select ma_lop as 'Mã lớp', ten_lop as 'Tên lớp' from Lop";

            dgv_lop.DataSource = conn.LayBang(sql);
        }