Ejemplo n.º 1
0
 private ProfessionalContactDegree GetContactDegree(OrganisationHierarchyPath organisationHierarchyPath, Guid contenderId)
 {
     return(IsApplicant(organisationHierarchyPath, contenderId)
                ? ProfessionalContactDegree.Applicant
                : _exercisedCreditsQuery.HasExercisedCredit <ContactCredit>(organisationHierarchyPath, contenderId)
                      ? ProfessionalContactDegree.Contacted
                      : ProfessionalContactDegree.NotContacted);
 }
Ejemplo n.º 2
0
        private IList <Guid> GetApplicants(OrganisationHierarchyPath organisationHierarchyPath, IEnumerable <Guid> contenderIds)
        {
            var applicants = from c in _exercisedCreditsQuery.GetExercisedCredits <ApplicantCredit>(organisationHierarchyPath, contenderIds) select c.ExercisedOnId.Value;

            if (organisationHierarchyPath.RecruiterId != null)
            {
                applicants = applicants.Concat(_repository.GetOwnerApplicants(organisationHierarchyPath.RecruiterId.Value, contenderIds));
            }
            return(applicants.Distinct().ToList());
        }
Ejemplo n.º 3
0
        private bool IsApplicant(OrganisationHierarchyPath organisationHierarchyPath, Guid contenderId)
        {
            // Before the organisational hierarchy was in place we didn't explicitly record using credits for applicants.
            // Use the credits to find those applicants to jobs in the organisational hierarchy
            // but also use the repository to look for those who applied to jobs from the recruiter themselves before
            // this was put in place.

            if (_exercisedCreditsQuery.HasExercisedCredit <ApplicantCredit>(organisationHierarchyPath, contenderId))
            {
                return(true);
            }

            if (organisationHierarchyPath.RecruiterId != null)
            {
                return(_repository.IsOwnerApplicant(organisationHierarchyPath.RecruiterId.Value, contenderId));
            }

            return(false);
        }
Ejemplo n.º 4
0
 bool IContendersQuery.IsApplicant(OrganisationHierarchyPath organisationHierarchyPath, Guid contenderId)
 {
     return(IsApplicant(organisationHierarchyPath, contenderId));
 }
Ejemplo n.º 5
0
 IList <Guid> IContendersQuery.GetApplicants(OrganisationHierarchyPath organisationHierarchyPath, IEnumerable <Guid> contenderIds)
 {
     return(GetApplicants(organisationHierarchyPath, contenderIds));
 }
Ejemplo n.º 6
0
 IList <Guid> IContendersQuery.GetApplicants(OrganisationHierarchyPath organisationHierarchyPath)
 {
     return(GetApplicants(organisationHierarchyPath).ToList());
 }
Ejemplo n.º 7
0
 ProfessionalContactDegree IContendersQuery.GetContactDegree(OrganisationHierarchyPath organisationHierarchyPath, Guid contenderId)
 {
     return(GetContactDegree(organisationHierarchyPath, contenderId));
 }