Пример #1
0
        public void AddEmploymentHistoryEdu(EmploymentHistoryEducation employmentHistoryEdu)
        {
            HumanResourcesDBEntities db = new HumanResourcesDBEntities();

            db.EmploymentHistoryEducation.Add(employmentHistoryEdu);
            db.SaveChanges();
        }
Пример #2
0
        public void UpdateEmpHistEdu(EmploymentHistoryEducation employmentHistoryEdu)
        {
            HumanResourcesDBEntities db = new HumanResourcesDBEntities();

            db.EmploymentHistoryEducation.FirstOrDefault(x => x.ID == employmentHistoryEdu.ID).EmployeeId      = employmentHistoryEdu.EmployeeId;
            db.EmploymentHistoryEducation.FirstOrDefault(x => x.ID == employmentHistoryEdu.ID).SchoolAdress    = employmentHistoryEdu.SchoolAdress;
            db.EmploymentHistoryEducation.FirstOrDefault(x => x.ID == employmentHistoryEdu.ID).Comments        = employmentHistoryEdu.Comments;
            db.EmploymentHistoryEducation.FirstOrDefault(x => x.ID == employmentHistoryEdu.ID).DateFrom        = employmentHistoryEdu.DateFrom;
            db.EmploymentHistoryEducation.FirstOrDefault(x => x.ID == employmentHistoryEdu.ID).DateTo          = employmentHistoryEdu.DateTo;
            db.EmploymentHistoryEducation.FirstOrDefault(x => x.ID == employmentHistoryEdu.ID).SchoolName      = employmentHistoryEdu.SchoolName;
            db.EmploymentHistoryEducation.FirstOrDefault(x => x.ID == employmentHistoryEdu.ID).CertificateName = employmentHistoryEdu.CertificateName;
            db.SaveChanges();
        }