public MatchyBackend.Search MapToService(Search search) { BrancheMapping brancheMapper = null; EducationMapper eduMapper = null; if(search.Branche != null) brancheMapper = new BrancheMapping(); if(search.Education != null) eduMapper = new EducationMapper(); MatchyBackend.Search result = new MatchyBackend.Search(); if (search != null) { return new MatchyBackend.Search() { SearchTerm = search.SearchTerm, Education = eduMapper != null ? eduMapper.MapToService(search.Education) : null, City = search.City, Hours = search.Hours, Branche = brancheMapper != null ? brancheMapper.mapToService(search.Branche) : null }; } else return result; }
public MatchyBackend.Cv mapToService(Cv cv) { var eduMapper = new EducationMapper(); var sourceMapper = new SourceMapper(); MatchyBackend.Cv result = new MatchyBackend.Cv(); if (cv != null) { return new MatchyBackend.Cv() { Name = cv.Name, CvID = cv.CvID, Age = cv.Age, Sex = cv.Sex, Interests = cv.Interests, Personal = cv.Personal, City = cv.City, Date = cv.Date, Discipline = cv.Discipline, EducationHistory = cv.EducationHistory, EducationLevel = eduMapper.MapToService(cv.EducationLevel), Hours = cv.Hours, Profession = cv.Profession, Province = cv.Province, Email = cv.Email, JobRequirements = cv.JobRequirements, WorkExperience = cv.WorkExperience, Source = sourceMapper.MapToService(cv.Source) }; } else return result; }
/// <summary> /// Builds the dropdownlist for Education /// </summary> /// <param name="eduList">list that needs to be filled</param> public void buildDropDownListEdu(DropDownList eduList) { EducationMapper eduMapping = new EducationMapper(); MatchyBackend.Education[] educations = service.GetEdu(0); education = new Education[educations.Length]; eduList.Items.Add(new ListItem("Opleidingsniveau", "Default")); for (int i = 0; i < educations.Length; i++) { education[i] = eduMapping.MapFromService(educations[i]); eduList.Items.Add(new ListItem(educations[i].Name, educations[i].EducationId.ToString())); } }
public Search MapFromService(MatchyBackend.Search search) { var eduMapper = new EducationMapper(); var brancheMapper = new BrancheMapping(); return new Search() { SearchTerm = search.SearchTerm, Education = eduMapper.MapFromService(search.Education), City = search.City, Hours = search.Hours, Branche = brancheMapper.mapFromService(search.Branche) }; }
public Job mapFromService(MatchyBackend.Job job) { CompanyMapping companyMapping = new CompanyMapping(); EducationMapper educationMapping = new EducationMapper(); DetailJobMapper detailMapping = new DetailJobMapper(); return new Job() { JobID = job.JobID, Company = companyMapping.MapFromService(job.Company), Education = educationMapping.MapFromService(job.Education), DetailJob = detailMapping.MapFromService(job.DetailJob), JobTitle = job.JobTitle, JobDescription = job.JobDescription, JobPlaceDate = job.JobPlaceDate, JobHours = job.JobHours }; }
public EducationController(IUniversityProvider universityProvider, ICourseProvider courseProvider, EducationMapper educationMapper) { _universityProvider = universityProvider; _courseProvider = courseProvider; _educationMapper = educationMapper; }