Exemplo n.º 1
0
        void BindData1()
        {
            ClassPosition p  = new ClassPosition();
            DataTable     dt = p.GetPositionSearch(txtSearchPositionID.Text, txtSearchPositionName.Text, txtSearchSubStaffID.Text);

            GridView1.DataSource = dt;
            GridView1.DataBind();
            SetViewState(dt);
        }
Exemplo n.º 2
0
 protected void btnSearchPosition_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtSearchPositionID.Text) && string.IsNullOrEmpty(txtSearchPositionName.Text) && string.IsNullOrEmpty(txtSearchSubStaffID.Text))
     {
         ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('กรุณากรอก คำค้นหา')", true);
         return;
     }
     else
     {
         ClassPosition p  = new ClassPosition();
         DataTable     dt = p.GetPositionSearch(txtSearchPositionID.Text, txtSearchPositionName.Text, txtSearchSubStaffID.Text);
         GridView1.DataSource = dt;
         GridView1.DataBind();
         SetViewState(dt);
     }
 }