public JobPosting getOneJobPosting(long jobPostingID) { using (Entities db = new Entities()) { JobPosting eJP = (from d in db.JobPostings where d.JobPostingID == jobPostingID select new JobPosting { PartnerID = d.PartnerID, Active_YN = d.Active_YN, ContactID = d.ContactID, CreatedDT = d.CreatedDT, BusinessCategory = d.BusinessCategory, Description_JobPosting = d.Description_JobPosting, JobPostingID = d.JobPostingID, JobTitle = d.JobTitle, LocationID = d.LocationID, PositionID = d.PositionID, EstHoursPerWeek = d.EstHoursPerWeek, PartnerJobLevel = d.PartnerJobLevel, PartnerRequisitionNumber = d.PartnerRequisitionNumber, PostingEndDate = d.PostingEndDate, PostingStartDate = d.PostingStartDate, Requirements = d.Requirements, WorkSchedule = d.WorkSchedule }).SingleOrDefault(); return(eJP); } }
public JobDisplayModel(long JobPostingID) { if (JobPostingID > 0) { jp1 = _rep.getJobPostingByID(JobPostingID); this.JobPostingID = JobPostingID; this.JobTitle = jp1.JobTitle; this.BusinessCategory = jp1.BusinessCategory; this.Description_External = jp1.Description_External; this.Description_JobPosting = jp1.Description_JobPosting; this.Requirements = jp1.Requirements; this.EstHoursPerWeek = jp1.EstHoursPerWeek; this.WorkSchedule = jp1.WorkSchedule; this.CreatedDT = jp1.CreatedDT; this.PostingStartDate = jp1.PostingStartDate; this.PostingEndDate = jp1.PostingEndDate; this.Active_YN = jp1.Active_YN; this.CompanyName = _rep.GetEmployerName_ForPartnerID(jp1.PartnerID); this.CityStateZip = _rep.GetCityStateZip_ForJobPostingID(JobPostingID); } }