public bool CreateApplicant(ApplicantDAO app) { Applicant a = new Applicant { Applicant_ID = app.ApplicantID, FirstName = app.FirstName, MiddleName = app.MiddleName, LastName = app.LastName, SSN = app.SSN, Gender = app.Gender, ApplicantAddress = app.ApplicantAddress, Phone = app.Phone, NameAlias = app.NameAlias }; using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { db.Applicants.InsertOnSubmit(a); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool CreateApplication(ApplicationDAO app) { Application a = new Application { Application_ID = app.ApplicationID, ApplicationStatus = app.ApplicationStatus, SalaryExpectation = app.SalaryExpectation, FullTime = app.FullTime, AvailableForDays = app.AvailableForDays, AvailableForEvenings = app.AvailableForEvenings, AvailableForWeekends = app.AvailableForWeekends, MondayFrom = app.MondayFrom, TuesdayFrom = app.TuesdayFrom, WednesdayFrom = app.WednesdayFrom, ThursdayFrom = app.ThursdayFrom, FridayFrom = app.FridayFrom, SaturdayFrom = app.SaturdayFrom, SundayFrom = app.SundayFrom, MondayTo = app.MondayTo, TuesdayTo = app.TuesdayTo, WednesdayTo = app.WednesdayTo, ThursdayTo = app.ThursdayTo, FridayTo = app.FridayTo, SaturdayTo = app.SaturdayTo, SundayTo = app.SundayTo }; using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { db.Applications.InsertOnSubmit(a); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool CreateUserProfile(UserProfileDAO s) { UserProfile userProfile = new UserProfile { UserId = s.UserId, UserName = s.UserName }; using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { db.UserProfiles.InsertOnSubmit(userProfile); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool UpdateSchool(SchoolDAO newSch) { using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { School school = db.Schools.Single(sch => sch.School_ID == newSch.SchoolID); school.School_Name = newSch.SchoolName; school.School_Address = newSch.SchoolAddress; try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool CreateStore(StoreDAO s) { Store store = new Store { Store_ID = s.StoreID, Location = s.Location, Manager_ID = s.Manager_ID }; using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { db.Stores.InsertOnSubmit(store); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool DeleteJobRequirement(int ID) { using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { JobRequirement jobRequirement = db.JobRequirements.Single(jbReqt => jbReqt.JobRequirement_ID == ID); db.JobRequirements.DeleteOnSubmit(jobRequirement); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool DeleteQuestionBank(int id) { using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { QuestionBank questionBank = db.QuestionBanks.Single(qubk => qubk.QuestionBank_ID == id); db.QuestionBanks.DeleteOnSubmit(questionBank); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool DeleteAssessment(int id) { using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { Assessment assessment = db.Assessments.Single(asmt => asmt.Assessment_ID == id); db.Assessments.DeleteOnSubmit(assessment); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool UpdateSkillQuestionBank(SkillQuestionBankDAO newSkillQuestionBank) { using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { SkillQuestionBank skillQuestionBank = db.SkillQuestionBanks.Single(s => s.SkillQuestionBank_ID == newSkillQuestionBank.SkillQuestionBankID); skillQuestionBank.Skill_ID = newSkillQuestionBank.SkillID; skillQuestionBank.QuestionBank_ID = newSkillQuestionBank.QuestionBankID; try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool CreateMCQuestion(MCQuestionDAO s) { MCQuestion mCQuestion = new MCQuestion { MCQuestion_ID = s.MCQuestionID, MCQuestionDescription = s.MCQuestionDescription }; using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { db.MCQuestions.InsertOnSubmit(mCQuestion); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool CreateQuestionBank(QuestionBankDAO s) { QuestionBank questionBank = new QuestionBank { QuestionBank_ID = s.QuestionBankID, MCQuestion_ID = s.MCQuestionID, MCOption_ID = s.MCOptionID, MCCorrectOption = s.MCCorrectOption }; using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { db.QuestionBanks.InsertOnSubmit(questionBank); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool CreateJobOpeningInterviewQuestion(JobOpeningInterviewQuestionDAO s) { JobOpeningInterviewQuestion jobOpeningInterviewQuestion = new JobOpeningInterviewQuestion { JobOpeningInterviewQuestion_ID = s.JobOpeningInterviewQuestionID, JobOpening_ID = s.JobOpeningID, SAQuestion_ID = s.SAQuestionID }; using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { db.JobOpeningInterviewQuestions.InsertOnSubmit(jobOpeningInterviewQuestion); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool CreateJobRequirement(JobRequirementDAO jbReqt) { JobRequirement jobRequirement = new JobRequirement { JobOpening_ID = jbReqt.JobOpeningID, Skill_ID = jbReqt.SkillID, Notes = jbReqt.Notes }; using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { db.JobRequirements.InsertOnSubmit(jobRequirement); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool UpdateUserProfileToApplicant(UserProfileToApplicantDAO newUserProfileToApplicant) { using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { UserProfileToApplicant userProfileToApplicant = db.UserProfileToApplicants.Single(s => s.UserProfileToApplicant_ID == newUserProfileToApplicant.UserProfileToApplicant_ID); userProfileToApplicant.Applicant_ID = newUserProfileToApplicant.Applicant_ID; userProfileToApplicant.UserId = newUserProfileToApplicant.UserId; try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool UpdateUserProfile(UserProfileDAO newUserProfile) { using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { UserProfile userProfile = db.UserProfiles.Single(s => s.UserId == newUserProfile.UserId); userProfile.UserId = newUserProfile.UserId; userProfile.UserName = newUserProfile.UserName; try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool UpdateStore(StoreDAO newStore) { using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { Store store = db.Stores.Single(s => s.Store_ID == newStore.StoreID); store.Location = newStore.Location; store.Manager_ID = newStore.Manager_ID; try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool CreateUserProfileToApplicant(UserProfileToApplicantDAO s) { UserProfileToApplicant userProfileToApplicant = new UserProfileToApplicant { UserProfileToApplicant_ID = s.UserProfileToApplicant_ID, Applicant_ID = s.Applicant_ID, UserId = s.UserId }; using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { db.UserProfileToApplicants.InsertOnSubmit(userProfileToApplicant); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool DeleteEmployment(int ID) { using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { Employment em = db.Employments.Single(emp => emp.Employment_ID == ID); db.Employments.DeleteOnSubmit(em); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool DeleteApplicant(int ID) { using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { Applicant a = db.Applicants.Single(app => app.Applicant_ID == ID); db.Applicants.DeleteOnSubmit(a); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool DeleteInterview(int id) { using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { Interview interview = db.Interviews.Single(intvw => intvw.Interview_ID == id); db.Interviews.DeleteOnSubmit(interview); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool DeleteEducation(int ID) { using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { Education education = db.Educations.Single(edu => edu.Education_ID == ID); db.Educations.DeleteOnSubmit(education); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool UpdateSkill(SkillDAO newSkill) { using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { Skill skill = db.Skills.Single(s => s.Skill_ID == newSkill.SkillID); skill.SkillName = newSkill.SkillName; try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool DeleteExpertise(int id) { using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { Expertise e = db.Expertises.Single(app => app.Applicant_ID == id); db.Expertises.DeleteOnSubmit(e); try { db.SubmitChanges(); } catch (Exception ex) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(ex.Message)); } } return true; }
public bool CreateSAResponse(SAResponseDAO s) { SAResponse sAResponse = new SAResponse { SAResponse_ID = s.SAResponseID, SAResponseDescription = s.SAResponseDescription }; using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { db.SAResponses.InsertOnSubmit(sAResponse); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool DeleteJobOpeningInterviewQuestion(int id) { using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { JobOpeningInterviewQuestion jobOpeningInterviewQuestion = db.JobOpeningInterviewQuestions.Single(jbopinqu => jbopinqu.JobOpeningInterviewQuestion_ID == id); db.JobOpeningInterviewQuestions.DeleteOnSubmit(jobOpeningInterviewQuestion); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool CreateSchool(SchoolDAO sch) { School school = new School { School_Name = sch.SchoolName, School_Address = sch.SchoolAddress }; using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { db.Schools.InsertOnSubmit(school); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool CreateApplied(AppliedDAO app) { Applied a = new Applied { Applied_ID = app.AppliedID, Applicant_ID = app.ApplicantID, Application_ID = app.ApplicationID, JobOpening_ID = app.JobOpeningID, DateApplied = app.DateApplied }; using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { db.Applieds.InsertOnSubmit(a); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool CreateSkill(SkillDAO s) { Skill skill = new Skill { Skill_ID = s.SkillID, SkillName = s.SkillName }; using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { db.Skills.InsertOnSubmit(skill); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool DeleteSAQuestion(int id) { using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { SAQuestion sAQuestion = db.SAQuestions.Single(saqu => saqu.SAQuestion_ID == id); db.SAQuestions.DeleteOnSubmit(sAQuestion); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }
public bool CreateSkillQuestionBank(SkillQuestionBankDAO s) { SkillQuestionBank skillQuestionBank = new SkillQuestionBank { SkillQuestionBank_ID = s.SkillQuestionBankID, Skill_ID = s.SkillID, QuestionBank_ID = s.QuestionBankID }; using (AESDatabaseDataContext db = new AESDatabaseDataContext()) { db.SkillQuestionBanks.InsertOnSubmit(skillQuestionBank); try { db.SubmitChanges(); } catch (Exception e) { throw new FaultException<KaskServiceException>(new KaskServiceException(), new FaultReason(e.Message)); } } return true; }