예제 #1
0
파일: page8.aspx.cs 프로젝트: yenyulin/ISR
    private void BindGrid()
    {
        OleDbCommand cmd = new OleDbCommand("select * from Examples");
        DataSet      ds1 = SQLUtil.QueryDS(cmd);

        //IList lists = mgr.getExamplesList();

        ExpGrid.DataSource = SQLUtil.QueryDS(cmd);
        ExpGrid.DataBind();
    }
예제 #2
0
파일: page8.aspx.cs 프로젝트: yenyulin/ISR
    protected void Btn_Command(object sender, CommandEventArgs e)
    {
        //IList lists = mgr.getExamplesListByYear(e.CommandArgument.ToString());
        OleDbCommand cmd = new OleDbCommand("select * from Examples where Year=? order by Year desc");

        cmd.Parameters.AddWithValue("?", e.CommandArgument.ToString());
        DataSet ds1 = SQLUtil.QueryDS(cmd);

        ExpGrid.DataSource = ds1;
        ExpGrid.DataBind();
    }