Exemple #1
0
        public void SaveInterview(Interview Interview, int EmployeeId)
        {
            SqlConnection sqlConnection = new SqlConnection(connStr);
            try
            {
                if (sqlConnection.State == ConnectionState.Closed)
                {
                    sqlConnection.Open();
                }

                SqlCommand sqlCommand = new SqlCommand("usp_SaveInterviewDetails", sqlConnection);
                sqlCommand.CommandType = CommandType.StoredProcedure;
                sqlCommand.Parameters.Add("@EmployeeId", SqlDbType.Int).Value = EmployeeId;

                sqlCommand.Parameters.Add("@InterviewDate", SqlDbType.DateTime).Value = Interview.InterviewDate;
                sqlCommand.Parameters.Add("@InterviewSource", SqlDbType.VarChar).Value = Interview.InterviewSource;
                sqlCommand.Parameters.Add("@InterviewerName", SqlDbType.VarChar).Value = Interview.InterviewerName;
                sqlCommand.Parameters.Add("@Comments", SqlDbType.VarChar).Value = Interview.Comments;
                sqlCommand.Parameters.Add("@IsBKR", SqlDbType.Bit).Value = Interview.IsBKR;
                sqlCommand.Parameters.Add("@IsGoodConduct", SqlDbType.Bit).Value = Interview.IsGoodConduct;
                sqlCommand.Parameters.Add("@IsMunicipalRecords", SqlDbType.Bit).Value = Interview.IsMunicipalRecords;
                sqlCommand.Parameters.Add("@UserId", SqlDbType.Int).Value = Interview.UserId;
                sqlCommand.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #2
0
        public void SaveInterview(Interview Interview, int EmployeeId)
        {
            SqlConnection sqlConnection = new SqlConnection(connStr);

            try
            {
                if (sqlConnection.State == ConnectionState.Closed)
                {
                    sqlConnection.Open();
                }

                SqlCommand sqlCommand = new SqlCommand("usp_SaveInterviewDetails", sqlConnection);
                sqlCommand.CommandType = CommandType.StoredProcedure;
                sqlCommand.Parameters.Add("@EmployeeId", SqlDbType.Int).Value = EmployeeId;

                sqlCommand.Parameters.Add("@InterviewDate", SqlDbType.DateTime).Value  = Interview.InterviewDate;
                sqlCommand.Parameters.Add("@InterviewSource", SqlDbType.VarChar).Value = Interview.InterviewSource;
                sqlCommand.Parameters.Add("@InterviewerName", SqlDbType.VarChar).Value = Interview.InterviewerName;
                sqlCommand.Parameters.Add("@Comments", SqlDbType.VarChar).Value        = Interview.Comments;
                sqlCommand.Parameters.Add("@IsBKR", SqlDbType.Bit).Value              = Interview.IsBKR;
                sqlCommand.Parameters.Add("@IsGoodConduct", SqlDbType.Bit).Value      = Interview.IsGoodConduct;
                sqlCommand.Parameters.Add("@IsMunicipalRecords", SqlDbType.Bit).Value = Interview.IsMunicipalRecords;
                sqlCommand.Parameters.Add("@UserId", SqlDbType.Int).Value             = Interview.UserId;
                sqlCommand.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #3
0
        public List<Employee> GetEmployeeDetailsByEmployeeId(int employeeId, out List<Employee> emergencyContactList, out List<Interview> interviewList, out List<EmpPrinciples> empPrinciplesList, out List<Salary> salaryList, out List<Identification> identificationList, out List<Reference> referenceList)
        {
            SqlConnection sqlConnection = new SqlConnection(connStr);
            DataSet dataSet = new DataSet();
            List<Employee> employeeList = new List<Employee>();
            emergencyContactList = new List<Employee>();
            interviewList = new List<Interview>();
            empPrinciplesList = new List<EmpPrinciples>();
            salaryList = new List<Salary>();
            identificationList = new List<Identification>();
            referenceList = new List<Reference>();

            try
            {
                if (sqlConnection.State == ConnectionState.Closed)
                {
                    sqlConnection.Open();
                }

                SqlCommand sqlCommand = new SqlCommand("usp_GetEmployeeDetailsByEmployeeId", sqlConnection);
                sqlCommand.Parameters.Add("@EmployeeId", SqlDbType.VarChar).Value = employeeId;
                sqlCommand.CommandType = CommandType.StoredProcedure;
                SqlDataAdapter sqlAdapter = new SqlDataAdapter(sqlCommand);
                sqlAdapter.Fill(dataSet);

                if (dataSet != null && dataSet.Tables.Count != 0)
                {
                    foreach (DataRowView drvEmployee in dataSet.Tables[0].DefaultView)
                    {
                        Employee employee = new Employee
                        {
                            EmployeeId = (Convert.ToInt32(drvEmployee["EmployeeId"])),
                            EmployeeCode = drvEmployee["EmployeeCode"].ToString(),
                            FirstName = drvEmployee["EmpFirstName"].ToString(),
                            MiddleName = drvEmployee["EmpMiddleName"].ToString(),
                            LastName = drvEmployee["EmpLastName"].ToString(),
                            DateOfBirth = Convert.ToDateTime(drvEmployee["EmpDateOfBirth"]),
                            Title = drvEmployee["EmpTitle"].ToString(),
                            PrimaryLanguageId = (Convert.ToInt32(drvEmployee["EmpPrimaryLanguage"])),
                            SecondaryLanguageId = (Convert.ToInt32(drvEmployee["EmpSecondaryLanguage"])),
                            Prefix = drvEmployee["EmpPrefix"].ToString(),
                            Suffix = drvEmployee["EmpSuffix"].ToString(),
                            Gender = drvEmployee["EmpGender"].ToString(),
                            MartialStatus = drvEmployee["EmpMartialStatus"].ToString(),
                            TownOfBirth = drvEmployee["EmpTownOfBirth"].ToString(),
                            CountryOfBirth = drvEmployee["EmpCountryOfBirth"].ToString(),
                            Nationality1Id = (Convert.ToInt32(drvEmployee["Nationality1"])),
                            Nationality2Id = (Convert.ToInt32(drvEmployee["Nationality2"])),
                            RetirementDate = drvEmployee["EmpRetirementDate"].ToString(),
                            EmploymentTypeId = (Convert.ToInt32(drvEmployee["EmpType"])),
                            NoofContracts = (Convert.ToInt32(drvEmployee["EmpNoOfContracts"])),
                            OriginalHireDate = drvEmployee["EmpOriginalHireDate"].ToString(),
                            ProbationHireDate = drvEmployee["EmpProbationEndDate"].ToString(),
                            ContractEndDate = drvEmployee["EmpContractEndDate"].ToString(),
                            IsdefinitiveContract = (Convert.ToBoolean(drvEmployee["EmpDefiniteContract"])),
                            ReHire = (Convert.ToBoolean(drvEmployee["EmpReHire"])),
                            RecruitmentCompany = drvEmployee["EmpRecuitmentCompany"].ToString(),
                            EducationInsitution = drvEmployee["EmpEducationInsitution"].ToString(),
                            EduStartDate = drvEmployee["EmpEduStartDate"].ToString(),
                            EduEndDate = drvEmployee["EmpEduEndDate"].ToString(),
                            PermAddress = drvEmployee["EmpPermAddress"].ToString(),
                            PermNo = drvEmployee["EmpPermNo"].ToString(),
                            PermZipCode = drvEmployee["EmpPermZipCode"].ToString(),
                            PermCity = drvEmployee["EmpPermCity"].ToString(),
                            PermProvience = drvEmployee["EmpPermProvince"].ToString(),
                            PermCountry = drvEmployee["EmpPermCountry"].ToString(),
                            PermPhoneNo = drvEmployee["EmpPermTelephone"].ToString(),
                            PermSinceDate = drvEmployee["EmpPermSince"].ToString(),
                            TempNo = drvEmployee["EmpTempNo"].ToString(),
                            TempZipCode = drvEmployee["EmpTempZipCode"].ToString(),
                            TempCity = drvEmployee["EmpTempCity"].ToString(),
                            TempProvience = drvEmployee["EmpTempProvince"].ToString(),
                            TempCountry = drvEmployee["EmpTempCountry"].ToString(),
                            TempPhoneNo = drvEmployee["EmpTempTelephone"].ToString(),
                            TempSinceDate = drvEmployee["EmpTempSince"].ToString(),
                            TempAddress = drvEmployee["EmpTempAddress"].ToString(),
                            PrivateMobile = drvEmployee["EmpPrivateMobileNo"].ToString(),
                            CompanyMobile = drvEmployee["EmpCompanyMobileNo"].ToString(),
                            PrivateEmail = drvEmployee["EmpPrivateEmailId"].ToString(),
                            CompanyEmail = drvEmployee["EmpCompanyEmailId"].ToString(),
                            Twitter = drvEmployee["EmpTwitterId"].ToString(),
                            LinkedIn = drvEmployee["EmpLinkedIn"].ToString(),
                            FTEAllocation = (Convert.ToInt32(drvEmployee["EmpFTEAllocation"])),
                            EmploymentStatusId = (Convert.ToInt32(drvEmployee["EmpStatusId"])),
                            Department = (Convert.ToInt32(drvEmployee["EmpDepartmentId"])),
                            Location = (Convert.ToInt32(drvEmployee["EmpLocationId"])),
                            Position = (Convert.ToInt32(drvEmployee["EmpPositionId"])),
                            Grade = (Convert.ToInt32(drvEmployee["EmpGradeId"])),
                            JobTitle = (Convert.ToInt32(drvEmployee["EmpJobTitle"])),
                            Supervisor = (Convert.ToInt32(drvEmployee["EmpSupervisorId"])),
                            CompanyCostCentreId = (Convert.ToInt32(drvEmployee["EmpCompanyCostCentre"])),
                            Mentor = (Convert.ToInt32(drvEmployee["EmpMentorId"])),
                            MonStartTime = drvEmployee["MondayStart"].ToString(),
                            MonEndTime = drvEmployee["MondayEnd"].ToString(),
                            MonFlag = (Convert.ToBoolean(drvEmployee["MondayFlag"])),
                            TueStartTime = drvEmployee["TuesdayStart"].ToString(),
                            TueEndTime = drvEmployee["TuesdayEnd"].ToString(),
                            TueFlag = (Convert.ToBoolean(drvEmployee["TuesdayFlag"])),
                            WedStartTime = drvEmployee["WednesdayStart"].ToString(),
                            WedEndTime = drvEmployee["WednesdayEnd"].ToString(),
                            WedFlag = (Convert.ToBoolean(drvEmployee["WednesdayFlag"])),
                            ThurStartTime = drvEmployee["ThursdayStart"].ToString(),
                            ThurEndTime = drvEmployee["ThursdayEnd"].ToString(),
                            ThurFlag = (Convert.ToBoolean(drvEmployee["ThursdayFlag"])),
                            FriStartTime = drvEmployee["FridayStart"].ToString(),
                            FriEndTime = drvEmployee["FridayEnd"].ToString(),
                            FriFlag = (Convert.ToBoolean(drvEmployee["FridayFlag"])),
                            SatStartTime = drvEmployee["SaturdayStart"].ToString(),
                            SatEndTime = drvEmployee["SaturdayEnd"].ToString(),
                            SatFlag = (Convert.ToBoolean(drvEmployee["SaturdayFlag"])),
                            SunStartTime = drvEmployee["SundayStart"].ToString(),
                            SunEndTime = drvEmployee["SundayEnd"].ToString(),
                            SunFlag = (Convert.ToBoolean(drvEmployee["SundayFlag"])),
                            BloodGroup = drvEmployee["BloodGroup"].ToString(),
                            PhysicianName = drvEmployee["PhysicianName"].ToString(),
                            PhysicianPhone = drvEmployee["PhysicianContactNumber"].ToString(),
                            PharmacyName = drvEmployee["PharmacyName"].ToString(),
                            PharmacyPhone = drvEmployee["PharmacyContactNumber"].ToString(),
                            HealthInsuranceCompanyId = (Convert.ToInt32(drvEmployee["InsuranceCompanyId"])),
                            HealthInsuranceNumber = drvEmployee["InsuranceNumber"].ToString(),
                            IsCollectiveScheme = (Convert.ToBoolean(drvEmployee["CollectiveScheme"])),
                            MedicalComment = drvEmployee["MedicalComment"].ToString(),
                            ProfileImagePath = drvEmployee["ProfileImagePath"].ToString()
                        };
                        employeeList.Add(employee);
                    }
                    foreach (DataRowView drvEmergencyContact in dataSet.Tables[1].DefaultView)
                    {
                        Employee emergencyContact = new Employee
                        {
                            PriDetailId = Convert.ToInt32(drvEmergencyContact["Id"]),
                            PriContractName = drvEmergencyContact["ContactName"].ToString(),
                            PriContractRelation = drvEmergencyContact["Relation"].ToString(),
                            PriContractAddress = drvEmergencyContact["Address"].ToString(),
                            PriContractHomePhone = drvEmergencyContact["HomePhone"].ToString(),
                            PriContractMobilePhone = drvEmergencyContact["MobilePhone"].ToString(),
                            PriContractWorkPhone = drvEmergencyContact["WorkPhone"].ToString(),
                        };
                        emergencyContactList.Add(emergencyContact);
                    }

                    foreach (DataRowView drvInterviewDetails in dataSet.Tables[0].DefaultView)
                    {
                        Interview interviewDetails = new Interview
                        {
                            InterviewDate = drvInterviewDetails["InterviewDate"].ToString(),
                            InterviewerName = drvInterviewDetails["InterviewerName"].ToString(),
                            InterviewSource = drvInterviewDetails["Source"].ToString(),
                            Comments = drvInterviewDetails["Comment"].ToString(),
                            IsBKR = (Convert.ToBoolean(drvInterviewDetails["BKR"])),
                            IsGoodConduct = (Convert.ToBoolean(drvInterviewDetails["GoodConduct"])),
                            IsMunicipalRecords = (Convert.ToBoolean(drvInterviewDetails["MunicipalRecord"]))
                        };
                        interviewList.Add(interviewDetails);
                    }

                    foreach (DataRowView drvPrincples in dataSet.Tables[0].DefaultView)
                    {
                        EmpPrinciples empPrincples = new EmpPrinciples
                        {
                            IsInsider = (Convert.ToBoolean(drvPrincples["Insider"])),
                            InsiderDepartmentId = (Convert.ToInt32(drvPrincples["DepartmentId"])),
                            RelavtiveName = drvPrincples["RelativesName"].ToString(),
                            RelavtiveDepartmentId = (Convert.ToInt32(drvPrincples["RelativeDepartmentId"])),
                            Relation = drvPrincples["Relation"].ToString()
                        };
                        empPrinciplesList.Add(empPrincples);
                    }

                    foreach (DataRowView drvSalary in dataSet.Tables[0].DefaultView)
                    {
                        Salary salaryDetails = new Salary
                        {
                            CurrencyId = (Convert.ToInt32(drvSalary["CurrencyId"])),
                            HourRate = drvSalary["HourlyRate"].ToString(),
                            MonthlySalary = drvSalary["MonthlySalary"].ToString(),
                            PaymentFreq = drvSalary["PaymentFreq"].ToString(),
                            SalaryEffectiveDate = drvSalary["SalaryEffectiveDate"].ToString(),
                            SalaryGradeId = (Convert.ToInt32(drvSalary["GradeId"])),
                            WageTax = drvSalary["WageTax"].ToString(),
                            AccountNo = drvSalary["AccountNo"].ToString(),
                            IBAN = drvSalary["IBAN"].ToString(),
                            BankName = drvSalary["BankName"].ToString(),
                            SwiftCode = drvSalary["SwiftCode"].ToString(),
                            PaymentMethod = drvSalary["PaymentMethod"].ToString(),
                            MobileLimit = drvSalary["MobileLimit"].ToString(),
                            Conveyance = drvSalary["Conveyance"].ToString(),
                            SpecialAllowance = drvSalary["SpecialAllowance"].ToString(),
                            LunchAllowance = drvSalary["LunchAllowance"].ToString(),
                            HouseRentAllowance = drvSalary["HouseRentAllowance"].ToString(),
                            IsRule = (Convert.ToBoolean(drvSalary["RuleApplicable"])),
                            RuleStartDate = drvSalary["RuleStartDate"].ToString(),
                            RuleEndDate = drvSalary["RuleEndDate"].ToString(),
                            Comments = drvSalary["Comments"].ToString(),
                        };
                        salaryList.Add(salaryDetails);
                    }

                    foreach (DataRowView drvIdentifation in dataSet.Tables[2].DefaultView)
                    {
                        Identification identification = new Identification
                        {
                            IdentificationId = (Convert.ToInt32(drvIdentifation["Id"])),
                            IdentificationNo = drvIdentifation["IdentificationNo"].ToString(),
                            IdentificationType = drvIdentifation["IdentificationType"].ToString(),
                            IssueDate = drvIdentifation["IssueDate"].ToString(),
                            ExpireDate = drvIdentifation["ExpireDate"].ToString()
                        };
                        identificationList.Add(identification);
                    }

                    foreach (DataRowView drvReference in dataSet.Tables[3].DefaultView)
                    {
                        Reference reference = new Reference
                        {
                            ReferenceId = (Convert.ToInt32(drvReference["ReferenceId"])),
                            ReferenceName = drvReference["ReferenceName"].ToString(),
                            ComapanyName = drvReference["CompanyName"].ToString(),
                            Position = drvReference["Position"].ToString(),
                            Email = drvReference["Email"].ToString(),
                            PhoneNo = drvReference["PhoneNumber"].ToString(),
                            Comments = drvReference["Comments"].ToString(),
                        };
                        referenceList.Add(reference);
                    }
                }
                return employeeList;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #4
0
        public List <Employee> GetEmployeeDetailsByEmployeeId(int employeeId, out List <Employee> emergencyContactList, out List <Interview> interviewList, out List <EmpPrinciples> empPrinciplesList, out List <Salary> salaryList, out List <Identification> identificationList, out List <Reference> referenceList)
        {
            SqlConnection   sqlConnection = new SqlConnection(connStr);
            DataSet         dataSet       = new DataSet();
            List <Employee> employeeList  = new List <Employee>();

            emergencyContactList = new List <Employee>();
            interviewList        = new List <Interview>();
            empPrinciplesList    = new List <EmpPrinciples>();
            salaryList           = new List <Salary>();
            identificationList   = new List <Identification>();
            referenceList        = new List <Reference>();

            try
            {
                if (sqlConnection.State == ConnectionState.Closed)
                {
                    sqlConnection.Open();
                }

                SqlCommand sqlCommand = new SqlCommand("usp_GetEmployeeDetailsByEmployeeId", sqlConnection);
                sqlCommand.Parameters.Add("@EmployeeId", SqlDbType.VarChar).Value = employeeId;
                sqlCommand.CommandType = CommandType.StoredProcedure;
                SqlDataAdapter sqlAdapter = new SqlDataAdapter(sqlCommand);
                sqlAdapter.Fill(dataSet);

                if (dataSet != null && dataSet.Tables.Count != 0)
                {
                    foreach (DataRowView drvEmployee in dataSet.Tables[0].DefaultView)
                    {
                        Employee employee = new Employee
                        {
                            EmployeeId               = (Convert.ToInt32(drvEmployee["EmployeeId"])),
                            EmployeeCode             = drvEmployee["EmployeeCode"].ToString(),
                            FirstName                = drvEmployee["EmpFirstName"].ToString(),
                            MiddleName               = drvEmployee["EmpMiddleName"].ToString(),
                            LastName                 = drvEmployee["EmpLastName"].ToString(),
                            DateOfBirth              = Convert.ToDateTime(drvEmployee["EmpDateOfBirth"]),
                            Title                    = drvEmployee["EmpTitle"].ToString(),
                            PrimaryLanguageId        = (Convert.ToInt32(drvEmployee["EmpPrimaryLanguage"])),
                            SecondaryLanguageId      = (Convert.ToInt32(drvEmployee["EmpSecondaryLanguage"])),
                            Prefix                   = drvEmployee["EmpPrefix"].ToString(),
                            Suffix                   = drvEmployee["EmpSuffix"].ToString(),
                            Gender                   = drvEmployee["EmpGender"].ToString(),
                            MartialStatus            = drvEmployee["EmpMartialStatus"].ToString(),
                            TownOfBirth              = drvEmployee["EmpTownOfBirth"].ToString(),
                            CountryOfBirth           = drvEmployee["EmpCountryOfBirth"].ToString(),
                            Nationality1Id           = (Convert.ToInt32(drvEmployee["Nationality1"])),
                            Nationality2Id           = (Convert.ToInt32(drvEmployee["Nationality2"])),
                            RetirementDate           = drvEmployee["EmpRetirementDate"].ToString(),
                            EmploymentTypeId         = (Convert.ToInt32(drvEmployee["EmpType"])),
                            NoofContracts            = (Convert.ToInt32(drvEmployee["EmpNoOfContracts"])),
                            OriginalHireDate         = drvEmployee["EmpOriginalHireDate"].ToString(),
                            ProbationHireDate        = drvEmployee["EmpProbationEndDate"].ToString(),
                            ContractEndDate          = drvEmployee["EmpContractEndDate"].ToString(),
                            IsdefinitiveContract     = (Convert.ToBoolean(drvEmployee["EmpDefiniteContract"])),
                            ReHire                   = (Convert.ToBoolean(drvEmployee["EmpReHire"])),
                            RecruitmentCompany       = drvEmployee["EmpRecuitmentCompany"].ToString(),
                            EducationInsitution      = drvEmployee["EmpEducationInsitution"].ToString(),
                            EduStartDate             = drvEmployee["EmpEduStartDate"].ToString(),
                            EduEndDate               = drvEmployee["EmpEduEndDate"].ToString(),
                            PermAddress              = drvEmployee["EmpPermAddress"].ToString(),
                            PermNo                   = drvEmployee["EmpPermNo"].ToString(),
                            PermZipCode              = drvEmployee["EmpPermZipCode"].ToString(),
                            PermCity                 = drvEmployee["EmpPermCity"].ToString(),
                            PermProvience            = drvEmployee["EmpPermProvince"].ToString(),
                            PermCountry              = drvEmployee["EmpPermCountry"].ToString(),
                            PermPhoneNo              = drvEmployee["EmpPermTelephone"].ToString(),
                            PermSinceDate            = drvEmployee["EmpPermSince"].ToString(),
                            TempNo                   = drvEmployee["EmpTempNo"].ToString(),
                            TempZipCode              = drvEmployee["EmpTempZipCode"].ToString(),
                            TempCity                 = drvEmployee["EmpTempCity"].ToString(),
                            TempProvience            = drvEmployee["EmpTempProvince"].ToString(),
                            TempCountry              = drvEmployee["EmpTempCountry"].ToString(),
                            TempPhoneNo              = drvEmployee["EmpTempTelephone"].ToString(),
                            TempSinceDate            = drvEmployee["EmpTempSince"].ToString(),
                            TempAddress              = drvEmployee["EmpTempAddress"].ToString(),
                            PrivateMobile            = drvEmployee["EmpPrivateMobileNo"].ToString(),
                            CompanyMobile            = drvEmployee["EmpCompanyMobileNo"].ToString(),
                            PrivateEmail             = drvEmployee["EmpPrivateEmailId"].ToString(),
                            CompanyEmail             = drvEmployee["EmpCompanyEmailId"].ToString(),
                            Twitter                  = drvEmployee["EmpTwitterId"].ToString(),
                            LinkedIn                 = drvEmployee["EmpLinkedIn"].ToString(),
                            FTEAllocation            = (Convert.ToInt32(drvEmployee["EmpFTEAllocation"])),
                            EmploymentStatusId       = (Convert.ToInt32(drvEmployee["EmpStatusId"])),
                            Department               = (Convert.ToInt32(drvEmployee["EmpDepartmentId"])),
                            Location                 = (Convert.ToInt32(drvEmployee["EmpLocationId"])),
                            Position                 = (Convert.ToInt32(drvEmployee["EmpPositionId"])),
                            Grade                    = (Convert.ToInt32(drvEmployee["EmpGradeId"])),
                            JobTitle                 = (Convert.ToInt32(drvEmployee["EmpJobTitle"])),
                            Supervisor               = (Convert.ToInt32(drvEmployee["EmpSupervisorId"])),
                            CompanyCostCentreId      = (Convert.ToInt32(drvEmployee["EmpCompanyCostCentre"])),
                            Mentor                   = (Convert.ToInt32(drvEmployee["EmpMentorId"])),
                            MonStartTime             = drvEmployee["MondayStart"].ToString(),
                            MonEndTime               = drvEmployee["MondayEnd"].ToString(),
                            MonFlag                  = (Convert.ToBoolean(drvEmployee["MondayFlag"])),
                            TueStartTime             = drvEmployee["TuesdayStart"].ToString(),
                            TueEndTime               = drvEmployee["TuesdayEnd"].ToString(),
                            TueFlag                  = (Convert.ToBoolean(drvEmployee["TuesdayFlag"])),
                            WedStartTime             = drvEmployee["WednesdayStart"].ToString(),
                            WedEndTime               = drvEmployee["WednesdayEnd"].ToString(),
                            WedFlag                  = (Convert.ToBoolean(drvEmployee["WednesdayFlag"])),
                            ThurStartTime            = drvEmployee["ThursdayStart"].ToString(),
                            ThurEndTime              = drvEmployee["ThursdayEnd"].ToString(),
                            ThurFlag                 = (Convert.ToBoolean(drvEmployee["ThursdayFlag"])),
                            FriStartTime             = drvEmployee["FridayStart"].ToString(),
                            FriEndTime               = drvEmployee["FridayEnd"].ToString(),
                            FriFlag                  = (Convert.ToBoolean(drvEmployee["FridayFlag"])),
                            SatStartTime             = drvEmployee["SaturdayStart"].ToString(),
                            SatEndTime               = drvEmployee["SaturdayEnd"].ToString(),
                            SatFlag                  = (Convert.ToBoolean(drvEmployee["SaturdayFlag"])),
                            SunStartTime             = drvEmployee["SundayStart"].ToString(),
                            SunEndTime               = drvEmployee["SundayEnd"].ToString(),
                            SunFlag                  = (Convert.ToBoolean(drvEmployee["SundayFlag"])),
                            BloodGroup               = drvEmployee["BloodGroup"].ToString(),
                            PhysicianName            = drvEmployee["PhysicianName"].ToString(),
                            PhysicianPhone           = drvEmployee["PhysicianContactNumber"].ToString(),
                            PharmacyName             = drvEmployee["PharmacyName"].ToString(),
                            PharmacyPhone            = drvEmployee["PharmacyContactNumber"].ToString(),
                            HealthInsuranceCompanyId = (Convert.ToInt32(drvEmployee["InsuranceCompanyId"])),
                            HealthInsuranceNumber    = drvEmployee["InsuranceNumber"].ToString(),
                            IsCollectiveScheme       = (Convert.ToBoolean(drvEmployee["CollectiveScheme"])),
                            MedicalComment           = drvEmployee["MedicalComment"].ToString(),
                            ProfileImagePath         = drvEmployee["ProfileImagePath"].ToString()
                        };
                        employeeList.Add(employee);
                    }
                    foreach (DataRowView drvEmergencyContact in dataSet.Tables[1].DefaultView)
                    {
                        Employee emergencyContact = new Employee
                        {
                            PriDetailId            = Convert.ToInt32(drvEmergencyContact["Id"]),
                            PriContractName        = drvEmergencyContact["ContactName"].ToString(),
                            PriContractRelation    = drvEmergencyContact["Relation"].ToString(),
                            PriContractAddress     = drvEmergencyContact["Address"].ToString(),
                            PriContractHomePhone   = drvEmergencyContact["HomePhone"].ToString(),
                            PriContractMobilePhone = drvEmergencyContact["MobilePhone"].ToString(),
                            PriContractWorkPhone   = drvEmergencyContact["WorkPhone"].ToString(),
                        };
                        emergencyContactList.Add(emergencyContact);
                    }

                    foreach (DataRowView drvInterviewDetails in dataSet.Tables[0].DefaultView)
                    {
                        Interview interviewDetails = new Interview
                        {
                            InterviewDate      = drvInterviewDetails["InterviewDate"].ToString(),
                            InterviewerName    = drvInterviewDetails["InterviewerName"].ToString(),
                            InterviewSource    = drvInterviewDetails["Source"].ToString(),
                            Comments           = drvInterviewDetails["Comment"].ToString(),
                            IsBKR              = (Convert.ToBoolean(drvInterviewDetails["BKR"])),
                            IsGoodConduct      = (Convert.ToBoolean(drvInterviewDetails["GoodConduct"])),
                            IsMunicipalRecords = (Convert.ToBoolean(drvInterviewDetails["MunicipalRecord"]))
                        };
                        interviewList.Add(interviewDetails);
                    }

                    foreach (DataRowView drvPrincples in dataSet.Tables[0].DefaultView)
                    {
                        EmpPrinciples empPrincples = new EmpPrinciples
                        {
                            IsInsider             = (Convert.ToBoolean(drvPrincples["Insider"])),
                            InsiderDepartmentId   = (Convert.ToInt32(drvPrincples["DepartmentId"])),
                            RelavtiveName         = drvPrincples["RelativesName"].ToString(),
                            RelavtiveDepartmentId = (Convert.ToInt32(drvPrincples["RelativeDepartmentId"])),
                            Relation = drvPrincples["Relation"].ToString()
                        };
                        empPrinciplesList.Add(empPrincples);
                    }

                    foreach (DataRowView drvSalary in dataSet.Tables[0].DefaultView)
                    {
                        Salary salaryDetails = new Salary
                        {
                            CurrencyId          = (Convert.ToInt32(drvSalary["CurrencyId"])),
                            HourRate            = drvSalary["HourlyRate"].ToString(),
                            MonthlySalary       = drvSalary["MonthlySalary"].ToString(),
                            PaymentFreq         = drvSalary["PaymentFreq"].ToString(),
                            SalaryEffectiveDate = drvSalary["SalaryEffectiveDate"].ToString(),
                            SalaryGradeId       = (Convert.ToInt32(drvSalary["GradeId"])),
                            WageTax             = drvSalary["WageTax"].ToString(),
                            AccountNo           = drvSalary["AccountNo"].ToString(),
                            IBAN               = drvSalary["IBAN"].ToString(),
                            BankName           = drvSalary["BankName"].ToString(),
                            SwiftCode          = drvSalary["SwiftCode"].ToString(),
                            PaymentMethod      = drvSalary["PaymentMethod"].ToString(),
                            MobileLimit        = drvSalary["MobileLimit"].ToString(),
                            Conveyance         = drvSalary["Conveyance"].ToString(),
                            SpecialAllowance   = drvSalary["SpecialAllowance"].ToString(),
                            LunchAllowance     = drvSalary["LunchAllowance"].ToString(),
                            HouseRentAllowance = drvSalary["HouseRentAllowance"].ToString(),
                            IsRule             = (Convert.ToBoolean(drvSalary["RuleApplicable"])),
                            RuleStartDate      = drvSalary["RuleStartDate"].ToString(),
                            RuleEndDate        = drvSalary["RuleEndDate"].ToString(),
                            Comments           = drvSalary["Comments"].ToString(),
                        };
                        salaryList.Add(salaryDetails);
                    }

                    foreach (DataRowView drvIdentifation in dataSet.Tables[2].DefaultView)
                    {
                        Identification identification = new Identification
                        {
                            IdentificationId   = (Convert.ToInt32(drvIdentifation["Id"])),
                            IdentificationNo   = drvIdentifation["IdentificationNo"].ToString(),
                            IdentificationType = drvIdentifation["IdentificationType"].ToString(),
                            IssueDate          = drvIdentifation["IssueDate"].ToString(),
                            ExpireDate         = drvIdentifation["ExpireDate"].ToString()
                        };
                        identificationList.Add(identification);
                    }

                    foreach (DataRowView drvReference in dataSet.Tables[3].DefaultView)
                    {
                        Reference reference = new Reference
                        {
                            ReferenceId   = (Convert.ToInt32(drvReference["ReferenceId"])),
                            ReferenceName = drvReference["ReferenceName"].ToString(),
                            ComapanyName  = drvReference["CompanyName"].ToString(),
                            Position      = drvReference["Position"].ToString(),
                            Email         = drvReference["Email"].ToString(),
                            PhoneNo       = drvReference["PhoneNumber"].ToString(),
                            Comments      = drvReference["Comments"].ToString(),
                        };
                        referenceList.Add(reference);
                    }
                }
                return(employeeList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }