Пример #1
0
        void BindData1()
        {
            ClassStatusPerson sp = new ClassStatusPerson();
            DataTable         dt = sp.GetStatusPersonSearch(txtSearchStatusPersonID.Text, txtSearchStatusPersonName.Text);

            GridView1.DataSource = dt;
            GridView1.DataBind();
            SetViewState(dt);
        }
Пример #2
0
 protected void btnSearchStatusPerson_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtSearchStatusPersonID.Text) && string.IsNullOrEmpty(txtSearchStatusPersonName.Text))
     {
         ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('กรุณากรอก คำค้นหา')", true);
         return;
     }
     else
     {
         ClassStatusPerson sp = new ClassStatusPerson();
         DataTable         dt = sp.GetStatusPersonSearch(txtSearchStatusPersonID.Text, txtSearchStatusPersonName.Text);
         GridView1.DataSource = dt;
         GridView1.DataBind();
         SetViewState(dt);
     }
 }