Exemple #1
0
 public void UpdateGroupParticipantRole(GroupParticipantDTO participant)
 {
     try
     {
         var apiToken      = _apiUserService.GetToken();
         var mpParticipant = Mapper.Map <MpGroupParticipant>(participant);
         List <MpGroupParticipant> part = new List <MpGroupParticipant>();
         part.Add(mpParticipant);
         _mpGroupRepository.UpdateGroupParticipant(part);
         if (participant.GroupRoleId == _groupRoleLeader)
         {
             if (_mpGroupRepository.ParticipantGroupHasStudents(apiToken, mpParticipant.ParticipantId, mpParticipant.GroupParticipantId))
             {
                 _mpGroupRepository.SendNewStudentMinistryGroupAlertEmail(part);
             }
         }
     }
     catch (Exception e)
     {
         var message = String.Format("Could not update group participant {0}", participant.ParticipantId);
         _logger.Error(message, e);
     }
 }