Exemplo n.º 1
0
        private void GenerateApplicant(Postulation postulation)
        {
            //TODO: move it to an Action
            var applicant = new Applicant()
            {
                JobSearchId = postulation.JobSearchId,
                Email = postulation.Email,
                FirstName = postulation.FirstName,
                LastName = postulation.LastName
            };
            RavenSession.Store(applicant);

            applicant.Notes = new List<ApplicantNote>();

            if (postulation.Curriculum != null)
            {
                var curriculum = GenerateAttachment(applicant, postulation.Curriculum);
                applicant.AddGeneralNote("Currículum", curriculum);
            }

            if (!string.IsNullOrEmpty(postulation.Comment))
            {
                applicant.AddGeneralNote("Nota de postulación:\n\n" + postulation.Comment);
            }

            //TODO change this when links are in place
            if (!string.IsNullOrEmpty(postulation.LinkedInUrl))
            {
                applicant.AddGeneralNote("Perfil de LinkedIn: " + postulation.LinkedInUrl);
            }
        }
        private void GenerateApplicant(Postulation postulation)
        {
            //TODO: move it to an Action
            var applicant = new Applicant()
            {
                JobSearchId = postulation.JobSearchId,
                Email = postulation.Email,
                FirstName = postulation.FirstName,
                LastName = postulation.LastName,
                TechnicalSkills = postulation.TechnicalSkills,
                LinkedInLink = postulation.LinkedInUrl
            };
            RavenSession.Store(applicant);

            applicant.Notes = new List<NoteWithAttachment>();

            if (postulation.Curriculum != null)
            {
                var curriculum = GenerateAttachment(applicant, postulation.Curriculum);
                applicant.AddGeneralNote("Currículum", curriculum);
            }

            if (!string.IsNullOrEmpty(postulation.Comment))
            {
                applicant.AddGeneralNote("Nota de postulación:\n\n" + postulation.Comment);
            }
        }