public static List <ATTEmployeeDetailSearch> PropertyReportSearchList(ATTEmployeeDetailSearch objEmployee)
        {
            List <ATTEmployeeDetailSearch> lst = new List <ATTEmployeeDetailSearch>();

            try
            {
                foreach (DataRow row in DLLEmployeeDetailSearch.PropertyReportSearch(objEmployee).Rows)
                {
                    ATTEmployeeDetailSearch obj = new ATTEmployeeDetailSearch();

                    //obj.EmpID = d


                    obj.OrgName    = row["Org_Name"].ToString();
                    obj.EmpID      = double.Parse(row["emp_id"].ToString());
                    obj.FirstName  = row["first_name"].ToString();
                    obj.MiddleName = row["mid_name"].ToString();
                    obj.SurName    = row["sur_name"].ToString();

                    obj.PostName        = row["des_name"].ToString();
                    obj.LevelName       = row["level_name"].ToString();
                    obj.PostingTypeName = row["posting_type_name"].ToString();
                    obj.Gender          = row["Gender"].ToString();

                    lst.Add(obj);
                }

                return(lst);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#2
0
        public static DataTable PropertyReportSearch(ATTEmployeeDetailSearch objRptSearch)
        {
            GetConnection GetConn = new GetConnection();

            try
            {
                string SearchSQL = "";
                SearchSQL = QueryBuilder(objRptSearch);

                OracleConnection DBConn = GetConn.GetDbConn(Module.PMS);
                DataSet          ds     = SqlHelper.ExecuteDataset(DBConn, CommandType.Text, SearchSQL);

                DataTable tbl = new DataTable();
                tbl = (DataTable)ds.Tables[0];

                return(tbl);
            }
            catch (OracleException oex)
            {
                PCS.COREDL.OracleError oe = new PCS.COREDL.OracleError();
                throw new ArgumentException(oe.GetOraError(oex.Number, oex.Message));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                GetConn.CloseDbConn();
            }
        }
 public static DataTable DetailSearchEmployee(ATTEmployeeDetailSearch objEmployee)
 {
     try
     {
         return(DLLEmployeeDetailSearch.DetailSearchEmployee(objEmployee));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#4
0
        public static string QueryBuilder(ATTEmployeeDetailSearch objEmployee)
        {
            try
            {
                string selectSQL = "";
                selectSQL  = "SELECT A.*,B.LEVEL_NAME,B.DES_NAME,B.ORG_NAME,B.POSTING_TYPE_NAME ";
                selectSQL += "FROM VW_EMPLOYEES A,VW_EMP_POSTING B WHERE 1=1 ";

                if (objEmployee.OrgID != null)
                {
                    selectSQL += " AND B.ORG_ID=" + objEmployee.OrgID;
                }

                if (objEmployee.FirstName != "")
                {
                    selectSQL += " AND upper(A.FIRST_NAME) LIKE '" + objEmployee.FirstName + "' || '%'";
                }

                if (objEmployee.MiddleName != "")
                {
                    selectSQL += " AND upper(A.MID_NAME) LIKE '" + objEmployee.MiddleName + "' || '%'";
                }

                if (objEmployee.SurName != "")
                {
                    selectSQL += " AND upper(A.SUR_NAME) LIKE '" + objEmployee.SurName + "' || '%'";
                }

                if (objEmployee.PostID != null)
                {
                    selectSQL += " AND B.des_ID =" + objEmployee.PostID;
                }

                if (objEmployee.LevelID != null)
                {
                    selectSQL += " AND B.level_ID =" + objEmployee.LevelID;
                }

                //selectSQL += " AND A.EMP_ID=B.EMP_ID(+)";
                selectSQL += " AND A.EMP_ID=B.EMP_ID";



                return(selectSQL);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
        public static List <ATTEmployeeDetailSearch> DetailSearchEmployeeList(ATTEmployeeDetailSearch objEmployee)
        {
            List <ATTEmployeeDetailSearch> lst = new List <ATTEmployeeDetailSearch>();

            try
            {
                foreach (DataRow row in DLLEmployeeDetailSearch.DetailSearchEmployee(objEmployee).Rows)
                {
                    ATTEmployeeDetailSearch obj = new ATTEmployeeDetailSearch();
                    obj.EmpID           = double.Parse(row["emp_id"].ToString());
                    obj.FirstName       = row["first_name"].ToString();
                    obj.MiddleName      = row["mid_name"].ToString();
                    obj.SurName         = row["sur_name"].ToString();
                    obj.SewaName        = row["sewa_name"].ToString();
                    obj.SamuhaName      = row["samuha_name"].ToString();
                    obj.UpaSamuhaName   = row["upa_samuha_name"].ToString();
                    obj.PostName        = row["des_name"].ToString();
                    obj.LevelName       = row["level_name"].ToString();
                    obj.PostingTypeName = row["posting_type_name"].ToString();
                    obj.Gender          = row["Gender"].ToString();
                    obj.DistrictName    = row["eng_distname"].ToString();
                    obj.SubjectID       = (row["Sub_ID"] == System.DBNull.Value) ? 0 : int.Parse(row["Sub_ID"].ToString());
                    obj.Training        = row["subject"].ToString();
                    //obj.RetirementDate = row["subject"].ToString();
                    obj.DegreeID          = (row["Deg_ID"] == System.DBNull.Value) ? 0 : int.Parse(row["Deg_ID"].ToString());
                    obj.QualificationName = row["DEGREE_NAME"].ToString();
                    obj.VisitCountryID    = (row["country_ID"] == System.DBNull.Value) ? 0 : int.Parse(row["country_ID"].ToString());
                    obj.VisitCountryName  = row["COUNTRY_ENG_NAME"].ToString();
                    obj.VisitPurpose      = row["purpose"].ToString();
                    obj.VisitFromDate     = row["v_from_date"].ToString();
                    obj.VisitToDate       = row["to_date"].ToString();
                    obj.JoiningDate       = row["p_from_date"].ToString();
                    obj.RetirementDate    = row["retirement_date"].ToString();
                    lst.Add(obj);
                }

                return(lst);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        try
        {
            ATTEmployeeDetailSearch objSearch = new ATTEmployeeDetailSearch();

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

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

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

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

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

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

            Session["propertyReportSearch"] = BLLEmployeeDetailSearch.PropertyReportSearchList(objSearch);

            List <ATTEmployeeDetailSearch> lst = (List <ATTEmployeeDetailSearch>)Session["propertyReportSearch"];

            if (lst.Count > 0)
            {
                string count = "";

                count = lst.Count.ToString().Replace("0", "०");
                count = count.ToString().Replace("1", "१");
                count = count.ToString().Replace("2", "२");
                count = count.ToString().Replace("3", "३");
                count = count.ToString().Replace("4", "४");
                count = count.ToString().Replace("5", "५");
                count = count.ToString().Replace("6", "६");
                count = count.ToString().Replace("7", "७");
                count = count.ToString().Replace("8", "८");
                count = count.ToString().Replace("9", "९");

                lblSearchResult.Text = count + " वटा  रेकर्ड भेटिए ... ";

                this.grdEmployeeSearch.DataSource = Session["propertyReportSearch"];
                this.grdEmployeeSearch.DataBind();
            }
            else
            {
                lblSearchResult.Text = "कुनै पनि रेकर्ड भेटिएनन् ... ";

                this.grdEmployeeSearch.DataSource = "";
                this.grdEmployeeSearch.DataBind();

                this.btnGenerateRpt.Visible = false;
            }
        }
        catch (Exception ex)
        {
            throw(ex);
        }
    }
示例#7
0
        public static DataTable DetailSearchEmployee(ATTEmployeeDetailSearch objEmployee)
        {
            try
            {
                string strSelectSQL = "";

                string tableName1 = "";
                string colName1   = "";
                string where1     = "";

                string tableName2 = "";
                string colName2   = "";
                string where2     = "";

                string tableName3 = "";
                string colName3   = "";
                string where3     = "";


                //if (objEmployee.Training != "")
                //{
                tableName1 = ",TRAINING T";
                colName1   = ",T.SEQ_NO as sub_id, T.subject";
                where1     = " AND VW.EMP_ID=T.P_ID(+)";
                //}

                //if (objEmployee.QualificationList.Count > 0)
                //{
                tableName2 = ",QUALIFICATION Q, DEGREE D";
                colName2   = ",Q.SEQ_NO AS DEG_ID,D.DEGREE_NAME";
                where2     = " AND VW.EMP_ID=Q.P_ID(+) AND Q.DEGREE_ID=D.DEGREE_ID(+)";
                //}

                //if (objEmployee.VisitList.Count > 0)
                //{
                tableName3 = ",EMP_VISIT V,COUNTRY C";
                colName3   = ",C.COUNTRY_ENG_NAME ,V.PURPOSE,V.FROM_DATE \"v_from_date\",V.TO_DATE, V.SEQ_NO AS COUNTRY_ID ";
                where3     = " AND VW.EMP_ID=V.EMP_ID(+) AND V.COUNTRY=C.COUNTRY_ID(+)";
                //}

                strSelectSQL = "SELECT VW.*,fn_add_years(VW.\"P_FROM_DATE\"," + objEmployee.RetirementYear + ") as retirement_date" + colName1 + colName2 + colName3 + " FROM VW_EMP_POSTING VW" + tableName1 + tableName2 + tableName3 + " WHERE 1=1" + where1 + where2 + where3;

                List <OracleParameter> paramArray = new List <OracleParameter>();

                if (objEmployee.OrgID != null)
                {
                    strSelectSQL += " AND VW.ORG_ID=:ORGID";
                    paramArray.Add(new OracleParameter(":ORGID", objEmployee.OrgID));
                }

                if (objEmployee.FirstName != "")
                {
                    strSelectSQL += " AND upper(VW.FIRST_NAME) LIKE :FName||'%'";
                    paramArray.Add(new OracleParameter(":FName", objEmployee.FirstName.ToUpper()));
                }
                if (objEmployee.MiddleName != "")
                {
                    strSelectSQL += " AND upper(VW.MID_NAME) LIKE :MName||'%'";
                    paramArray.Add(new OracleParameter(":MName", objEmployee.MiddleName.ToUpper()));
                }

                if (objEmployee.SurName != "")
                {
                    strSelectSQL += " AND upper(VW.SUR_NAME) LIKE :SurName||'%'";
                    paramArray.Add(new OracleParameter(":SurName", objEmployee.SurName.ToUpper()));
                }

                if (objEmployee.SewaID != null)
                {
                    strSelectSQL += " AND VW.SEWA_ID =:SEWAID";
                    paramArray.Add(new OracleParameter(":SEWAID", objEmployee.SewaID));
                }

                if (objEmployee.SamuhaID != null)
                {
                    strSelectSQL += " AND VW.samuha_ID =:samuhaID";
                    paramArray.Add(new OracleParameter(":samuhaID", objEmployee.SamuhaID));
                }

                if (objEmployee.UpaSamuhaID != null)
                {
                    strSelectSQL += " AND VW.upa_samuha_ID =:upasamuhaID";
                    paramArray.Add(new OracleParameter(":upasamuhaID", objEmployee.UpaSamuhaID));
                }

                if (objEmployee.PostID != null)
                {
                    strSelectSQL += " AND VW.des_ID =:desID";
                    paramArray.Add(new OracleParameter(":desID", objEmployee.PostID));
                }

                if (objEmployee.LevelID != null)
                {
                    strSelectSQL += " AND VW.level_ID =:levelID";
                    paramArray.Add(new OracleParameter(":levelID", objEmployee.LevelID));
                }

                if (objEmployee.PostingTypeID != null)
                {
                    strSelectSQL += " AND VW.posting_type_id =:ptID";
                    paramArray.Add(new OracleParameter(":ptID", objEmployee.LevelID));
                }

                if (objEmployee.Gender != "")
                {
                    strSelectSQL += " AND VW.GENDER = :Gender";
                    paramArray.Add(new OracleParameter(":Gender", objEmployee.Gender));
                }

                if (objEmployee.DistrictID != null)
                {
                    strSelectSQL += " AND VW.birth_district = :distID";
                    paramArray.Add(new OracleParameter(":distID", objEmployee.DistrictID));
                }

                if (objEmployee.Training != "")
                {
                    strSelectSQL += " AND upper(T.subject) LIKE :subjectx||'%'";
                    paramArray.Add(new OracleParameter(":subjectx", objEmployee.Training.ToUpper()));
                }

                if (objEmployee.RetirementDate != "")
                {
                    strSelectSQL += " AND VW.\"P_FROM_DATE\"" + objEmployee.RetirementDateOperator + "fn_add_years(:rDate, -" + objEmployee.RetirementYear + ")";
                    paramArray.Add(new OracleParameter(":rDate", objEmployee.RetirementDate.Replace("/", ".")));
                }

                if (objEmployee.QualificationList != null)
                {
                    if (objEmployee.QualificationList.Count > 0)
                    {
                        strSelectSQL += " AND Q.DEGREE_ID in(" + DLLEmployeeDetailSearch.GetWhereInQueryString(objEmployee.QualificationList) + ")";
                    }
                }

                if (objEmployee.VisitList != null)
                {
                    if (objEmployee.VisitList.Count > 0)
                    {
                        strSelectSQL += " AND V.COUNTRY in(" + DLLEmployeeDetailSearch.GetWhereInQueryString(objEmployee.VisitList) + ")";
                    }
                }

                strSelectSQL += " ORDER BY vw.emp_id, t.SEQ_NO , q.SEQ_NO , v.SEQ_NO";

                DataTable tbl = SqlHelper.ExecuteDataset(CommandType.Text, strSelectSQL, Module.PMS, paramArray.ToArray()).Tables[0];
                return(tbl);
            }
            catch (OracleException oex)
            {
                PCS.COREDL.OracleError oe = new PCS.COREDL.OracleError();
                throw new ArgumentException(oe.GetOraError(oex.Number, oex.Message));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    protected void grdEmployee_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        e.Row.Cells[0].Visible  = false;
        e.Row.Cells[16].Visible = false; //subject
        e.Row.Cells[17].Visible = false; //degree
        e.Row.Cells[18].Visible = false; //visited country

        //if (e.Row.RowType == DataControlRowType.DataRow)
        //e.Row.Cells[1].Text = (e.Row.RowIndex + 1).ToString();

        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            List <ATTEmployeeDetailSearch> lst = (List <ATTEmployeeDetailSearch>)Session["EmployeeDetailSearch"];

            this.oTraining = lst.Find
                             (
                delegate(ATTEmployeeDetailSearch s)
            {
                return(s.EmpID == double.Parse(e.Row.Cells[0].Text) &&
                       s.SubjectID == int.Parse(e.Row.Cells[16].Text));
            }
                             );
            //if (oTraining == null) oTraining = new ATTEmployeeDetailSearch();

            this.oDegree = lst.Find
                           (
                delegate(ATTEmployeeDetailSearch s)
            {
                return(s.EmpID == double.Parse(e.Row.Cells[0].Text) &&
                       s.DegreeID == int.Parse(e.Row.Cells[17].Text));
            }
                           );
            //if (oDegree == null) oDegree = new ATTEmployeeDetailSearch();

            this.oVisit = lst.Find
                          (
                delegate(ATTEmployeeDetailSearch s)
            {
                return(s.EmpID == double.Parse(e.Row.Cells[0].Text) &&
                       s.VisitCountryID == int.Parse(e.Row.Cells[18].Text));
            }
                          );
            //if (oVisit == null) oVisit = new ATTEmployeeDetailSearch();

            if (this.EmpID == e.Row.Cells[0].Text)
            {
                //for (int i = 1; i <= 15; i++)
                //{
                //    if (i != 11 && i != 14 && i != 15)
                //    {
                //        if (this.grdEmployee.Rows[empRow].Cells[i].RowSpan == 0)
                //            this.grdEmployee.Rows[empRow].Cells[i].RowSpan = 2;
                //        else
                //            this.grdEmployee.Rows[empRow].Cells[i].RowSpan += 1;
                //        e.Row.Cells[i].Visible = false;
                //    }
                //}

                if (this.oTraining.IsTrainingMerged == 1)
                {
                    e.Row.Cells[11].Text = "";
                    e.Row.Cells[16].Text = "hide";
                }
                else
                {
                    this.trainStr += "<br>" + lst[e.Row.RowIndex].Training + " | ";
                    this.grdEmployee.Rows[trainRow].Cells[11].Text = this.trainStr;
                    //e.Row.VerticalAlign = VerticalAlign.Middle;
                    this.oTraining.IsTrainingMerged = 1;
                }

                if (this.oDegree.IsDegreeMerged == 1)
                {
                    e.Row.Cells[14].Text = "";
                    e.Row.Cells[17].Text = "hide";
                }
                else
                {
                    this.quaStr += "<br>" + lst[e.Row.RowIndex].QualificationName + " | ";
                    this.grdEmployee.Rows[quaRow].Cells[14].Text = this.quaStr;
                    //e.Row.VerticalAlign = VerticalAlign.Middle;
                    this.oDegree.IsDegreeMerged = 1;
                }

                if (this.oVisit.IsVisitMerged == 1)
                {
                    //e.Row.Cells[15].Text = "";
                    //e.Row.Cells[19].Text = "";
                    //e.Row.Cells[20].Text = "";
                    //e.Row.Cells[21].Text = "";
                    //e.Row.Cells[18].Text = "hide";
                }
                else
                {
                    this.visitStr += "<br>" + lst[e.Row.RowIndex].VisitCountryName + " | ";
                    this.purpose  += "<br>" + lst[e.Row.RowIndex].VisitPurpose + " | ";
                    this.fromDate += "<br>" + lst[e.Row.RowIndex].VisitFromDate + " | ";
                    this.toDate   += "<br>" + lst[e.Row.RowIndex].VisitToDate + " | ";

                    this.grdEmployee.Rows[visitRow].Cells[15].Text = this.visitStr;
                    this.grdEmployee.Rows[visitRow].Cells[19].Text = this.purpose;
                    this.grdEmployee.Rows[visitRow].Cells[20].Text = this.fromDate;
                    this.grdEmployee.Rows[visitRow].Cells[21].Text = this.toDate;
                    //e.Row.VerticalAlign = VerticalAlign.Middle;
                    this.oVisit.IsVisitMerged = 1;
                }


                //if (e.Row.Cells[16].Text == "hide" && e.Row.Cells[17].Text == "hide" && e.Row.Cells[18].Text == "hide")
                for (int i = 0; i <= 21; i++)
                {
                    e.Row.Cells[i].Visible = false;
                }
            }

            #region "Commented part"
            //if (this.grdEmployee.Rows[firstRow].Cells[1].RowSpan == 0)
            //    this.grdEmployee.Rows[firstRow].Cells[1].RowSpan = 2;
            //else
            //    this.grdEmployee.Rows[firstRow].Cells[1].RowSpan += 1;
            //e.Row.Cells[1].Visible = false;

            //if (this.grdEmployee.Rows[firstRow].Cells[2].RowSpan == 0)
            //    this.grdEmployee.Rows[firstRow].Cells[2].RowSpan = 2;
            //else
            //    this.grdEmployee.Rows[firstRow].Cells[2].RowSpan += 1;
            //e.Row.Cells[2].Visible = false;

            //if (this.grdEmployee.Rows[firstRow].Cells[3].RowSpan == 0)
            //    this.grdEmployee.Rows[firstRow].Cells[3].RowSpan = 2;
            //else
            //    this.grdEmployee.Rows[firstRow].Cells[3].RowSpan += 1;
            //e.Row.Cells[3].Visible = false;

            //if (this.grdEmployee.Rows[firstRow].Cells[4].RowSpan == 0)
            //    this.grdEmployee.Rows[firstRow].Cells[4].RowSpan = 2;
            //else
            //    this.grdEmployee.Rows[firstRow].Cells[4].RowSpan += 1;
            //e.Row.Cells[4].Visible = false;

            //if (this.grdEmployee.Rows[firstRow].Cells[5].RowSpan == 0)
            //    this.grdEmployee.Rows[firstRow].Cells[5].RowSpan = 2;
            //else
            //    this.grdEmployee.Rows[firstRow].Cells[5].RowSpan += 1;
            //e.Row.Cells[5].Visible = false;

            //if (this.grdEmployee.Rows[firstRow].Cells[6].RowSpan == 0)
            //    this.grdEmployee.Rows[firstRow].Cells[6].RowSpan = 2;
            //else
            //    this.grdEmployee.Rows[firstRow].Cells[6].RowSpan += 1;
            //e.Row.Cells[6].Visible = false;

            //if (this.grdEmployee.Rows[firstRow].Cells[7].RowSpan == 0)
            //    this.grdEmployee.Rows[firstRow].Cells[7].RowSpan = 2;
            //else
            //    this.grdEmployee.Rows[firstRow].Cells[7].RowSpan += 1;
            //e.Row.Cells[7].Visible = false;

            //if (this.grdEmployee.Rows[firstRow].Cells[8].RowSpan == 0)
            //    this.grdEmployee.Rows[firstRow].Cells[8].RowSpan = 2;
            //else
            //    this.grdEmployee.Rows[firstRow].Cells[8].RowSpan += 1;
            //e.Row.Cells[8].Visible = false;

            //if (this.grdEmployee.Rows[firstRow].Cells[9].RowSpan == 0)
            //    this.grdEmployee.Rows[firstRow].Cells[9].RowSpan = 2;
            //else
            //    this.grdEmployee.Rows[firstRow].Cells[9].RowSpan += 1;
            //e.Row.Cells[9].Visible = false;

            //if (this.grdEmployee.Rows[firstRow].Cells[10].RowSpan == 0)
            //    this.grdEmployee.Rows[firstRow].Cells[10].RowSpan = 2;
            //else
            //    this.grdEmployee.Rows[firstRow].Cells[10].RowSpan += 1;
            //e.Row.Cells[10].Visible = false;

            ////if (Training == e.Row.Cells[11].Text)
            ////{
            //    if (this.grdEmployee.Rows[firstRow].Cells[11].RowSpan == 0)
            //        this.grdEmployee.Rows[firstRow].Cells[11].RowSpan = 2;
            //    else
            //        this.grdEmployee.Rows[firstRow].Cells[11].RowSpan += 1;
            //    e.Row.Cells[11].Visible = false;
            ////}

            //if (this.grdEmployee.Rows[firstRow].Cells[12].RowSpan == 0)
            //    this.grdEmployee.Rows[firstRow].Cells[12].RowSpan = 2;
            //else
            //    this.grdEmployee.Rows[firstRow].Cells[12].RowSpan += 1;
            //e.Row.Cells[12].Visible = false;

            //if (this.grdEmployee.Rows[firstRow].Cells[13].RowSpan == 0)
            //    this.grdEmployee.Rows[firstRow].Cells[13].RowSpan = 2;
            //else
            //    this.grdEmployee.Rows[firstRow].Cells[13].RowSpan += 1;
            //e.Row.Cells[13].Visible = false;

            ////if (Qualification == e.Row.Cells[14].Text)
            ////{
            //    if (this.grdEmployee.Rows[firstRow].Cells[14].RowSpan == 0)
            //        this.grdEmployee.Rows[firstRow].Cells[14].RowSpan = 2;
            //    else
            //        this.grdEmployee.Rows[firstRow].Cells[14].RowSpan += 1;
            //    e.Row.Cells[14].Visible = false;
            ////}

            ////if (VisitedCoutry == e.Row.Cells[15].Text)
            ////{
            //    if (this.grdEmployee.Rows[firstRow].Cells[15].RowSpan == 0)
            //        this.grdEmployee.Rows[firstRow].Cells[15].RowSpan = 2;
            //    else
            //        this.grdEmployee.Rows[firstRow].Cells[15].RowSpan += 1;
            //    e.Row.Cells[15].Visible = false;
            ////}
            //}
            #endregion

            else
            {
                rowCount++;

                if (rowCount % 2 == 1)
                {
                    e.Row.BackColor = System.Drawing.Color.FromName("#E7E2E2");
                }
                else
                {
                    e.Row.BackColor = System.Drawing.Color.FromName("#ffffff");
                }

                e.Row.VerticalAlign = VerticalAlign.Middle;
                for (int i = 1; i <= 21; i++)
                {
                    e.Row.Cells[i].Style.Add("border-top", "#4F69A2 1px solid");
                }

                //e.Row.Cells[0].Text = (empCount++).ToString();

                this.EmpID = e.Row.Cells[0].Text;

                this.empRow = e.Row.RowIndex;

                this.trainRow = e.Row.RowIndex;
                this.quaRow   = e.Row.RowIndex;
                this.visitRow = e.Row.RowIndex;

                this.trainStr = lst[e.Row.RowIndex].Training + " | ";
                this.quaStr   = lst[e.Row.RowIndex].QualificationName + " | ";
                this.visitStr = lst[e.Row.RowIndex].VisitCountryName + " | ";
                this.purpose  = lst[e.Row.RowIndex].VisitPurpose + " | ";
                this.fromDate = lst[e.Row.RowIndex].VisitFromDate + " | ";
                this.toDate   = lst[e.Row.RowIndex].VisitToDate + " | ";

                this.oTraining.IsTrainingMerged = 1;
                this.oDegree.IsDegreeMerged     = 1;
                this.oVisit.IsVisitMerged       = 1;
            }
        }
    }
    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);
    }