コード例 #1
0
        void BindData1()
        {
            ClassStatusWork sw = new ClassStatusWork();
            DataTable       dt = sw.GetStatusWorkSearch(txtSearchName.Text);

            GridView1.DataSource = dt;
            GridView1.DataBind();
            SetViewState(dt);
        }
コード例 #2
0
 protected void btnSearchStatusWork_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtSearchName.Text))
     {
         ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('กรุณากรอก คำค้นหา')", true);
         return;
     }
     else
     {
         ClassStatusWork sw = new ClassStatusWork();
         DataTable       dt = sw.GetStatusWorkSearch(txtSearchName.Text);
         GridView1.DataSource = dt;
         GridView1.DataBind();
         SetViewState(dt);
     }
 }