public bool PostApplicant(ApplicantDAO app) { ApplicantServiceClient client = new ApplicantServiceClient(); try { bool result = client.CreateApplicant(app); return result; } catch (FaultException<KaskServiceException> e) { throw new HttpException(e.Message); } }
public ApplicantDAO GetApplicant(int id) { ApplicantServiceClient client = new ApplicantServiceClient(); try { ApplicantDAO result = client.GetApplicantByID(id); return result; } catch (FaultException<KaskServiceException> e) { throw new HttpException(e.Message); } }
public IEnumerable<ApplicantDAO> GetApplicants() { ApplicantServiceClient client = new ApplicantServiceClient(); try { IEnumerable<ApplicantDAO> result = client.GetApplicants(); return result; } catch (FaultException<KaskServiceException> e) { throw new HttpException(e.Message); } }
public bool DeleteApplicant(int id) { try { ApplicantServiceClient client = new ApplicantServiceClient(); if (client.DeleteApplicant(id)) return true; } catch (FaultException<KaskServiceException> e) { throw new HttpException(e.Message); } return false; }