private void detach_Employments(Employment entity) { this.SendPropertyChanging(); entity.Applicant = null; }
partial void DeleteEmployment(Employment instance);
partial void UpdateEmployment(Employment instance);
partial void InsertEmployment(Employment instance);
private void attach_Employments(Employment entity) { this.SendPropertyChanging(); entity.Employer = this; }
public bool CreateEmployment(EmploymentDAO emp) { Employment employment = new Employment { Applicant_ID = emp.ApplicantID, Employer_ID = emp.EmployerID, MayWeContactCurrentEmployer = emp.MayWeContactCurrentEmployer, EmployedFrom = emp.EmployedFrom, EmployedTo = emp.EmployedTo, Supervisor = emp.Supervisor, Position = emp.Position, StartingSalary = emp.StartingSalary, EndingSalary = emp.EndingSalary, ReasonForLeaving = emp.ReasonForLeaving, Responsibilities = emp.Responsibilities }; using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { db.Employments.InsertOnSubmit(employment); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }