protected void lbuRefresh_Click(object sender, EventArgs e)
 {
     ClearData();
     ClassSalMinMax smm = new ClassSalMinMax();
     DataTable dt = smm.GetSalMinMax("", "", "", "", "");
     GridView1.DataSource = dt;
     GridView1.DataBind();
     SetViewState(dt);
 }
 void BindData()
 {
     ClassSalMinMax smm = new ClassSalMinMax();
     DataTable dt = smm.GetSalMinMax("", "", "", "", "");
     GridView1.DataSource = dt;
     GridView1.DataBind();
     SetViewState(dt);
 }
 void BindData1()
 {
     if (ddlSearchPosiGroup.SelectedIndex != 0)
     {
         ClassSalMinMax smm = new ClassSalMinMax();
         DataTable dt = smm.GetSalMinMax(ddlSearchPosiGroup.SelectedValue, "", "", "", "");
         GridView1.DataSource = dt;
         GridView1.DataBind();
         SetViewState(dt);
     }
     if (ddlSearchPosi.SelectedIndex != 0)
     {
         ClassSalMinMax smm = new ClassSalMinMax();
         DataTable dt = smm.GetSalMinMax("", ddlSearchPosi.SelectedValue, "", "", "");
         GridView1.DataSource = dt;
         GridView1.DataBind();
         SetViewState(dt);
     }
     if (!string.IsNullOrEmpty(txtSearchSalMin.Text))
     {
         ClassSalMinMax smm = new ClassSalMinMax();
         DataTable dt = smm.GetSalMinMax("", "", txtSearchSalMin.Text, "", "");
         GridView1.DataSource = dt;
         GridView1.DataBind();
         SetViewState(dt);
     }
     if (!string.IsNullOrEmpty(txtSearchSalMax.Text))
     {
         ClassSalMinMax smm = new ClassSalMinMax();
         DataTable dt = smm.GetSalMinMax("", "", "", txtSearchSalMax.Text, "");
         GridView1.DataSource = dt;
         GridView1.DataBind();
         SetViewState(dt);
     }
     if (!string.IsNullOrEmpty(txtSearchSalMin.Text))
     {
         ClassSalMinMax smm = new ClassSalMinMax();
         DataTable dt = smm.GetSalMinMax("", "", "", "", txtSearchSalMinTemp.Text);
         GridView1.DataSource = dt;
         GridView1.DataBind();
         SetViewState(dt);
     }
 }
        protected void lbuSearch_Click(object sender, EventArgs e)
        {
            if (ddlSearchPosiGroup.SelectedIndex == 0 && ddlSearchPosi.SelectedIndex == 0 && txtSearchSalMin.Text == "" && txtSearchSalMax.Text == "" && txtSearchSalMinTemp.Text == "")
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('กรุณากรอก คำค้นหา')", true);

                return;
            }
            else
            {
                if (ddlSearchPosiGroup.SelectedIndex != 0)
                {
                    ClassSalMinMax smm = new ClassSalMinMax();
                    DataTable dt = smm.GetSalMinMax(ddlSearchPosiGroup.SelectedValue, "", "", "", "");
                    GridView1.DataSource = dt;
                    GridView1.DataBind();
                    SetViewState(dt);
                }
                if (ddlSearchPosi.SelectedIndex != 0)
                {
                    ClassSalMinMax smm = new ClassSalMinMax();
                    DataTable dt = smm.GetSalMinMax("", ddlSearchPosi.SelectedValue, "", "", "");
                    GridView1.DataSource = dt;
                    GridView1.DataBind();
                    SetViewState(dt);
                }
                if (!string.IsNullOrEmpty(txtSearchSalMin.Text))
                {
                    ClassSalMinMax smm = new ClassSalMinMax();
                    DataTable dt = smm.GetSalMinMax("", "", txtSearchSalMin.Text, "", "");
                    GridView1.DataSource = dt;
                    GridView1.DataBind();
                    SetViewState(dt);
                }
                if (!string.IsNullOrEmpty(txtSearchSalMax.Text))
                {
                    ClassSalMinMax smm = new ClassSalMinMax();
                    DataTable dt = smm.GetSalMinMax("", "", "", txtSearchSalMax.Text, "");
                    GridView1.DataSource = dt;
                    GridView1.DataBind();
                    SetViewState(dt);
                }
                if (!string.IsNullOrEmpty(txtSearchSalMin.Text))
                {
                    ClassSalMinMax smm = new ClassSalMinMax();
                    DataTable dt = smm.GetSalMinMax("", "", "", "", txtSearchSalMinTemp.Text);
                    GridView1.DataSource = dt;
                    GridView1.DataBind();
                    SetViewState(dt);
                }
            }
        }