Exemplo n.º 1
0
 protected void lbuSearch_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtSearchTH.Text))
     {
         ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('กรุณากรอก คำค้นหา')", true);
         return;
     }
     else
     {
         ClassYear y = new ClassYear();
         DataTable dt = y.GetYearSearch(txtSearchTH.Text);
         GridView1.DataSource = dt;
         GridView1.DataBind();
         SetViewState(dt);
     }
 }
Exemplo n.º 2
0
 void BindData1()
 {
     ClassYear y = new ClassYear();
     DataTable dt = y.GetYearSearch(txtSearchTH.Text);
     GridView1.DataSource = dt;
     GridView1.DataBind();
     SetViewState(dt);
 }