예제 #1
0
        void BindData1()
        {
            ClassPositionGoverment pg = new ClassPositionGoverment();
            DataTable dt = pg.GetPositionGovermentSearch(txtSearchGoverPositionID.Text, txtSearchGoverPositionName.Text, txtSearchSubStaffID.Text);

            GridView1.DataSource = dt;
            GridView1.DataBind();
            SetViewState(dt);
        }
예제 #2
0
 protected void btnSearchGoverPosition_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtSearchGoverPositionID.Text) && string.IsNullOrEmpty(txtSearchGoverPositionName.Text) && string.IsNullOrEmpty(txtSearchSubStaffID.Text))
     {
         ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('กรุณากรอก คำค้นหา')", true);
         return;
     }
     else
     {
         ClassPositionGoverment pg = new ClassPositionGoverment();
         DataTable dt = pg.GetPositionGovermentSearch(txtSearchGoverPositionID.Text, txtSearchGoverPositionName.Text, txtSearchSubStaffID.Text);
         GridView1.DataSource = dt;
         GridView1.DataBind();
         SetViewState(dt);
     }
 }