예제 #1
0
 public void Insert(Job obj)
 {
     using (JobMatchEntities context = new JobMatchEntities())
     {
         context.Job.Add(obj);
         context.SaveChanges();
     }
 }
예제 #2
0
 public void Insert(EmployerRates obj)
 {
     using (JobMatchEntities context = new JobMatchEntities())
     {
         context.EmployerRates.Add(obj);
         context.SaveChanges();
     }
 }
예제 #3
0
 public void Insert(RequiredSkill obj)
 {
     using (JobMatchEntities context = new JobMatchEntities())
     {
         context.RequiredSkill.Add(obj);
         context.SaveChanges();
     }
 }
예제 #4
0
        public void Delete(int id)
        {
            Job job = null;

            using (JobMatchEntities context = new JobMatchEntities())
            {
                job = context.Job.FirstOrDefault(x => x.Id == id);
                if (job != null)
                {
                    context.Job.Remove(job);
                    context.SaveChanges();
                }
            }
        }
예제 #5
0
        public void Delete(int id)
        {
            JobSeeker jobSeeker = null;

            using (JobMatchEntities context = new JobMatchEntities())
            {
                jobSeeker = context.JobSeeker.SingleOrDefault(x => x.Id == id);
                if (jobSeeker != null)
                {
                    context.JobSeeker.Remove(jobSeeker);
                    context.SaveChanges();
                }
            }
        }
예제 #6
0
        public void Delete(int job_id, string skill)
        {
            RequiredSkill obj = null;

            using (JobMatchEntities context = new JobMatchEntities())
            {
                obj = context.RequiredSkill.SingleOrDefault(x => x.Job_Id == job_id && x.Skill == skill);
                if (obj != null)
                {
                    context.RequiredSkill.Remove(obj);
                    context.SaveChanges();
                }
            }
        }
예제 #7
0
        public void Delete(int profile_id, string skill)
        {
            Skill obj = null;

            using (JobMatchEntities context = new JobMatchEntities())
            {
                obj = context.Skill.SingleOrDefault(x => x.Profile_Id == profile_id && x.Skill1 == skill);
                if (obj != null)
                {
                    context.Skill.Remove(obj);
                    context.SaveChanges();
                }
            }
        }
예제 #8
0
        public void Delete(int employer_Id, int jobSeeker_Id, int job_Id)
        {
            EmployerRates rate = null;

            using (JobMatchEntities context = new JobMatchEntities())
            {
                rate = context.EmployerRates.SingleOrDefault(x => x.JobSeeker_Id == jobSeeker_Id && x.Job_Id == job_Id && x.Employer_Id == employer_Id);
                if (rate != null)
                {
                    context.EmployerRates.Remove(rate);
                    context.SaveChanges();
                }
            }
        }
예제 #9
0
        public void Delete(int id)
        {
            Profile profile = null;

            using (JobMatchEntities context = new JobMatchEntities())
            {
                profile = context.Profile.SingleOrDefault(x => x.JobSeeker_Id == id);
                if (profile != null)
                {
                    context.Profile.Remove(profile);
                    context.SaveChanges();
                }
            }
        }
예제 #10
0
        public void Delete(int id)
        {
            Employer employer = null;

            using (JobMatchEntities context = new JobMatchEntities())
            {
                employer = context.Employer.SingleOrDefault(x => x.Id == id);
                if (employer != null)
                {
                    context.Employer.Remove(employer);
                    context.SaveChanges();
                }
            }
        }
예제 #11
0
 public void DeleteAllRates(int employer_id)
 {
     using (JobMatchEntities context = new JobMatchEntities())
     {
         if (context.EmployerRates.Any(x => x.Employer_Id == employer_id))
         {
             var rates = context.EmployerRates.Where(x => x.Employer_Id == employer_id);
             foreach (EmployerRates rate in rates)
             {
                 context.EmployerRates.Remove(rate);
             }
             context.SaveChanges();
         }
     }
 }
예제 #12
0
        public void Update(JobSeeker obj)
        {
            JobSeeker jobSeeker = null;

            using (JobMatchEntities context = new JobMatchEntities())
            {
                jobSeeker = context.JobSeeker.SingleOrDefault(x => x.Id == obj.Id);
                if (jobSeeker != null)
                {
                    jobSeeker.Email    = obj.Email;
                    jobSeeker.Password = obj.Password;
                    jobSeeker.Username = obj.Username;
                    context.SaveChanges();
                }
            }
        }
예제 #13
0
        public void Update(Employer obj)
        {
            Employer emp = null;

            using (JobMatchEntities context = new JobMatchEntities())
            {
                emp = context.Employer.SingleOrDefault(x => x.Id == obj.Id);
                if (emp != null)
                {
                    emp.Email    = obj.Email;
                    emp.Password = obj.Password;
                    emp.Username = obj.Username;
                    context.SaveChanges();
                }
            }
        }
예제 #14
0
        public void Update(Job obj)
        {
            Job job = null;

            using (JobMatchEntities context = new JobMatchEntities())
            {
                job = context.Job.SingleOrDefault(x => x.Id == obj.Id);
                if (job != null)
                {
                    job.AditionalRequirements = obj.AditionalRequirements;
                    job.EducationRequirements = obj.EducationRequirements;
                    job.Employer_Id           = obj.Employer_Id;
                    job.JobDescription        = obj.JobDescription;
                    job.Position = obj.Position;
                    context.SaveChanges();
                }
            }
        }
예제 #15
0
        public void Update(Profile obj)
        {
            Profile profile = null;

            using (JobMatchEntities context = new JobMatchEntities())
            {
                profile = context.Profile.SingleOrDefault(x => x.JobSeeker_Id == obj.JobSeeker_Id);
                if (profile != null)
                {
                    profile.LastName         = obj.LastName;
                    profile.ShortDescription = obj.ShortDescription;
                    profile.WorkExperience   = obj.WorkExperience;
                    profile.Education        = obj.Education;
                    profile.ContactData      = obj.ContactData;
                    context.SaveChanges();
                }
            }
        }