Ejemplo n.º 1
0
        private OpenJobs Translate_JobEntity_to_Job(AvailableJob jobentity)
        {
            OpenJobs job = new OpenJobs();

            job.Posting_ID        = jobentity.PostingID;
            job.Job_ID            = jobentity.JobID;
            job.Job_Title         = jobentity.JobApplication.Title;
            job.Job_Description   = jobentity.JobApplication.Description;
            job.Job_Qualification = jobentity.JobApplication.Qualifications;
            job.Job_Location      = jobentity.Location.LocationName;
            return(job);
        }
Ejemplo n.º 2
0
        public void Create_Job_Posting(NewPosting posting)
        {
            using (db)
            {
                AvailableJob job = new AvailableJob
                {
                    LocationID = posting.Location_ID,
                    JobID      = posting.Job_ID,
                    CloseDate  = posting.Close_Date,
                    IsActive   = TRUE
                };

                db.AvailableJobs.Add(job);
                db.SaveChanges();
            }
        }
Ejemplo n.º 3
0
 public void Delete_Job_Posting(int?value)
 {
     if (value != null)
     {
         try
         {
             db = new DB_9E5950_aes01Entities();
             AvailableJob job = db.AvailableJobs.Find(value);
             db.AvailableJobs.Remove(job);
             db.SaveChanges();
         }
         catch
         {
             db = new DB_9E5950_aes01Entities();
             AvailableJob job = db.AvailableJobs.Find(value);
             job.IsActive = FALSE;
             db.SaveChanges();
         }
     }
     else
     {
         throw new Exception("Jobs not Removed!!!");
     }
 }