コード例 #1
0
        public JobDetail ToObject()
        {
            JobDetail obj = new JobDetail();

            ShareFunctions.CopyPropertiesTo <JobDetailModel, JobDetail>(this, obj);
            return(obj);
        }
コード例 #2
0
ファイル: UserDetailModel.cs プロジェクト: jansenzjh/Palazzo
        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);
        }
コード例 #3
0
        public JobPost ToObject()
        {
            JobPost obj = new JobPost();

            ShareFunctions.CopyPropertiesTo <JobPostModel, JobPost>(this, obj);
            return(obj);
        }
コード例 #4
0
ファイル: UserDetailModel.cs プロジェクト: jansenzjh/Palazzo
        public UserDetail ToObject()
        {
            UserDetail obj = new UserDetail();

            ShareFunctions.CopyPropertiesTo <UserDetailModel, UserDetail>(this, obj);
            return(obj);
        }
コード例 #5
0
 public JobPostModel(JobPost obj)
 {
     if (obj != null)
     {
         ShareFunctions.CopyPropertiesTo <JobPost, JobPostModel>(obj, this);
     }
 }
コード例 #6
0
ファイル: Job.cs プロジェクト: jansenzjh/Palazzo
        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);
            }
        }
コード例 #7
0
 public UserJobModel(UserJob obj, bool isLoadJob = true)
 {
     ShareFunctions.CopyPropertiesTo <UserJob, UserJobModel>(obj, this);
     if (isLoadJob)
     {
         Post = new JobPostModel(this.JobId);
     }
 }
コード例 #8
0
 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);
     }
 }
コード例 #9
0
        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();
            }
        }
コード例 #10
0
        private void LoadModel(JobPostModel source, JobPost dest)
        {
            ShareFunctions.CopyPropertiesTo <JobPostModel, JobPost>(source, dest);

            //dest.AspNetUser = DataContext.AspNetUsers.SingleOrDefault(x => x.Id.Equals(source.UserId));
        }
コード例 #11
0
ファイル: Skill.cs プロジェクト: jansenzjh/Palazzo
 public Skill(CandidateSkill obj)
 {
     ShareFunctions.CopyPropertiesTo <CandidateSkill, Skill>(obj, this);
 }
コード例 #12
0
ファイル: UserDetailModel.cs プロジェクト: jansenzjh/Palazzo
 public UserDetailModel(UserDetail obj)
 {
     ShareFunctions.CopyPropertiesTo <UserDetail, UserDetailModel>(obj, this);
 }
コード例 #13
0
 public Education(CandidateEducation obj)
 {
     ShareFunctions.CopyPropertiesTo <CandidateEducation, Education>(obj, this);
 }
コード例 #14
0
 private void LoadModel(UserJob source, UserJob dest)
 {
     ShareFunctions.CopyPropertiesTo <UserJob, UserJob>(source, dest);
     //dest.AspNetUser = DataContext.AspNetUsers.SingleOrDefault(x => x.Id.Equals(source.UserId));
 }
コード例 #15
0
ファイル: UserDetailModel.cs プロジェクト: jansenzjh/Palazzo
 private void LoadModel(UserDetail source, UserDetail dest)
 {
     ShareFunctions.CopyPropertiesTo <UserDetail, UserDetail>(source, dest);
     dest.AspNetUser = DataContext.AspNetUsers.SingleOrDefault(x => x.Id.Equals(source.UserID));
 }
コード例 #16
0
ファイル: Language.cs プロジェクト: jansenzjh/Palazzo
 private void LoadModel(CandidateLanguage source, CandidateLanguage dest)
 {
     ShareFunctions.CopyPropertiesTo <CandidateLanguage, CandidateLanguage>(source, dest);
     dest.AspNetUser = DataContext.AspNetUsers.SingleOrDefault(x => x.Id.Equals(source.UserID));
 }
コード例 #17
0
ファイル: WorkExperience.cs プロジェクト: jansenzjh/Palazzo
 public WorkExperience(CandidateWorkExperience obj)
 {
     ShareFunctions.CopyPropertiesTo <CandidateWorkExperience, WorkExperience>(obj, this);
 }
コード例 #18
0
ファイル: Reference.cs プロジェクト: jansenzjh/Palazzo
 public Reference(CandidateReference obj)
 {
     ShareFunctions.CopyPropertiesTo <CandidateReference, Reference>(obj, this);
 }
コード例 #19
0
 public CompanyModel(Company obj)
 {
     ShareFunctions.CopyPropertiesTo <Company, CompanyModel>(obj, this);
 }
コード例 #20
0
ファイル: Language.cs プロジェクト: jansenzjh/Palazzo
 public Language(CandidateLanguage obj)
 {
     ShareFunctions.CopyPropertiesTo <CandidateLanguage, Language>(obj, this);
 }
コード例 #21
0
ファイル: Training.cs プロジェクト: jansenzjh/Palazzo
 public Training(CandidateTraining obj)
 {
     ShareFunctions.CopyPropertiesTo <CandidateTraining, Training>(obj, this);
 }