Exemplo n.º 1
0
        public void AddApplicant(Applicant applicant)
        {
            IApplicantRepository repo = RepoFactory.CreateApplicantRepository();

            applicant.ApplicantID = GetApplicantID(repo.GetAll());
            repo.AddApplicant(applicant);
        }
Exemplo n.º 2
0
        public ListApplicantResponses ListApplicants()
        {
            IApplicantRepository   repo     = RepoFactory.CreateApplicantRepository();
            ListApplicantResponses response = new ListApplicantResponses();
            var applicants = repo.GetAll();

            if (applicants.Count == 0)
            {
                response.Success = false;
                response.Message = "No applicants found.";
            }
            else
            {
                response.Success    = true;
                response.applicants = applicants;
            }

            return(response);
        }
Exemplo n.º 3
0
        public void DeleteApplicant(Applicant applicant)
        {
            IApplicantRepository repo = RepoFactory.CreateApplicantRepository();

            repo.DeleteApplicant(applicant);
        }
Exemplo n.º 4
0
        public void EditApplicant(Applicant applicant, Applicant editedApplicant)
        {
            IApplicantRepository repo = RepoFactory.CreateApplicantRepository();

            repo.EditApplicant(applicant, editedApplicant);
        }