示例#1
0
 partial void DeleteEducation(Education instance);
示例#2
0
		private void detach_Educations(Education entity)
		{
			this.SendPropertyChanging();
			entity.Applicant = null;
		}
示例#3
0
 partial void UpdateEducation(Education instance);
示例#4
0
 partial void InsertEducation(Education instance);
示例#5
0
		private void detach_Educations(Education entity)
		{
			this.SendPropertyChanging();
			entity.School = null;
		}
示例#6
0
		private void attach_Educations(Education entity)
		{
			this.SendPropertyChanging();
			entity.School = this;
		}
        public bool CreateEducation(EducationDAO edu)
        {
            Education education = new Education
            {
                Applicant_ID = edu.ApplicantID,
                School_ID = edu.SchoolID,
                YearsAttendedFrom = edu.YearsAttendedFrom,
                YearsAttendedTo = edu.YearsAttendedTo,
                Graduated = edu.Graduated,
                DegreeAndMajor = edu.DegreeAndMajor
            };

            using (AESDatabaseDataContext db = new AESDatabaseDataContext())
            {
                db.Educations.InsertOnSubmit(education);
                try
                {
                    db.SubmitChanges();
                }
                catch (Exception e)
                {
                    throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message));
                }
            }

            return true;
        }