コード例 #1
0
ファイル: SpecialNoteExtension.cs プロジェクト: Budzyn/hunter
        public static SpecialNote ToEntity(this SpecialNoteDto specialNoteDto)
        {
            var specialNote = new SpecialNote()
            {
                Id = specialNoteDto.Id,
                Text = specialNoteDto.Text,
                LastEdited = specialNoteDto.LastEdited,
                VacancyId = specialNoteDto.VacancyId,
                CandidateId = specialNoteDto.CandidateId
            };

            return specialNote;
        }
コード例 #2
0
 public void CreateAddedSpecialNoteActivity(SpecialNote specialNote)
 {
     try
     {
         var card = _cardRepository.Get(x => x.CandidateId == specialNote.CandidateId &&  x.VacancyId == specialNote.VacancyId);
         string message = string.Format("A special note for {0} {1} on '{2}' has been added",
         card.Candidate.FirstName, card.Candidate.LastName, card.Vacancy.Name);
         ActivityType type = ActivityType.SpecialNote;
         Uri url = new Uri(string.Format("#/vacancy/{0}/candidate/{1}?tab={2}",
             card.VacancyId, card.CandidateId, "specialnotes"), UriKind.Relative);
         _activityPostService.Post(message, type, url);
     }
     catch (Exception e)
     {
         _logger.Log("Creating activity exception : " + e.Message);
     }
 }