/// <summary> /// Creates the edit department view. /// </summary> /// <param name="departmentInfo">The department information.</param> /// <param name="departmentsList">The departments list.</param> /// <param name="companyList">The company list.</param> /// <param name="message">The message.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// departmentInfo /// or /// departmentsList /// or /// companyList /// </exception> public IDepartmentView CreateEditDepartmentView(IDepartment departmentInfo, IList <IDepartment> departmentsList, string message) { if (departmentInfo == null) { throw new ArgumentNullException(nameof(departmentInfo)); } if (departmentsList == null) { throw new ArgumentNullException(nameof(departmentsList)); } var departmentDDL = GetDropDownList.DepartmentListItems(departmentsList, departmentInfo.ParentDepartmentId); var view = new DepartmentView { DepartmentId = departmentInfo.DepartmentId, CompanyId = departmentInfo.CompanyId, ParentDepartmentDropDown = departmentDDL, ProcessingMessage = message, DepartmentName = departmentInfo.DepartmentName, Description = departmentInfo.Description, IsActive = departmentInfo.IsActive, ParentDepartmentId = departmentInfo.ParentDepartmentId, DateCreated = departmentInfo.DateCreated }; return(view); }
/// <summary> /// Creates the vacancy view. /// </summary> /// <param name="companyCollection">The company collection.</param> /// <param name="departmentDropDown">The department drop down.</param> /// <param name="jobTitleDropDown">The job title drop down.</param> /// <param name="gradesDropDown">The grades drop down.</param> /// <param name="vacancyInfo">The vacancy information.</param> /// <param name="message">The message.</param> /// <returns></returns> public IVacancyView CreateVacancyView(IList <ICompanyDetail> companyCollection, IList <IDepartment> departmentDropDown, IList <IJobTitle> jobTitleDropDown, IList <IGrade> gradesDropDown, IVacancyView vacancyInfo, string message) { //Get Department var departmentDDL = GetDropDownList.DepartmentListItems(departmentDropDown, vacancyInfo.DepartmentId); //Get Job titles var jobTitleDDL = GetDropDownList.JobTitlesListItems(jobTitleDropDown, vacancyInfo.JobTitleId); //Get Grades var gradesDDl = GetDropDownList.GradeListItems(gradesDropDown, vacancyInfo.GradeId); // get company drop down list var companyDDL = GetDropDownList.CompanyListItems(companyCollection, vacancyInfo.CompanyId); var viewModel = vacancyInfo; viewModel.DepartmentDropDown = departmentDDL; viewModel.JobTitleDropDown = jobTitleDDL; viewModel.GradesDropDown = gradesDDl; viewModel.CompanyDropDown = companyDDL; viewModel.ProcessingMessage = message; return(viewModel); }
/// <summary> /// Creates the edit department view. /// </summary> /// <param name="departmentInfo">The department information.</param> /// <param name="departmentCollection">The department collection.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// departmentInfo /// or /// departmentCollection /// </exception> public IDepartmentViews CreateEditDepartmentView(IDepartment departmentInfo, IList <IDepartment> departmentCollection) { if (departmentInfo == null) { throw new ArgumentNullException(nameof(departmentInfo)); } if (departmentCollection == null) { throw new ArgumentNullException(nameof(departmentCollection)); } var departmentDDL = GetDropDownList.DepartmentListItems(departmentCollection, -1); var returnDepartment = new DepartmentView { CompanyId = departmentInfo.CompanyId, DepartmentId = departmentInfo.DepartmentId, DepartmentName = departmentInfo.DepartmentName, Description = departmentInfo.Description, ParentDepartmentId = departmentInfo.ParentDepartmentId, ParentDepartmentDropDown = departmentDDL, IsActive = departmentInfo.IsActive, }; return(returnDepartment); }
/// <summary> /// Creates the updated vacancy view. /// </summary> /// <param name="vacancyInfo">The vacancy information.</param> /// <param name="processingMessage">The processing message.</param> /// <param name="departmentDropDown">The department drop down.</param> /// <param name="jobTitleDropDown">The job title drop down.</param> /// <param name="gradesDropDown">The grades drop down.</param> /// <returns></returns> /// <exception cref="ArgumentNullException">vacancyInfo</exception> /// <exception cref="System.ArgumentNullException">vacancyInfo</exception> public IVacancyView CreateUpdatedVacancyView(IVacancyView vacancyInfo, string processingMessage, IList <IDepartment> departmentDropDown, IList <IJobTitle> jobTitleDropDown, IList <IGrade> gradesDropDown) { if (vacancyInfo == null) { throw new ArgumentNullException(nameof(vacancyInfo)); } if (vacancyInfo == null) { throw new System.ArgumentNullException(nameof(vacancyInfo)); } var departmentDDL = GetDropDownList.DepartmentListItems(departmentDropDown, vacancyInfo.DepartmentId); //Get Grades var gradesDDl = GetDropDownList.GradeListItems(gradesDropDown, vacancyInfo.GradeId); //Get Job titles var jobTitleDDL = GetDropDownList.JobTitlesListItems(jobTitleDropDown, vacancyInfo.JobTitleId); vacancyInfo.GradesDropDown = gradesDDl; vacancyInfo.DepartmentDropDown = departmentDDL; vacancyInfo.JobTitleDropDown = jobTitleDDL; vacancyInfo.ProcessingMessage = processingMessage; return(vacancyInfo); }
/// <summary> /// Creates the department view. /// </summary> /// <param name="departmentCollection">The department collection.</param> /// <param name="companyCollection">The company collection.</param> /// <param name="deptInfo">The dept information.</param> /// <param name="message">The message.</param> /// <returns></returns> public IDepartmentView CreateDepartmentView(IList <IDepartment> departmentCollection, IDepartmentView deptInfo, string message) { var departmentDDL = GetDropDownList.DepartmentListItems(departmentCollection, deptInfo.ParentDepartmentId); var view = deptInfo; view.ProcessingMessage = message; view.ParentDepartmentDropDown = departmentDDL; return(view); }
/// <summary> /// Creates the department view. /// </summary> /// <param name="departmentCollection">The department collection.</param> /// <param name="companyId">The company identifier.</param> /// <param name="companyCollection"></param> /// <returns></returns> public IDepartmentView CreateDepartmentView(IList <IDepartment> departmentCollection, int companyId) { var departmentDDL = GetDropDownList.DepartmentListItems(departmentCollection, -1); var view = new DepartmentView { CompanyId = companyId, ParentDepartmentDropDown = departmentDDL, ProcessingMessage = string.Empty }; return(view); }
/// <summary> /// Creates the updated department view. /// </summary> /// <param name="deptInfo">The dept information.</param> /// <param name="departmentCollection">The department collection.</param> /// <param name="processingMessage">The processing message.</param> /// <returns></returns> /// <exception cref="ArgumentNullException">deptInfo</exception> /// <exception cref="ArgumentException">departmentCollection</exception> public IDepartmentView CreateUpdatedDepartmentView(IDepartmentView deptInfo, IList <IDepartment> departmentCollection, string processingMessage) { if (deptInfo == null) { throw new ArgumentNullException(nameof(deptInfo)); } if (departmentCollection == null) { throw new ArgumentException(nameof(departmentCollection)); } var departmentDDL = GetDropDownList.DepartmentListItems(departmentCollection, -1); deptInfo.ParentDepartmentDropDown = departmentDDL; deptInfo.ProcessingMessage = processingMessage; return(deptInfo); }
/// <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 department view. /// </summary> /// <param name="departmentCollection">The department collection.</param> /// <param name="cacRegistrationNumber">The cac registration number.</param> /// <returns></returns> /// <exception cref="System.ArgumentNullException">departmentCollection</exception> public IDepartmentViews CreateDepartmentView(IList <IDepartment> departmentCollection, int companyId) { //this is different from grade cos we creating a fresh department //// if (departmentCollection == null) { throw new ArgumentNullException(nameof(departmentCollection)); } var departmentDDL = GetDropDownList.DepartmentListItems(departmentCollection, -1); var view = new DepartmentView { CompanyId = companyId, ParentDepartmentDropDown = departmentDDL, ProcessingMessage = string.Empty }; return(view); }
/// <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); }