Esempio n. 1
0
 private void BindData()
 {
     try
     {
         Class1  c  = new Class1();
         DataSet ds = new DataSet();
         string  s  = "Select * from Notice";
         ds = c.select(s);
         if (ds.Tables[0].Rows[0][0] != null)
         {
             Notice.DataSource = ds;
             Notice.DataBind();
         }
     }
     catch (Exception ex)
     {
         Response.Write("<script>alert('Error:" + ex.Message + "');</script>");
     }
 }
Esempio n. 2
0
 protected void OnPaging(object sender, GridViewPageEventArgs e)
 {
     BindData();
     Notice.PageIndex = e.NewPageIndex;
     Notice.DataBind();
 }