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(); }
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(); }