public Source MapFromService(MatchyBackend.Source source)
 {
     Source result = new Source();
     if (source != null)
         return new Source() { SourceId = source.SourceId, Description = source.Description };
     else
         return result;
 }
 public DetailJob MapFromService(MatchyBackend.DetailJob detailJob)
 {
     return new DetailJob()
     {
         DetailJobId = detailJob.DetailJobId,
         JobId = detailJob.JobId,
         Data = detailJob.Data
     };
 }
 public User mapFromService(MatchyBackend.User user)
 {
     return new User()
     {
         Email = user.Email,
         MayLogin = user.MayLogin,
         Pass = user.Pass
     };
 }
    public Match mapFromService(MatchyBackend.Match match)
    {
        CvMapping cvMapping = new CvMapping();
        JobMapping jobMapping = new JobMapping();

        return new Match()
        {
            Cv = cvMapping.mapFromService(match.Cv),
            Date = match.Date,
            Job = jobMapping.mapFromService(match.Job),
            Score = match.Score
        };
    }
    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 Crawler mapFromService(MatchyBackend.Crawler crawler)
 {
     if (crawler.crawler_ID != 0)
     {
         return new Crawler()
         {
             crawler_ID = crawler.crawler_ID,
             Description = crawler.Description
         };
     }
     else
     {
         Crawler result = new Crawler();
         return result;
     }
 }
 public Branche mapFromService(MatchyBackend.Branche branche)
 {
     if (branche.branche_ID != 0)
     {
         return new Branche()
         {
             branche_ID = branche.branche_ID,
             Description = branche.Description
         };
     }
     else
     {
         Branche result = new Branche();
         return result;
     }
 }
    public User mapFromService(MatchyBackend.User user)
    {
        CompanyMapping companyMapping = new CompanyMapping();
        CvMapping cvMapping = new CvMapping();

        return new User()
        {
            BirthDay = user.BirthDay,
            Email = user.Email,
            MayLogin = user.MayLogin,
            Pass = user.Pass,
            Type = user.Type,
            UserCompany = companyMapping.MapFromService(user.UserCompany),
            UserCv = cvMapping.mapFromService(user.UserCv),
            ProfileId = user.ProfileId
        };
    }
Beispiel #9
0
    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 Company MapFromService(MatchyBackend.Company company)
    {
        Company result = new Company();

        if (company.CompanyID != 0)
        {
            return new Company()
            {
                CompanyCity = company.CompanyCity,
                CompanyDate = company.CompanyDate,
                CompanyDescription = company.CompanyDescription,
                CompanyEmail = company.CompanyEmail,
                CompanyTel = company.CompanyTel,
                CompanyID = company.CompanyID,
                CompanyName = company.CompanyName
            };
        }
        else
            return result;
    }
    public Batch mapFromService(MatchyBackend.Batch batch)
    {
        var crawlerMapper = new CrawlerMapping();

        if (batch.Batch_ID != 0)
        {
            return new Batch()
            {
                Batch_ID = batch.Batch_ID,
                Crawler_ID = crawlerMapper.mapFromService(batch.Crawler_ID),
                CrawlerEnded = batch.CrawlerEnded,
                CrawlerStarted = batch.CrawlerStarted,
                isRunning = batch.isRunning
            };
        }
        else
        {
            Batch result = new Batch();
            return result;
        }
    }
Beispiel #12
0
    public Cv mapFromService(MatchyBackend.Cv cv)
    {
        var eduMapper = new EducationMapper();
        var sourceMapper = new SourceMapper();

        if (cv.CvID != 0)
        {
            return new 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.MapFromService(cv.EducationLevel),
                Hours = cv.Hours,
                Profession = cv.Profession,
                Province = cv.Province,
                Email = cv.Email,
                JobRequirements = cv.JobRequirements,
                WorkExperience = cv.WorkExperience,
                Source = sourceMapper.MapFromService(cv.Source)
            };
        }
        else
        {
            Cv result = new Cv();
            result.EducationLevel = eduMapper.MapFromService(cv.EducationLevel);
            result.Source = sourceMapper.MapFromService(cv.Source);
            return result;
        }
    }