Пример #1
0
        /// <summary>
        /// Creates the company registration view.
        /// </summary>
        /// <param name="companyCollection">The company collection.</param>
        /// <param name="industryCollection"></param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">
        /// companyCollection
        /// or
        /// industryCollection
        /// </exception>
        public ICompanyRegistrationView CreateCompanyRegistrationView(IList <ICompanyDetail> companyCollection, IList <IIndustry> industryCollection, IList <ICountry> countryCollection)
        {
            if (companyCollection == null)
            {
                throw new ArgumentNullException(nameof(companyCollection));
            }

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

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

            // get parentcompany  drop down list
            var parentCompanytDDL = GetDropDownList.CompanyListItems(companyCollection, -1);

            var industryDDl = GetDropDownList.IIndsutryListItems(industryCollection, -1);

            var countryDDL = GetDropDownList.CountryListItem(countryCollection, 161);

            var model = new CompanyRegistrationView()
            {
                IndustryDropDownList      = industryDDl,
                ParentCompanyDropDownList = parentCompanytDDL,
                CountryDropDownList       = countryDDL,
                CompanyCountryId          = 161
            };

            return(model);
        }
Пример #2
0
        /// <summary>
        /// Creates the company registration view.
        /// </summary>
        /// <param name="companyInfo">The company information.</param>
        /// <param name="companyCollection">The company collection.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">companyCollection</exception>
        public ICompanyRegistrationView CreateCompanyRegistrationView(ICompanyDetail companyInfo,
                                                                      IList <ICompanyDetail> companyCollection, IList <IIndustry> industryCollection, IList <ICountry> countryCollection)
        {
            if (companyCollection == null)
            {
                throw new ArgumentNullException(nameof(companyCollection));
            }

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

            // get parentcompany  drop down list
            var parentCompanytDDL =
                GetDropDownList.CompanyListItems(companyCollection, companyInfo.ParentCompanyId ?? -1);

            var industryDDL =
                GetDropDownList.IIndsutryListItems(industryCollection, companyInfo.IndustryId);

            var countryDDL =
                GetDropDownList.CountryListItem(countryCollection, 161);

            var model = new CompanyRegistrationView()
            {
                ParentCompanyDropDownList = parentCompanytDDL,
                CountryDropDownList       = countryDDL,
                ProcessingMessage         = string.Empty,
                CompanyCountry            = companyInfo.CompanyCountry,
                CACRegistrationNumber     = companyInfo.CACRegistrationNumber,
                CompanyAddressLine1       = companyInfo.CompanyAddressLine1,
                CompanyAddressLine2       = companyInfo.CompanyAddressLine2,
                CompanyCity          = companyInfo.CompanyCity,
                CompanyCountryId     = 161,
                CompanyEmail         = companyInfo.CompanyEmail,
                CompanyId            = companyInfo.CompanyId,
                CompanyName          = companyInfo.CompanyName,
                CompanyPhone         = companyInfo.CompanyPhone,
                CompanyState         = companyInfo.CompanyState,
                CompanyWebsite       = companyInfo.CompanyWebsite,
                CompanyZipCode       = companyInfo.CompanyZipCode,
                DateCreated          = companyInfo.DateCreated,
                ParentCompanyId      = companyInfo.ParentCompanyId,
                LogoDigitalFileId    = companyInfo.LogoDigitalFileId,
                CompanyAlias         = companyInfo.CompanyAlias,
                IsActive             = companyInfo.IsActive,
                IndustryDropDownList = industryDDL,
                IndustryId           = companyInfo.IndustryId,
                CompanyLogo          = companyInfo.CompanyLogo
            };

            return(model);
        }
