예제 #1
0
        //设置搜索按钮点击事件
        private void bt_select_Click(object sender, EventArgs e)
        {
            string  stuName    = isNull(tb_stuName.Text);
            string  courseName = cb_className.SelectedValue.ToString();
            DataSet dataSet    = DAO_S_C.selectS_CData(stuName, courseName);

            dataGridView1.DataSource = dataSet.Tables["s_c"];
        }
예제 #2
0
        //设置表格数据调用方法
        private void setStu_CourData()
        {
            string  stuName    = null;
            string  courseName = null;
            DataSet dataSet    = DAO_S_C.selectS_CData(stuName, courseName);

            dataGridView1.DataSource = dataSet.Tables["s_c"];
        }