/// <summary> /// Creates the exit management view. /// </summary> /// <param name="employeeExitView">The employee exit view.</param> /// <param name="processingMessage">The processing message.</param> /// <returns></returns> public IEmployeeExitView CreateExitManagementView(IEmployeeExitView employeeExitView, IList <ICompanyDetail> companyCollection, IList <IEmployee> employeeCollection, IList <ITypeOfExit> typeOfExitCollection, string processingMessage) { if (employeeExitView == null) { throw new ArgumentNullException(nameof(employeeExitView)); } if (companyCollection == null) { throw new ArgumentNullException(nameof(companyCollection)); } if (employeeCollection == null) { throw new ArgumentNullException(nameof(employeeCollection)); } if (typeOfExitCollection == null) { throw new ArgumentNullException(nameof(typeOfExitCollection)); } var companyDDL = GetDropDownList.CompanyListItems(companyCollection, employeeExitView.CompanyId); var employeeDDL = GetDropDownList.EmployeeListitems(employeeCollection, employeeExitView.EmployeeId); var typeOfExitDDL = GetDropDownList.TypeOfExitListItems(typeOfExitCollection, employeeExitView.TypeOfExitId); employeeExitView.CompanyDropDown = companyDDL; employeeExitView.EmployeeDropDown = employeeDDL; employeeExitView.TypeOfExitDropDown = typeOfExitDDL; employeeExitView.ProcessingMessage = processingMessage; return(employeeExitView); }
/// <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 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); }
/// <summary> /// Creates the edit user view. /// </summary> /// <param name="userDetail">The user detail.</param> /// <param name="companyCollection">The company collection.</param> /// <param name="appRoleCollection">The application role collection.</param> /// <param name="processingMessage">The processing message.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// userDetail /// or /// companyCollection /// or /// appRoleCollection /// </exception> public IUserViewModel CreateEditUserView(IUserViewModel userDetail, IList <ICompanyDetail> companyCollection, IList <IAppRole> appRoleCollection, string processingMessage) { if (userDetail == null) { throw new ArgumentNullException(nameof(userDetail)); } if (companyCollection == null) { throw new ArgumentNullException(nameof(companyCollection)); } if (appRoleCollection == null) { throw new ArgumentNullException(nameof(appRoleCollection)); } var companyDropDown = GetDropDownList.CompanyListItems(companyCollection, -1); var appRoleDropDown = GetDropDownList.AppRoleListItems(appRoleCollection, -1); userDetail.CompanyDropDown = companyDropDown; userDetail.RoleDropDown = appRoleDropDown; userDetail.ProcessingMessage = processingMessage; return(userDetail); }
/// <summary> /// Creates the edit training calendar view. /// </summary> /// <param name="trainingCalendar">The training calendar.</param> /// <param name="companyCollection">The company collection.</param> /// <param name="trainingCollection">The training collection.</param> /// <param name="trainingStatusCollection">The training status collection.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// companyCollection /// or /// trainingCollection /// or /// trainingStatusCollection /// </exception> public ITraininingCalendarView CreateEditTrainingCalendarView(ITrainingCalendar trainingCalendar, IList <ICompanyDetail> companyCollection, IList <ITraining> trainingCollection, IList <ITrainingStatus> trainingStatusCollection) { if (companyCollection == null) { throw new ArgumentNullException(nameof(companyCollection)); } if (trainingCollection == null) { throw new ArgumentNullException(nameof(trainingCollection)); } if (trainingStatusCollection == null) { throw new ArgumentNullException(nameof(trainingStatusCollection)); } var companyDDL = GetDropDownList.CompanyListItems(companyCollection, trainingCalendar.CompanyId); var trainingDDL = GetDropDownList.TrainingListItems(trainingCollection, trainingCalendar.TrainingId); var trainingStatusDDL = GetDropDownList.TrainingStatusListItems(trainingStatusCollection, trainingCalendar.TrainingStatusId); var result = new TrainingCalendarView { CompanyDropDown = companyDDL, TrainingDropDown = trainingDDL, TrainingStatusDropDown = trainingStatusDDL, CompanyId = trainingCalendar.CompanyId, TrainingId = trainingCalendar.TrainingId, TrainingStatusId = trainingCalendar.TrainingStatusId, Location = trainingCalendar.Location, DeliveryEndDate = trainingCalendar.DeliveryEndDate, DeliveryStartDate = trainingCalendar.DeliveryStartDate, TrainingCalenderId = trainingCalendar.TrainingCalenderId, }; return(result); }
/// <summary> /// Creates the training calendar view. /// </summary> /// <param name="traininingCalendarView">The trainining calendar view.</param> /// <param name="companyCollection">The company collection.</param> /// <param name="trainingCollection">The training collection.</param> /// <param name="trainingStatusCollection">The training status collection.</param> /// <param name="message">The message.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// companyCollection /// or /// trainingCollection /// or /// trainingStatusCollection /// </exception> public ITraininingCalendarView CreateTrainingCalendarView(ITraininingCalendarView traininingCalendarView, IList <ICompanyDetail> companyCollection, IList <ITraining> trainingCollection, IList <ITrainingStatus> trainingStatusCollection, string message) { if (companyCollection == null) { throw new ArgumentNullException(nameof(companyCollection)); } if (trainingCollection == null) { throw new ArgumentNullException(nameof(trainingCollection)); } if (trainingStatusCollection == null) { throw new ArgumentNullException(nameof(trainingStatusCollection)); } var companyDDL = GetDropDownList.CompanyListItems(companyCollection, traininingCalendarView.CompanyId); var trainingDDL = GetDropDownList.TrainingListItems(trainingCollection, traininingCalendarView.TrainingId); var trainingStatusDDL = GetDropDownList.TrainingStatusListItems(trainingStatusCollection, traininingCalendarView.TrainingStatusId); traininingCalendarView.CompanyDropDown = companyDDL; traininingCalendarView.TrainingDropDown = trainingDDL; traininingCalendarView.TrainingStatusDropDown = trainingStatusDDL; traininingCalendarView.ProcessingMessage = message; return(traininingCalendarView); }
/// <summary> /// Creates the department ListView. /// </summary> /// <param name="selectedCompanyId">The selected company identifier.</param> /// <param name="selectedDepartmentId">The selected department identifier.</param> /// <param name="selectedDepartment">The selected department.</param> /// <param name="companyList">The company list.</param> /// <param name="departmentsList">The departments list.</param> /// <param name="message">The message.</param> /// <returns></returns> public IDepartmentListView CreateDepartmentListView(int selectedCompanyId, int selectedDepartmentId, string selectedDepartment, IList <ICompanyDetail> companyList, IList <IDepartment> departmentsList, string message) { // get parentcompany drop down list var companytDDL = GetDropDownList.CompanyListItems(companyList, selectedCompanyId); // filter with companyId var filteredList = departmentsList .Where(x => x.CompanyId.Equals(selectedCompanyId < 1 ? x.CompanyId : selectedCompanyId)).ToList(); //filter with departmentId filteredList = filteredList.Where(x => x.DepartmentId.Equals(selectedDepartmentId < 1 ? x.DepartmentId : selectedDepartmentId)).ToList(); //filter with departmentname filteredList = filteredList.Where(x => x.DepartmentName.Contains(string.IsNullOrEmpty(selectedDepartment) ? x.DepartmentName : selectedDepartment)).ToList(); var viewModel = new DepartmentListView { CompanyDropDownList = companytDDL, DepartmentCollection = filteredList.ToList(), ProcessingMessage = message, SelectedCompanyId = selectedCompanyId, SelectedDepartment = selectedDepartment, SelectedDepartmentId = selectedDepartmentId }; return(viewModel); }
/// <summary> /// Gets the employee ListView. /// </summary> /// <param name="onboardingCollections">The onboarding collections.</param> /// <param name="staffNumber">The staff number.</param> /// <param name="staffName">Name of the staff.</param> /// <param name="message">The message.</param> /// <returns></returns> public IEmployeeOnBoardListView GetEmployeeListView( IList <IEmployee> employeeCollections, IList <ICompanyDetail> companyCollection, string sortOrder, string searchString, string message, int?page) { if (string.IsNullOrEmpty(searchString)) { searchString = ""; } searchString.ToLower(); //Filter Employee by Name var filteredList = employeeCollections.Where(x => (x.FirstName.ToLower()).Contains(string.IsNullOrEmpty(searchString) ? (x.FirstName.ToLower()) : searchString) || (x.LastName.ToLower()).Contains(string.IsNullOrEmpty(searchString) ? (x.LastName.ToLower()) : searchString) || (x.StaffNumber.ToLower()).Contains(string.IsNullOrEmpty(searchString) ? (x.StaffNumber.ToLower()) : searchString)); switch (sortOrder) { case "name_desc": filteredList = filteredList.OrderByDescending(s => s.LastName); break; case "Date": filteredList = filteredList.OrderBy(s => s.DateEmployed); break; case "date_desc": filteredList = filteredList.OrderByDescending(s => s.DateEmployed); break; default: filteredList = filteredList.OrderBy(s => s.LastName); break; } var companyDDL = GetDropDownList.CompanyListItems(companyCollection, -1); int pageSize = 10; int pageNumber = (page ?? 1); var returnedView = new EmployeeOnBoardListView { EmployeeList = filteredList.ToPagedList(pageNumber, pageSize), CompanyDropDown = companyDDL, sortOrder = string.IsNullOrEmpty(sortOrder) ? "name_desc" : "", searchString = (searchString == "Date" ? "date_desc" : "Date"), ProcessingMessage = message, }; return(returnedView); }
/// <summary> /// Gets the job titles ListView. /// </summary> /// <param name="seletedJobTitle">The seleted job title.</param> /// <param name="selectedJobTitle">The selected job title.</param> /// <param name="jobTitleCollections">The job title collections.</param> /// <param name="companyDetail">The company detail.</param> /// <param name="message">The message.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// jobTitleCollections /// or /// companyDetail /// </exception> public IJobTitleListView GetJobTitlesListView(int selectedCompanyId, string selectedJobTitle, IList <IJobTitle> jobTitleCollections, ICompanyDetail companyDetail, IList <ICompanyDetail> companyList, string message) { if (jobTitleCollections == null) { throw new ArgumentNullException(nameof(jobTitleCollections)); } if (companyDetail == null) { throw new ArgumentNullException(nameof(companyDetail)); } var companyDDL = GetDropDownList.CompanyListItems(companyList, selectedCompanyId); var filteredList = jobTitleCollections.Where(x => x.JobTitleName.Contains(string.IsNullOrEmpty(selectedJobTitle) ? x.JobTitleName : selectedJobTitle)).ToList(); var returnedView = new JobTitleListView { JobTitlesCollection = filteredList.ToList(), CompanyDetails = companyDetail, ProcessingMessage = message, SelectedJobTitle = selectedJobTitle, CompanyDropDownList = companyDDL }; return(returnedView); }
/// <summary> /// Creates the vacancy view. /// </summary> /// <param name="companyCollection"></param> /// <returns></returns> public IVacancyView CreateVacancyView(IList <ICompanyDetail> companyCollection) { // get company drop down list var companyDDL = GetDropDownList.CompanyListItems(companyCollection, -1); return(new VacancyView { CompanyDropDown = companyDDL, }); }
/// <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); }
public IHomeView GetDashBoardOption(IUserDetail userInfo, IList <ICompanyDetail> companyCollection) { var companyDDL = GetDropDownList.CompanyListItems(companyCollection, -1); var result = new HomeModelView { CompanyCollection = companyCollection, CompanyDropDown = companyDDL, User = userInfo }; return(result); }
public ITrainingNeedAnalysisView CreateTrainingNeedAnalysisView(IList <ICompanyDetail> companyCollection) { //if (trainingNeedAnalysisId == null) throw new ArgumentNullException(nameof(trainingNeedAnalysisId)); var companyDDL = GetDropDownList.CompanyListItems(companyCollection, -1); var viewModel = new TrainingNeedAnalysisView { //TrainingNeedAnalysisID = trainingNeedAnalysisId, CompanyCollection = companyDDL }; return(viewModel); }
/// <summary> /// Creates the vacancy ListView. /// </summary> /// <param name="searchCriteria">The search criteria.</param> /// <param name="companyCollection">The company collection.</param> /// <param name="vacancyCollection">The vacancy collection.</param> /// <returns></returns> public IVacancyListView CreateVacancyListView(IVacancyListFilter searchCriteria, IList <ICompanyDetail> companyCollection, IList <IVacancyDetail> vacancyCollection) { //Get company list var companyDDL = GetDropDownList.CompanyListItems(companyCollection, searchCriteria.SelectedCompanyId); var returnView = new VacancyListView { CompanyDropDownList = companyDDL, VacancyDetailCollection = vacancyCollection, ProcessingMessage = string.Empty }; return(returnView); }
/// <summary> /// Creates the training report. /// </summary> /// <param name="trainingReportViewModel">The training report view model.</param> /// <param name="companyCollection">The company collection.</param> /// <param name="employeeCollection">The employee collection.</param> /// <param name="trainingCollection">The training collection.</param> /// <param name="trainingRatingCollection">The training rating collection.</param> /// <param name="trainingCalendarCollection">The training calendar collection.</param> /// <param name="message">The message.</param> /// <returns></returns> public ITrainingReportViewModel CreateTrainingReport(ITrainingReportViewModel trainingReportViewModel, IList <ICompanyDetail> companyCollection, IList <IEmployee> employeeCollection, ITraining trainingInfo, IList <ITrainingEvaluationRating> trainingRatingCollection, IList <ITrainingCalendar> trainingCalendarCollection, string message) { //if (trainingId == null) throw new ArgumentNullException(nameof(trainingId)); var companyDDL = GetDropDownList.CompanyListItems(companyCollection, -1); var employeeDDL = GetDropDownList.EmployeeListitems(employeeCollection, -1); var evaluationDDL = GetDropDownList.TrainingEvaluationListItems(trainingRatingCollection, -1); var trainingcalendarDDL = GetDropDownList.TrainingCalendarListItems(trainingCalendarCollection, -1); trainingReportViewModel.CompanyDropDownlist = companyDDL; trainingReportViewModel.EmployeeDropDownlist = employeeDDL; trainingReportViewModel.Training = trainingInfo; trainingReportViewModel.TrainingEvaluationRatingDropDownlist = evaluationDDL; trainingReportViewModel.TrainingCalendarDropDownlist = trainingcalendarDDL; trainingReportViewModel.ProcessingMessage = message; return(trainingReportViewModel); }
/// <summary> /// Creates the training calendar ListView. /// </summary> /// <param name="trainingCollection">The training collection.</param> /// <param name="companyCollection">The company collection.</param> /// <param name="message">The message.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// trainingCollection /// or /// companyCollection /// </exception> public ITrainingCalendarListView CreateTrainingCalendarListView(int?selectedCompanyId, string selectedTrainingName, string selectedLocation, IList <ITrainingCalendar> trainingCollection, IList <ICompanyDetail> companyCollection, string message) { if (trainingCollection == null) { throw new ArgumentNullException(nameof(trainingCollection)); } if (companyCollection == null) { throw new ArgumentNullException(nameof(companyCollection)); } var companyDDL = GetDropDownList.CompanyListItems(companyCollection, -1); var filteredList = trainingCollection .Where(x => x.CompanyId.Equals(selectedCompanyId < 1 ? x.CompanyId : selectedCompanyId)).ToList(); filteredList = filteredList.Where(x => x.TrainingName.Contains(string.IsNullOrEmpty(selectedTrainingName) ? x.TrainingName : selectedTrainingName)).ToList(); filteredList = filteredList.Where(x => x.Location.Contains(string.IsNullOrEmpty(selectedLocation) ? x.Location : selectedLocation)).ToList(); var result = new TrainingCalendarListView { TrainingCalendarCollection = filteredList.ToList(), CompanyDropDown = companyDDL, SelectedCompanyId = selectedCompanyId, SelectedLocation = selectedLocation, SelectedTrainingName = selectedTrainingName, ProcessingMessage = message, }; return(result); }
/// <summary> /// Creates the training need analysis ListView. /// </summary> /// <param name="selectedCompanyId">The selected company identifier.</param> /// <param name="trainingNeedAnalysisCollection">The training need analysis collection.</param> /// <param name="message">The message.</param> /// <returns></returns> /// <exception cref="System.ArgumentNullException">trainingNeedAnalysisCollection</exception> public ITrainingNeedAnalysisListView CreateTrainingNeedAnalysisListView(int?selectedCompanyId, IList <ICompanyDetail> companyCollection, IList <ITrainingNeedAnalysis> trainingNeedAnalysisCollection, string message) { if (trainingNeedAnalysisCollection == null) { throw new ArgumentNullException(nameof(trainingNeedAnalysisCollection)); } var companyDDL = GetDropDownList.CompanyListItems(companyCollection, -1); var filteredList = trainingNeedAnalysisCollection .Where(x => x.CompanyId.Equals(selectedCompanyId < 1 ? x.CompanyId : selectedCompanyId)).ToList(); var returnModel = new TrainingNeedAnalysisListView { TrainingNeedAnalysisCollection = filteredList, ProcessingMessage = message, SelectedCompanyID = selectedCompanyId, CompanyDropDownList = companyDDL }; return(returnModel); }
/// <summary> /// Creates the applications ListView. /// </summary> /// <param name="selectedVacancyId">The selected vacancy identifier.</param> /// <param name="selectedCompanyId">The selected company identifier.</param> /// <param name="selectedJobTitle">The selected job title.</param> /// <param name="applicationsCollections">The applications collections.</param> /// <param name="companyList">The company list.</param> /// <param name="message">The message.</param> /// <returns></returns> public IVacancyListView CreateApplicationsListView(int selectedVacancyId, int selectedCompanyId, string selectedJobTitle, IList <IApplicationModel> applicationsCollections, IList <ICompanyDetail> companyList, string message) { // get company drop down list var companytDDL = GetDropDownList.CompanyListItems(companyList, selectedCompanyId); //Get Job Title DropDownList // filter with companyId var filteredList = applicationsCollections .Where(x => x.CompanyId.Equals(selectedCompanyId < 1 ? x.CompanyId : selectedCompanyId)).ToList(); // filter with ApplicationID filteredList = filteredList .Where(x => x.VacancyId.Equals(selectedVacancyId < 1 ? x.VacancyId : selectedVacancyId)).ToList(); //filter with Job Title filteredList = filteredList.Where(x => x.JobTitle.Contains(string.IsNullOrEmpty(selectedJobTitle) ? x.JobTitle : selectedJobTitle)).ToList(); var viewModel = new VacancyListView { CompanyDropDownList = companytDDL, VacancyApplicationcollection = filteredList, SelectedJobName = selectedJobTitle, ProcessingMessage = message, SelectedVacancyId = selectedVacancyId, }; return(viewModel); }
public IVacancyListAdminView CreateVacancyListAdminView(IVacancyListFilter searchCriteria, IList <ICompanyDetail> companyCollection, IList <IVacancyDetail> vacancyCollection, string message) { //Get company list var companyDDL = GetDropDownList.CompanyListItems(companyCollection, searchCriteria.SelectedCompanyId); // implement filter here using search criteria // implement filter here using search criteria // filter with companyId var filteredList = vacancyCollection .Where(x => x.CompanyId.Equals(searchCriteria.SelectedCompanyId < 1 ? x.CompanyId : searchCriteria.SelectedCompanyId)).ToList(); //filter with departmentId filteredList = filteredList.Where(x => x.VacancyId.Equals( searchCriteria.SelectedVacancyId < 1 ? x.VacancyId : searchCriteria.SelectedVacancyId)).ToList(); //filter with departmentname filteredList = filteredList.Where(x => x.JobTitle.Contains(string.IsNullOrEmpty(searchCriteria.SelectedJobName) ? x.JobTitle : searchCriteria.SelectedJobName)).ToList(); var returnView = new VacancyListAdminView { CompanyDropDownList = companyDDL, VacancyDetailCollection = filteredList.ToList(), SearchCriteria = searchCriteria, ProcessingMessage = message }; return(returnView); }
/// <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 training report ListView. /// </summary> /// <param name="selectedCompanyId"></param> /// <param name="selectedTrainingReportID">The selected training report identifier.</param> /// <param name="TrainingReportCollection">The training report collection.</param> /// <param name="companyCollection"></param> /// <param name="processingMessage">The processing message.</param> /// <returns></returns> /// <exception cref="ArgumentNullException">TrainingReportCollection</exception> public ITrainingReportListView CreateTrainingReportListView(int?selectedCompanyId, int?selectedTrainingReportID, IList <ITrainingReport> TrainingReportCollection, IList <ICompanyDetail> companyCollection, string processingMessage) { if (TrainingReportCollection == null) { throw new ArgumentNullException(nameof(TrainingReportCollection)); } var companyDDL = GetDropDownList.CompanyListItems(companyCollection, -1); var filteredList = TrainingReportCollection .Where(x => x.CompanyId.Equals(selectedCompanyId < 1 ? x.CompanyId : selectedCompanyId)).ToList(); var result = new TrainingReportListView { TrainingReportCollection = filteredList, CompanyDropDown = companyDDL, SelectedCompanyID = selectedCompanyId, ProcessingMessage = processingMessage }; return(result); }
/// <summary> /// </summary> /// <param name="vacancyInfo"></param> /// <param name="companyCollection"></param> /// <returns></returns> public IVacancyView EditVacancyView(IVacancyDetail vacancyInfo, IList <ICompanyDetail> companyCollection) { //Get Company var companyDDL = GetDropDownList.CompanyListItems(companyCollection, vacancyInfo.CompanyId); return(new VacancyView { CompanyDropDown = companyDDL, VacancyId = vacancyInfo.VacancyId, JobFunction = vacancyInfo.JobFunction, JobTitle = vacancyInfo.JobTitle, CompanyId = vacancyInfo.CompanyId, DepartmentId = vacancyInfo.DepartmentId, JobTitleId = vacancyInfo.JobTitleId, GradeId = vacancyInfo.GradeId, Qualification = vacancyInfo.Qualification, Experience = vacancyInfo.Experience, NumberToEmploy = vacancyInfo.NumberToEmploy, OpenDate = vacancyInfo.OpenDate, Closedate = vacancyInfo.Closedate, ProcessingMessage = vacancyInfo.ProcessingMessage, }); }
/// <summary> /// Creates the edit user view. /// </summary> /// <param name="userDetail">The user detail.</param> /// <param name="companyCollection">The company collection.</param> /// <param name="appRoleCollection">The application role collection.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// userDetail /// or /// companyCollection /// or /// appRoleCollection /// </exception> public IUserViewModel CreateEditUserView(IUserDetail userDetail, IList <ICompanyDetail> companyCollection, IList <IAppRole> appRoleCollection) { if (userDetail == null) { throw new ArgumentNullException(nameof(userDetail)); } if (companyCollection == null) { throw new ArgumentNullException(nameof(companyCollection)); } if (appRoleCollection == null) { throw new ArgumentNullException(nameof(appRoleCollection)); } var companyDropDown = GetDropDownList.CompanyListItems(companyCollection, -1); var appRoleDropDown = GetDropDownList.AppRoleListItems(appRoleCollection, -1); var returnView = new UserViewModel { UserId = userDetail.UserId, Username = userDetail.Username, IsUserVerified = userDetail.IsUserVerified, FirstName = userDetail.FirstName, LastName = userDetail.LastName, Email = userDetail.Email, CompanyDropDown = companyDropDown, RoleDropDown = appRoleDropDown }; return(returnView); }
/// <summary> /// Creates the specific employee training view. /// </summary> /// <param name="selectedEmployeeId">The selected employee identifier.</param> /// <param name="employee">The employee.</param> /// <param name="company">The company.</param> /// <param name="trainingCollection">The training collection.</param> /// <param name="companyCollection">The company collection.</param> /// <param name="processingMessage">The processing message.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// trainingCollection /// or /// companyCollection /// or /// trainingCollection /// or /// trainingCollection /// </exception> public IEmployeeTrainingListView CreateSpecificEmployeeTrainingView(int?selectedEmployeeId, IEmployee employee, ICompanyDetail company, IList <IEmployeeTrainingModel> trainingCollection, IList <ICompanyDetail> companyCollection, string processingMessage) { if (trainingCollection == null) { throw new ArgumentNullException(nameof(trainingCollection)); } if (companyCollection == null) { throw new ArgumentNullException(nameof(companyCollection)); } if (trainingCollection == null) { throw new ArgumentNullException(nameof(trainingCollection)); } if (trainingCollection == null) { throw new ArgumentNullException(nameof(trainingCollection)); } var companyDDL = GetDropDownList.CompanyListItems(companyCollection, -1); var employeeTrainingDDL = GetDropDownList.EmployeeTrainingListItems(trainingCollection, -1); var viewModel = new EmployeeTrainingListView { CompanyDropDownList = companyDDL, employeeTrainingView = trainingCollection, ProcessingMessage = processingMessage, Employee = employee, Company = company, }; return(viewModel); }