/// <summary>
        /// Creates the on boarding view.
        /// </summary>
        /// <param name="maritalStatusCollection">The marital status collection.</param>
        /// <param name="religionCollection">The religion collection.</param>
        /// <param name="genderCollection">The gender collection.</param>
        /// <param name="onboardInfo">The onboard information.</param>
        /// <param name="message">The message.</param>
        /// <returns></returns>
        public IEmployeeOnBoardView CreateOnBoardingView(IList <IMaritalStatus> maritalStatusCollection,
                                                         IList <IReligion> religionCollection, IList <IYourGender> genderCollection, EmployeeOnBoardView
                                                         onboardInfo, string message)
        {
            var maritalStatusDL =
                GetDropDownList.MaritalStatusListItems(maritalStatusCollection, onboardInfo.MaritalStatusId);
            var religionDDL = GetDropDownList.ReligionListItems(religionCollection, onboardInfo.ReligionId);
            var genderDDL   = GetDropDownList.GenderListItems(genderCollection, onboardInfo.GenderId);

            var view = onboardInfo;

            view.ProcessingMessage         = message;
            view.ReligionDropDownList      = religionDDL;
            view.GenderDropDownList        = genderDDL;
            view.MaritalStatusDropDownList = maritalStatusDL;

            return(view);
        }
        /// <summary>
        /// Creates the employee view.
        /// </summary>
        /// <param name="maritalStatusCollection">The marital status collection.</param>
        /// <param name="companyCollection">The company collection.</param>
        /// <param name="employeeCollection">The employee collection.</param>
        /// <param name="religionCollection">The religion collection.</param>
        /// <param name="genderCollection">The gender collection.</param>
        /// <param name="departmentCollection">The department collection.</param>
        /// <param name="levelCollection">The level collection.</param>
        /// <param name="gradeCollection">The grade collection.</param>
        /// <param name="jobTitleCollection">The job title collection.</param>
        /// <param name="countryCollection">The country collection.</param>
        /// <param name="stateCollection">The state collection.</param>
        /// <returns></returns>
        public IEmployeeOnBoardView CreateEmployeeView(IList <IMaritalStatus> maritalStatusCollection, int companyId, IList <IEmployee> employeeCollection,
                                                       IList <IReligion> religionCollection, IList <IYourGender> genderCollection, IList <IDepartment> departmentCollection, IList <ILevel> levelCollection,
                                                       IList <IGrade> gradeCollection, IList <IPayScale> payScaleCollection, IList <IJobTitle> jobTitleCollection, IList <ICountry> countryCollection, IList <IState> stateCollection, IList <IEmploymentType> employmentTypeCollection)
        {
            var maritalStatusDDL  = GetDropDownList.MaritalStatusListItems(maritalStatusCollection, -1);
            var religionDDL       = GetDropDownList.ReligionListItems(religionCollection, -1);
            var genderDDL         = GetDropDownList.GenderListItems(genderCollection, -1);
            var departmentDDL     = GetDropDownList.DepartmentListItems(departmentCollection, -1);
            var gradeDDL          = GetDropDownList.GradeListItems(gradeCollection, -1);
            var jobTitleDDL       = GetDropDownList.JobTitlesListItems(jobTitleCollection, -1);
            var levelDDL          = GetDropDownList.LevelListItems(levelCollection, -1);
            var countryDDL        = GetDropDownList.CountryListItem(countryCollection, 161);
            var stateDDL          = GetDropDownList.StateListItem(stateCollection, -1);
            var permanentStateDDL = GetDropDownList.StateListItem(stateCollection, -1);
            var homeStateDDL      = GetDropDownList.StateListItem(stateCollection, -1);
            var employeeDDL       = GetDropDownList.EmployeeListitems(employeeCollection, -1);
            var employmentTypeDDL = GetDropDownList.EmploymentTypeListItem(employmentTypeCollection, -1);
            var payScaleDDL       = GetDropDownList.PayScaleListItem(payScaleCollection, -1);

            var view = new EmployeeOnBoardView
            {
                MaritalStatusDropDownList  = maritalStatusDDL,
                ReligionDropDownList       = religionDDL,
                GenderDropDownList         = genderDDL,
                LevelDropDownList          = levelDDL,
                GradeDropDownList          = gradeDDL,
                DepartmentDropDownList     = departmentDDL,
                JobTitleDropDownList       = jobTitleDDL,
                ProcessingMessage          = string.Empty,
                CountryDropDownList        = countryDDL,
                HomeStateDropDownList      = homeStateDDL,
                PermanentStateDropDownList = permanentStateDDL,
                StateDropDownList          = stateDDL,
                EmployeeDropDownList       = employeeDDL,
                EmploymentTypeDropDownList = employmentTypeDDL,
                NationalityId        = 161,
                CompanyID            = companyId,
                PayScaleDropDownList = payScaleDDL
            };

            return(view);
        }
        /// <summary>
        /// Creates the updated employee view.
        /// </summary>
        /// <param name="onboardInfo">The onboard information.</param>
        /// <param name="maritalStatusCollection">The marital status collection.</param>
        /// <param name="companyCollection">The company collection.</param>
        /// <param name="employeeCollection">The employee collection.</param>
        /// <param name="religionCollection">The religion collection.</param>
        /// <param name="genderCollection">The gender collection.</param>
        /// <param name="departmentCollection">The department collection.</param>
        /// <param name="levelCollection">The level collection.</param>
        /// <param name="gradeCollection">The grade collection.</param>
        /// <param name="jobTitleCollection">The job title collection.</param>
        /// <param name="countryCollection">The country collection.</param>
        /// <param name="stateCollection">The state collection.</param>
        /// <param name="processMessage">The process message.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">onboardInfo</exception>
        public IEmployeeOnBoardView CreateUpdatedEmployeeView(IEmployeeOnBoardView onboardInfo, IList <IMaritalStatus> maritalStatusCollection,
                                                              IList <IEmployee> employeeCollection, IList <IReligion> religionCollection, IList <IYourGender> genderCollection, IList <IDepartment> departmentCollection, IList <ILevel> levelCollection,
                                                              IList <IGrade> gradeCollection, IList <IPayScale> payScaleCollection, IList <IJobTitle> jobTitleCollection, IList <ICountry> countryCollection, IList <IState> stateCollection,
                                                              IList <IEmploymentType> employmentTypeCollection, string processMessage)
        {
            if (onboardInfo == null)
            {
                throw new ArgumentNullException(nameof(onboardInfo));
            }

            var maritalStatusDDL  = GetDropDownList.MaritalStatusListItems(maritalStatusCollection, onboardInfo.MaritalStatusId);
            var religionDDL       = GetDropDownList.ReligionListItems(religionCollection, onboardInfo.ReligionId);
            var genderDDL         = GetDropDownList.GenderListItems(genderCollection, onboardInfo.GenderId);
            var departmentDDL     = GetDropDownList.DepartmentListItems(departmentCollection, onboardInfo.DepartmentId);
            var gradeDDL          = GetDropDownList.GradeListItems(gradeCollection, onboardInfo.GradeID);
            var jobTitleDDL       = GetDropDownList.JobTitlesListItems(jobTitleCollection, onboardInfo.JobTitleID);
            var levelDDL          = GetDropDownList.LevelListItems(levelCollection, onboardInfo.LevelID);
            var employeeDDL       = GetDropDownList.EmployeeListitems(employeeCollection, onboardInfo.SupervisorEmployeeId);
            var countryDDL        = GetDropDownList.CountryListItem(countryCollection, onboardInfo.NationalityId);
            var permanentStateDDL = GetDropDownList.StateListItem(stateCollection, onboardInfo.PermanentAddressStateId);
            var homeStateDDL      = GetDropDownList.StateListItem(stateCollection, onboardInfo.HomeAddressStateId);
            var employmentTypeDDL = GetDropDownList.EmploymentTypeListItem(employmentTypeCollection, onboardInfo.EmploymentTypeId);
            var payScaleDDL       = GetDropDownList.PayScaleListItem(payScaleCollection, onboardInfo.LevelGradeId);

            onboardInfo.ProcessingMessage = processMessage;
            //Updating drop down list
            onboardInfo.MaritalStatusDropDownList  = maritalStatusDDL;
            onboardInfo.ReligionDropDownList       = religionDDL;
            onboardInfo.GradeDropDownList          = gradeDDL;
            onboardInfo.DepartmentDropDownList     = departmentDDL;
            onboardInfo.JobTitleDropDownList       = jobTitleDDL;
            onboardInfo.LevelDropDownList          = levelDDL;
            onboardInfo.GenderDropDownList         = genderDDL;
            onboardInfo.CountryDropDownList        = countryDDL;
            onboardInfo.PermanentStateDropDownList = permanentStateDDL;
            onboardInfo.HomeStateDropDownList      = homeStateDDL;
            onboardInfo.EmployeeDropDownList       = employeeDDL;
            onboardInfo.EmploymentTypeDropDownList = employmentTypeDDL;
            onboardInfo.PayScaleDropDownList       = payScaleDDL;

            return(onboardInfo);
        }
        /// <summary>
        /// Creates the edit employee view.
        /// </summary>
        /// <param name="onboardInfo">The onboard information.</param>
        /// <param name="maritalStatusCollection">The marital status collection.</param>
        /// <param name="religionCollection">The religion collection.</param>
        /// <param name="genderCollection">The gender collection.</param>
        /// <param name="employeeCollection">The employee collection.</param>
        /// <param name="departmentCollection">The department collection.</param>
        /// <param name="levelCollection">The level collection.</param>
        /// <param name="gradeCollection">The grade collection.</param>
        /// <param name="jobTitleCollection">The job title collection.</param>
        /// <param name="profilePictureDetail">The profile picture detail.</param>
        /// <param name="employeeUser">The employee user.</param>
        /// <param name="countryCollection">The country collection.</param>
        /// <param name="stateCollection">The state collection.</param>
        /// <param name="employmentTypeCollection">The employment type collection.</param>
        /// <param name="processingMessage">The processing message.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">
        /// onboardInfo
        /// or
        /// maritalStatusCollection
        /// or
        /// religionCollection
        /// or
        /// genderCollection
        /// or
        /// departmentCollection
        /// or
        /// gradeCollection
        /// or
        /// levelCollection
        /// or
        /// jobTitleCollection
        /// or
        /// employmentTypeCollection
        /// </exception>
        public IEmployeeOnBoardView CreateEditEmployeeView(IEmployee onboardInfo, IList <IMaritalStatus> maritalStatusCollection,
                                                           IList <IReligion> religionCollection, IList <IYourGender> genderCollection, IList <IEmployee> employeeCollection,
                                                           IList <IDepartment> departmentCollection, IList <ILevel> levelCollection, IList <IGrade> gradeCollection,
                                                           IList <IJobTitle> jobTitleCollection, IDigitalFile profilePictureDetail, IUser employeeUser, IList <ICountry> countryCollection, IList <IState> stateCollection, IList <IEmploymentType> employmentTypeCollection, string processingMessage)
        {
            if (onboardInfo == null)
            {
                throw new ArgumentNullException(nameof(onboardInfo));
            }

            if (maritalStatusCollection == null)
            {
                throw new ArgumentNullException(nameof(maritalStatusCollection));
            }

            if (religionCollection == null)
            {
                throw new ArgumentNullException(nameof(religionCollection));
            }

            if (genderCollection == null)
            {
                throw new ArgumentNullException(nameof(genderCollection));
            }


            if (departmentCollection == null)
            {
                throw new ArgumentNullException(nameof(departmentCollection));
            }

            if (gradeCollection == null)
            {
                throw new ArgumentNullException(nameof(gradeCollection));
            }

            if (levelCollection == null)
            {
                throw new ArgumentNullException(nameof(levelCollection));
            }

            if (jobTitleCollection == null)
            {
                throw new ArgumentNullException(nameof(jobTitleCollection));
            }

            if (employmentTypeCollection == null)
            {
                throw new ArgumentNullException(nameof(employmentTypeCollection));
            }


            var maritalStatusDDL =
                GetDropDownList.MaritalStatusListItems(maritalStatusCollection, onboardInfo.MartialStatusId);
            var religionDDL       = GetDropDownList.ReligionListItems(religionCollection, onboardInfo.ReligionId);
            var genderDDL         = GetDropDownList.GenderListItems(genderCollection, onboardInfo.GenderId);
            var departmentDDL     = GetDropDownList.DepartmentListItems(departmentCollection, onboardInfo.DepartmentId);
            var gradeDDL          = GetDropDownList.GradeListItems(gradeCollection, onboardInfo.GradeId);
            var jobTitleDDL       = GetDropDownList.JobTitlesListItems(jobTitleCollection, onboardInfo.JobTitleId ?? -1);
            var levelDDL          = GetDropDownList.LevelListItems(levelCollection, onboardInfo.LevelId);
            var countryDDL        = GetDropDownList.CountryListItem(countryCollection, onboardInfo.NationalityId);
            var permanentStateDDL = GetDropDownList.StateListItem(stateCollection, onboardInfo.PermanentAddressStateId);
            var homeStateDDL      = GetDropDownList.StateListItem(stateCollection, onboardInfo.HomeAddressStateId);
            var employeeDDL       = GetDropDownList.EmployeeListitems(employeeCollection, onboardInfo.SupervisorEmployeeId);
            var employmentTypeDDL = GetDropDownList.EmploymentTypeListItem(employmentTypeCollection, onboardInfo.EmploymentTypeId);
            var returnView        = new EmployeeOnBoardView
            {
                LastName                   = onboardInfo.LastName,
                FirstName                  = onboardInfo.FirstName,
                MiddleName                 = onboardInfo.MiddleName,
                Email                      = onboardInfo.Email,
                CompanyID                  = onboardInfo.CompanyId,
                LevelID                    = onboardInfo.LevelId,
                GradeID                    = onboardInfo.GradeId,
                LevelGradeId               = onboardInfo.LevelGradeId,
                JobTitleID                 = onboardInfo.JobTitleId ?? -1,
                MobileNumber               = onboardInfo.MobileNumber,
                PermanentAddress           = onboardInfo.PermanentAddress,
                PermanentAddressCity       = onboardInfo.PermanentAddressCity,
                PermanentAddressState      = onboardInfo.PermanentAddressState,
                HomeAddress                = onboardInfo.HomeAddress,
                HomeAddressCity            = onboardInfo.HomeAddressCity,
                HomeAddressState           = onboardInfo.HomeAddressState,
                OtherEmail                 = onboardInfo.OtherEmail,
                Birthday                   = onboardInfo.Birthday,
                MaritalStatusId            = onboardInfo.MartialStatusId,
                GenderId                   = onboardInfo.GenderId,
                StaffNumber                = onboardInfo.StaffNumber,
                DateEmployed               = onboardInfo.DateEmployed,
                About                      = onboardInfo.About,
                DateExited                 = onboardInfo.DateExited,
                SkillSet                   = onboardInfo.SkillSet,
                SupervisorEmployeeId       = onboardInfo.SupervisorEmployeeId,
                SeatingLocation            = onboardInfo.SeatingLocation,
                DepartmentId               = onboardInfo.DepartmentId,
                MaidenName                 = onboardInfo.MaidenName,
                PhotoDigitalFileId         = onboardInfo.PhotoDigitalFileId,
                ReligionId                 = onboardInfo.ReligionId,
                Nationality                = onboardInfo.Nationality,
                DateCreated                = onboardInfo.DateCreated,
                EmployeeID                 = onboardInfo.EmployeeId,
                ProcessingMessage          = processingMessage ?? "",
                LevelDropDownList          = levelDDL,
                DepartmentDropDownList     = departmentDDL,
                GradeDropDownList          = gradeDDL,
                JobTitleDropDownList       = jobTitleDDL,
                GenderDropDownList         = genderDDL,
                MaritalStatusDropDownList  = maritalStatusDDL,
                ReligionDropDownList       = religionDDL,
                ProfilePictureDetail       = profilePictureDetail,
                EmployeeUser               = employeeUser,
                IsLocked                   = onboardInfo.IsLocked,
                CountryDropDownList        = countryDDL,
                HomeStateDropDownList      = homeStateDDL,
                PermanentStateDropDownList = permanentStateDDL,
                NationalityId              = onboardInfo.NationalityId,
                PermanentAddressStateId    = onboardInfo.PermanentAddressStateId,
                HomeAddressStateId         = onboardInfo.HomeAddressStateId,
                EmployeeDropDownList       = employeeDDL,
                EmploymentTypeId           = onboardInfo.EmploymentTypeId,
                EmploymentTypeDropDownList = employmentTypeDDL,
                GenderOther                = onboardInfo.GenderOother,
                ReligionOther              = onboardInfo.ReligionOther
            };

            return(returnView);
        }