コード例 #1
0
 protected void lbuRefresh_Click(object sender, EventArgs e)
 {
     ClearData();
     ClassStaff s = new ClassStaff();
     DataTable dt = s.GetStaff("");
     GridView1.DataSource = dt;
     GridView1.DataBind();
     SetViewState(dt);
 }
コード例 #2
0
 protected void lbuSearch_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtSearchStaffName.Text))
     {
         ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('กรุณากรอก คำค้นหา')", true);
         return;
     }
     else
     {
         ClassStaff s = new ClassStaff();
         DataTable dt = s.GetStaff(txtSearchStaffName.Text);
         GridView1.DataSource = dt;
         GridView1.DataBind();
         SetViewState(dt);
     }
 }
コード例 #3
0
 void BindData1()
 {
     ClassStaff s = new ClassStaff();
     DataTable dt = s.GetStaff(txtSearchStaffName.Text);
     GridView1.DataSource = dt;
     GridView1.DataBind();
     SetViewState(dt);
 }
コード例 #4
0
 void BindData()
 {
     ClassStaff s = new ClassStaff();
     DataTable dt = s.GetStaff("");
     GridView1.DataSource = dt;
     GridView1.DataBind();
     SetViewState(dt);
 }