Пример #3
0
        /// <summary>
        /// Creates the profile view.
        /// </summary>
        /// <param name="profileInfo">The profile information.</param>
        /// <param name="users">The users.</param>
        /// <param name="genderCollection">The gender collection.</param>
        /// <param name="countryCollection">The country collection.</param>
        /// <param name="processingMesage">The processing mesage.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentException">genderCollection</exception>
        public IProfileView CreateProfileView(IProfileView profileInfo, IUserDetail users, IList <IYourGender> genderCollection, IList <ICountry> countryCollection, string processingMesage)
        {
            if (genderCollection == null)
            {
                throw new ArgumentException(nameof(genderCollection));
            }

            var genderDLL  = GetDropDownList.GenderListItems(genderCollection, profileInfo.GenderId);
            var countryDLL = GetDropDownList.CountryListItem(countryCollection, profileInfo.CountryId);

            profileInfo.GenderDropDown    = genderDLL;
            profileInfo.CountryDropDown   = countryDLL;
            profileInfo.User              = users;
            profileInfo.ProcessingMessage = processingMesage;


            return(profileInfo);
        }
        /// <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);
        }
Пример #6
0
        /// <summary>
        /// Edits the profile view.
        /// </summary>
        /// <param name="profileInfo">The profile information.</param>
        /// <param name="userDetail">The user detail.</param>
        /// <param name="genderCollection">The gender collection.</param>
        /// <param name="countryCollection">The country collection.</param>
        /// <param name="processingMessage">The processing message.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentException">genderCollection</exception>
        /// <exception cref="ArgumentNullException">
        /// profileInfo
        /// or
        /// userDetail
        /// </exception>
        public IProfileView EditProfileView(IProfile profileInfo, IUserDetail userDetail, IList <IYourGender> genderCollection, IList <ICountry> countryCollection, string processingMessage)
        {
            if (genderCollection == null)
            {
                throw new ArgumentException(nameof(genderCollection));
            }

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

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

            var genderDLL  = GetDropDownList.GenderListItems(genderCollection, profileInfo.GenderId);
            var CountryDLL = GetDropDownList.CountryListItem(countryCollection, profileInfo.CountryId);

            var viewModel = new ProfileModelView
            {
                User                 = userDetail,
                ProfileId            = profileInfo.ProfileId,
                CountryId            = profileInfo.CountryId,
                Address              = profileInfo.Address,
                DateOfBirth          = profileInfo.DateOfBirth,
                Nationality          = profileInfo.Nationality,
                StateOfOrigin        = profileInfo.StateOfOrigin,
                Gender               = profileInfo.Gender,
                GenderId             = profileInfo.GenderId,
                ProfileSummary       = profileInfo.ProfileSummary,
                DateCreated          = profileInfo.DateCreated,
                PictureDigitalFileId = profileInfo.PictureDigitalFileId,
                CVDigitalFileId      = profileInfo.CVDigitalFileId,
                GenderDropDown       = genderDLL,
                CountryDropDown      = CountryDLL,
                ProcessingMessage    = processingMessage ?? string.Empty
            };

            return(viewModel);
        }
Пример #7
0
        /// <summary>
        /// Creates the profile view.
        /// </summary>
        /// <param name="userInfo">The user information.</param>
        /// <param name="genderCollection">The gender collection.</param>
        /// <param name="countrycollection">The countrycollection.</param>
        /// <param name="processingMesage">The processing mesage.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentException">genderCollection</exception>
        public IProfileView CreateProfileView(IUserDetail userInfo, IList <IYourGender> genderCollection, IList <ICountry> countrycollection, string processingMesage)
        {
            if (genderCollection == null)
            {
                throw new ArgumentException(nameof(genderCollection));
            }


            var genderDLL  = GetDropDownList.GenderListItems(genderCollection, -1);
            var CountryDDL = GetDropDownList.CountryListItem(countrycollection, 161);

            var viewModel = new ProfileModelView
            {
                User              = userInfo,
                GenderDropDown    = genderDLL,
                CountryDropDown   = CountryDDL,
                ProcessingMessage = processingMesage ?? string.Empty,
                CountryId         = 161
            };

            return(viewModel);
        }
