Esempio n. 1
0
        void BindData1()
        {
            ClassPositionPermanent pp = new ClassPositionPermanent();
            DataTable dt = pp.GetPositionPermanentSearch(txtSearchPermaPositionID.Text, txtSearchPermaPositionName.Text, txtSearchSubStaffID.Text);

            GridView1.DataSource = dt;
            GridView1.DataBind();
            SetViewState(dt);
        }
Esempio n. 2
0
 protected void btnSearchPermaPosition_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtSearchPermaPositionID.Text) && string.IsNullOrEmpty(txtSearchPermaPositionName.Text) && string.IsNullOrEmpty(txtSearchSubStaffID.Text))
     {
         ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('กรุณากรอก คำค้นหา')", true);
         return;
     }
     else
     {
         ClassPositionPermanent pp = new ClassPositionPermanent();
         DataTable dt = pp.GetPositionPermanentSearch(txtSearchPermaPositionID.Text, txtSearchPermaPositionName.Text, txtSearchSubStaffID.Text);
         GridView1.DataSource = dt;
         GridView1.DataBind();
         SetViewState(dt);
     }
 }