Esempio n. 1
0
		private void detach_Employments(Employment entity)
		{
			this.SendPropertyChanging();
			entity.Applicant = null;
		}
Esempio n. 2
0
 partial void DeleteEmployment(Employment instance);
Esempio n. 3
0
 partial void UpdateEmployment(Employment instance);
Esempio n. 4
0
 partial void InsertEmployment(Employment instance);
Esempio n. 5
0
		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;
        }