public JobDetail ToObject() { JobDetail obj = new JobDetail(); ShareFunctions.CopyPropertiesTo <JobDetailModel, JobDetail>(this, obj); return(obj); }
public static List <UserDetailModel> SearchResumes(int page = 1, int size = 25, ResumeSearchFilter filter = null) { if (filter == null) { filter = new ResumeSearchFilter(); } if (filter.FromDate == DateTime.MinValue) { filter.FromDate = DateTime.Today.AddDays(-30); } if (filter.ToDate == DateTime.MinValue) { filter.ToDate = DateTime.Today; } List <UserDetailModel> returnList = new List <UserDetailModel>(); PalazzoDBDataContext context = new PalazzoDBDataContext(); var ud = context.procSearchResume(filter.FromDate, filter.ToDate, filter.Keyword, filter.Page, filter.PageSize, filter.DegreeSearch, 0, filter.LanguageSearch, filter.EducationSearch, filter.SkillSearch); //List<UserDetail> objs = context.UserDetails.Skip((page - 1) * size).Take(size).ToList(); foreach (procSearchResumeResult o in ud) { UserDetailModel obj = new UserDetailModel(); ShareFunctions.CopyPropertiesTo <procSearchResumeResult, UserDetailModel>(o, obj); returnList.Add(obj); } return(returnList); }
public JobPost ToObject() { JobPost obj = new JobPost(); ShareFunctions.CopyPropertiesTo <JobPostModel, JobPost>(this, obj); return(obj); }
public UserDetail ToObject() { UserDetail obj = new UserDetail(); ShareFunctions.CopyPropertiesTo <UserDetailModel, UserDetail>(this, obj); return(obj); }
public JobPostModel(JobPost obj) { if (obj != null) { ShareFunctions.CopyPropertiesTo <JobPost, JobPostModel>(obj, this); } }
public List <JobPost> Search(string desc, string city, string state, ref int total, int page = 1, int lastMonthsNumber = 2) { List <JobPost> returnList = new List <JobPost>(); if (!string.IsNullOrEmpty(desc)) { PalazzoDBDataContext context = new PalazzoDBDataContext(); var results = context.procJobSearch(desc, city, state, lastMonthsNumber, page, _PageSize); foreach (procJobSearchResult rlt in results.ToList()) { JobPost obj = new JobPost(); ShareFunctions.CopyPropertiesTo <procJobSearchResult, JobPost>(rlt, obj); returnList.Add(obj); total = rlt.Total.Value; } //if (total == 0) //{ // total = DataContext.JobPosts.Count((job => job.Title.Contains(desc) // || job.JobName.Contains(desc) // || job.CompanyName.Contains(desc) // || job.Category.Contains(desc) // //|| job.JobDescription.Contains(desc) // && // ((job.JobLocation.Contains(city) // || job.JobLocation.Contains(state)) // //|| job.JobDescription.Contains(city) // ) // && // (job.JobPostDate >= DateTime.Today.AddMonths(lastMonthsNumber * -1)) // )); //} //objs = DataContext.JobPosts.Where((job => job.Title.Contains(desc) // || job.JobName.Contains(desc) // || job.CompanyName.Contains(desc) // || job.Category.Contains(desc) // //|| job.JobDescription.Contains(desc) // && // ((job.JobLocation.Contains(city) // || job.JobLocation.Contains(state)) // //|| job.JobDescription.Contains(city) // ) // && // (job.JobPostDate >= DateTime.Today.AddMonths(lastMonthsNumber * -1)) // )).Skip((page - 1) * _PageSize).Take(_PageSize).ToList(); } if (returnList == null || returnList.Count == 0) { return(new List <JobPost>()); } else { return(returnList); } }
public UserJobModel(UserJob obj, bool isLoadJob = true) { ShareFunctions.CopyPropertiesTo <UserJob, UserJobModel>(obj, this); if (isLoadJob) { Post = new JobPostModel(this.JobId); } }
public CompanyModel(Guid companyId) { if (DataContext.Companies.Any(x => x.Id.Equals(companyId))) { var obj = DataContext.Companies.Where(x => x.Id.Equals(companyId)).FirstOrDefault(); ShareFunctions.CopyPropertiesTo <Company, CompanyModel>(obj, this); } }
public JobPostModel(Guid guid) { JobPost jd = new JobPost(); JobPost obj = DataContext.JobPosts.Where(x => x.Id.Equals(guid)).FirstOrDefault(); if (obj != null) { ShareFunctions.CopyPropertiesTo <JobPost, JobPostModel>(obj, this); this.Description = DataContext.JobDetails.Where(x => x.JobId.Equals(guid)).Select(x => x.JobDetailContent).FirstOrDefault(); } }
private void LoadModel(JobPostModel source, JobPost dest) { ShareFunctions.CopyPropertiesTo <JobPostModel, JobPost>(source, dest); //dest.AspNetUser = DataContext.AspNetUsers.SingleOrDefault(x => x.Id.Equals(source.UserId)); }
public Skill(CandidateSkill obj) { ShareFunctions.CopyPropertiesTo <CandidateSkill, Skill>(obj, this); }
public UserDetailModel(UserDetail obj) { ShareFunctions.CopyPropertiesTo <UserDetail, UserDetailModel>(obj, this); }
public Education(CandidateEducation obj) { ShareFunctions.CopyPropertiesTo <CandidateEducation, Education>(obj, this); }
private void LoadModel(UserJob source, UserJob dest) { ShareFunctions.CopyPropertiesTo <UserJob, UserJob>(source, dest); //dest.AspNetUser = DataContext.AspNetUsers.SingleOrDefault(x => x.Id.Equals(source.UserId)); }
private void LoadModel(UserDetail source, UserDetail dest) { ShareFunctions.CopyPropertiesTo <UserDetail, UserDetail>(source, dest); dest.AspNetUser = DataContext.AspNetUsers.SingleOrDefault(x => x.Id.Equals(source.UserID)); }
private void LoadModel(CandidateLanguage source, CandidateLanguage dest) { ShareFunctions.CopyPropertiesTo <CandidateLanguage, CandidateLanguage>(source, dest); dest.AspNetUser = DataContext.AspNetUsers.SingleOrDefault(x => x.Id.Equals(source.UserID)); }
public WorkExperience(CandidateWorkExperience obj) { ShareFunctions.CopyPropertiesTo <CandidateWorkExperience, WorkExperience>(obj, this); }
public Reference(CandidateReference obj) { ShareFunctions.CopyPropertiesTo <CandidateReference, Reference>(obj, this); }
public CompanyModel(Company obj) { ShareFunctions.CopyPropertiesTo <Company, CompanyModel>(obj, this); }
public Language(CandidateLanguage obj) { ShareFunctions.CopyPropertiesTo <CandidateLanguage, Language>(obj, this); }
public Training(CandidateTraining obj) { ShareFunctions.CopyPropertiesTo <CandidateTraining, Training>(obj, this); }