protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection thisconn = new SqlConnection("server=192.168.1.18;database=esprit;user id=sa;password=database");
SqlDataAdapter thisaper = new SqlDataAdapter("select * from Tdefstore", thisconn);
DataSet thisset = new DataSet();
thisaper.Fill(thisset, "Tdefstore");
GridView1.DataSource = thisset;
GridView1.DataBind();
thisconn.Close();
thisaper.Dispose();
thisset.Dispose();
thisconn.Dispose();
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
SqlConnection thisconn = new SqlConnection("server=192.168.1.18;database=esprit;user id=sa;password=database");
SqlDataAdapter thisaper = new SqlDataAdapter("select * from Tdefstore", thisconn);
DataSet thisset = new DataSet();
thisaper.Fill(thisset, "Tdefstore");
this.GridView1.DataSource = thisset;
this.GridView1.PageIndex = e.NewPageIndex;
this.GridView1.DataBind();
thisconn.Close();
thisaper.Dispose();
thisset.Dispose();
thisconn.Dispose();
}
{
SqlConnection thisconn = new SqlConnection("server=192.168.1.18;database=esprit;user id=sa;password=database");
SqlDataAdapter thisaper = new SqlDataAdapter("select * from Tdefstore", thisconn);
DataSet thisset = new DataSet();
thisaper.Fill(thisset, "Tdefstore");
GridView1.DataSource = thisset;
GridView1.DataBind();
thisconn.Close();
thisaper.Dispose();
thisset.Dispose();
thisconn.Dispose();
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
SqlConnection thisconn = new SqlConnection("server=192.168.1.18;database=esprit;user id=sa;password=database");
SqlDataAdapter thisaper = new SqlDataAdapter("select * from Tdefstore", thisconn);
DataSet thisset = new DataSet();
thisaper.Fill(thisset, "Tdefstore");
this.GridView1.DataSource = thisset;
this.GridView1.PageIndex = e.NewPageIndex;
this.GridView1.DataBind();
thisconn.Close();
thisaper.Dispose();
thisset.Dispose();
thisconn.Dispose();
}