Пример #8
0
        /// <summary>
        /// Creates the company registration view.
        /// </summary>
        /// <param name="companyInfo">The company information.</param>
        /// <param name="companyCollection">The company collection.</param>
        /// <param name="industryCollection"></param>
        /// <param name="processingMessage">The processing message.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">
        /// companyInfo
        /// or
        /// companyCollection
        /// or
        /// industryCollection
        /// </exception>
        public ICompanyRegistrationView CreateCompanyRegistrationView(ICompanyRegistrationView companyInfo,
                                                                      IList <ICompanyDetail> companyCollection, IList <IIndustry> industryCollection, IList <ICountry> countryCollection,
                                                                      string processingMessage)
        {
            if (companyInfo == null)
            {
                throw new ArgumentNullException(nameof(companyInfo));
            }

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

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

            // get parentcompany  drop down list
            var parentCompanytDDL =
                GetDropDownList.CompanyListItems(companyCollection, companyInfo.ParentCompanyId ?? -1);

            var industryDDL =
                GetDropDownList.IIndsutryListItems(industryCollection, companyInfo.IndustryId);

            var countryDDL =
                GetDropDownList.CountryListItem(countryCollection, companyInfo.CompanyCountryId);

            var viewModel = companyInfo;

            viewModel.ParentCompanyDropDownList = parentCompanytDDL;
            viewModel.IndustryDropDownList      = industryDDL;
            viewModel.CountryDropDownList       = countryDDL;
            viewModel.ProcessingMessage         = processingMessage;

            return(viewModel);
        }
        /// <summary>
        /// Creates the employee report.
        /// </summary>
        /// <param name="employeeCollections">The employee collections.</param>
        /// <param name="lastName">The last name.</param>
        /// <param name="firstName">The first name.</param>
        /// <param name="genderId">The gender identifier.</param>
        /// <param name="genderCollection">The gender collection.</param>
        /// <param name="employeeTypeId">The employee type identifier.</param>
        /// <param name="employmentTypeCollection">The employment type collection.</param>
        /// <param name="countryId">The country identifier.</param>
        /// <param name="countryCollection">The country collection.</param>
        /// <param name="stateOfOriginId">The state of origin identifier.</param>
        /// <param name="stateCollection">The state collection.</param>
        /// <param name="dateExitedFrom">The date exited from.</param>
        /// <param name="dateExitTo">The date exit to.</param>
        /// <param name="dateRetirementFrom">The date retirement from.</param>
        /// <param name="dateRetirementTo">The date retirement to.</param>
        /// <param name="dateOfBirthFrom">The date of birth from.</param>
        /// <param name="dateOfBirthTo">The date of birth to.</param>
        /// <param name="age">The age.</param>
        /// <param name="locationStateId">The location state identifier.</param>
        /// <param name="locationCountryId">The location country identifier.</param>
        /// <param name="page">The page.</param>
        /// <returns></returns>
        public IEmployeeOnBoardListView CreateEmployeeReport(IList <IEmployee> employeeCollections, string lastName, string firstName, int genderId, IList <IYourGender> genderCollection,
                                                             int employeeTypeId, IList <IEmploymentType> employmentTypeCollection, int countryId, IList <ICountry> countryCollection, int stateOfOriginId, IList <IState> stateCollection,
                                                             DateTime?dateExitedFrom, DateTime?dateExitTo, DateTime?dateRetirementFrom, DateTime?dateRetirementTo, DateTime?dateOfBirthFrom, DateTime?dateOfBirthTo, int age,
                                                             int locationStateId, int locationCountryId, int?page, DateTime?dateEmployedFrom, DateTime?dateEmployedTo)
        {
            var stateDDL        = GetDropDownList.StateListItem(stateCollection, -1);
            var genderDDL       = GetDropDownList.GenderListItems(genderCollection, -1);
            var employeeTypeDDL = GetDropDownList.EmploymentTypeListItem(employmentTypeCollection, -1);
            var countryDDL      = GetDropDownList.CountryListItem(countryCollection, -1);


            //Filter Employee by Name
            var filteredList = employeeCollections.Where(x => x.LastName.Contains(string.IsNullOrEmpty(lastName)
                ? x.LastName
                : lastName)).ToList();

            filteredList = filteredList.Where(x => x.FirstName.Contains(string.IsNullOrEmpty(firstName)
                ? x.FirstName
                : firstName)).ToList();

            filteredList = filteredList.Where(x => x.GenderId.Equals(genderId < 1 ? x.GenderId : genderId)).ToList();

            filteredList = filteredList.Where(x => x.EmploymentTypeId.Equals(employeeTypeId < 1 ? x.EmploymentTypeId : employeeTypeId)).ToList();

            filteredList = filteredList.Where(x => x.NationalityId.Equals(countryId < 1 ? x.NationalityId : countryId)).ToList();

            filteredList = filteredList.Where(x => x.PermanentAddressStateId.Equals(stateOfOriginId < 1 ? x.PermanentAddressStateId : stateOfOriginId)).ToList();

            filteredList = filteredList.Where(x => x.HomeAddressStateId.Equals(locationStateId < 1  ? x.HomeAddressStateId : locationStateId)).ToList();

            foreach (var item in filteredList)
            {
                if ((item.DateExited >= dateExitedFrom && item.DateExited <= dateExitTo))
                {
                    filteredList = filteredList.Where((x => x.DateExited >= dateExitedFrom && x.DateExited <= dateExitTo)).ToList();
                }
                else
                {
                    filteredList = filteredList.Where(x => x.DateExited.Equals(x.DateExited)).ToList();
                }

                if ((item.DateEmployed >= dateEmployedFrom && item.DateEmployed <= dateEmployedTo))
                {
                    filteredList = filteredList.Where((x => x.DateEmployed >= dateEmployedFrom && x.DateEmployed <= dateEmployedFrom)).ToList();
                }
                else
                {
                    filteredList = filteredList.Where(x => x.DateEmployed.Equals(x.DateEmployed)).ToList();
                }

                if (item.Birthday >= dateOfBirthFrom && item.Birthday <= dateOfBirthTo)
                {
                    filteredList = filteredList.Where((x => x.Birthday >= dateOfBirthFrom && x.Birthday <= dateOfBirthTo)).ToList();
                }
                else
                {
                    filteredList = filteredList.Where(x => x.Birthday.Equals(x.Birthday)).ToList();
                }



                //if (ageFrom >= employeeAge && ageTo <= employeeAge)
                //{
                //    var employeeAge = (int) (DateTime.UtcNow - (DateTime)item.Birthday).Days * 0.00273973;
                //    filteredList = filteredList.Where(x => employeeAge.Equals(age)).ToList();
                //}
            }

            //filteredList = filteredList.Where(x => ((int)(DateTime.Now-(DateTime)x.Birthday).TotalDays / 365.25).Equals(age < 1  ? ((int)(DateTime.Now - (DateTime)x.Birthday).TotalDays / 365.25) : age)).ToList();



            int pageSize   = 10;
            int pageNumber = (page ?? 1);

            var result = new EmployeeOnBoardListView
            {
                EmployeeList             = filteredList.ToPagedList(pageNumber, pageSize),
                GenderDropDown           = genderDDL,
                StateDropDown            = stateDDL,
                CountryDropDown          = countryDDL,
                EmploymentTypeDropDown   = employeeTypeDDL,
                SelectedGenderId         = genderId,
                SelectedFirstName        = firstName,
                SelectedLastName         = lastName,
                SelectedCountryId        = countryId,
                SelectedLocationStateId  = locationStateId,
                SelectedStateOriginId    = stateOfOriginId,
                SelectedEmploymentTypeId = employeeTypeId,
                SelectedDateExitFrom     = dateExitedFrom,
                SelectedDateExitTo       = dateExitTo,
                SelectedDateOfBirthFrom  = dateOfBirthFrom,
                SelectedDateOfBirthTo    = dateOfBirthTo
            };

            return(result);
        }
        /// <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);
        }