protected void btnSearch_Click(object sender, EventArgs e)
    {
        ATTEmployeeDetailSearch search = new ATTEmployeeDetailSearch();

        if (this.ddlOrganization.SelectedIndex > 0)
        {
            search.OrgID = int.Parse(this.ddlOrganization.SelectedValue);
        }

        if (this.txtFName.Text.Trim() != "")
        {
            search.FirstName = this.txtFName.Text;
        }

        if (this.txtMName.Text.Trim() != "")
        {
            search.MiddleName = this.txtMName.Text;
        }

        if (this.txtSName.Text.Trim() != "")
        {
            search.SurName = this.txtSName.Text;
        }

        if (this.ddlSewa.SelectedIndex > 0)
        {
            search.SewaID = int.Parse(this.ddlSewa.SelectedValue);
        }

        if (this.ddlSamuha.SelectedIndex > 0)
        {
            search.SamuhaID = int.Parse(this.ddlSamuha.SelectedValue);
        }

        if (this.ddlUpaSamuha.SelectedIndex > 0)
        {
            search.UpaSamuhaID = int.Parse(this.ddlUpaSamuha.SelectedValue);
        }

        if (this.ddlPost.SelectedIndex > 0)
        {
            search.PostID = int.Parse(this.ddlPost.SelectedValue);
        }

        if (this.ddlLevel.SelectedIndex > 0)
        {
            search.LevelID = int.Parse(this.ddlLevel.SelectedValue);
        }

        if (this.ddlPostingType.SelectedIndex > 0)
        {
            search.PostingTypeID = int.Parse(this.ddlPostingType.SelectedValue);
        }

        if (this.ddlSex.SelectedIndex > 0)
        {
            search.Gender = this.ddlSex.SelectedValue;
        }

        if (this.ddlDistrict.SelectedIndex > 0)
        {
            search.DistrictID = int.Parse(this.ddlDistrict.SelectedValue);
        }

        if (this.txtTraining.Text.Trim() != "")
        {
            search.Training = this.txtTraining.Text;
        }

        if (this.txtRetirementDate.Text.Trim() != "")
        {
            search.RetirementDate         = this.txtRetirementDate.Text;
            search.RetirementDateOperator = this.ddlROperator.SelectedItem.Text;
            search.RetirementYear         = 20;
        }


        search.QualificationList = this.GetCheckedValueList(this.lstQualification);
        search.VisitList         = this.GetCheckedValueList(this.lstVisit);

        //this.grdEmployee.DataSource = BLLEmployeeDetailSearch.DetailSearchEmployee(search);
        Session["EmployeeDetailSearch"] = BLLEmployeeDetailSearch.DetailSearchEmployeeList(search);
        this.grdEmployee.DataSource     = Session["EmployeeDetailSearch"];
        this.grdEmployee.DataBind();

        //foreach (GridViewRow row in this.grdEmployee.Rows)
        //{
        //    if (row.Cells[16].Text == "hide" && row.Cells[17].Text == "hide" && row.Cells[18].Text == "hide")
        //        for (int i = 0; i <= 21; i++)
        //        {
        //            row.Cells[i].Visible = false;
        //        }
        //}

        this.LoadImageX.Width  = new Unit(0);
        this.LoadImageX.Height = new Unit(0);
    }