Exemplo n.º 1
0
 public void MovePhones(int softwareMigrationId, int answerPoolId, Guid[] phoneFaxControls)
 {
     try {
         AnswerPool answerPool = _answerRepository.FindByAnswerPoolId(answerPoolId);
         foreach (Guid controlId in phoneFaxControls)
         {
             string phone = answerPool[controlId]?.ToString();
             if (phone != null)
             {
                 string newPhone = PhoneNormalizer.Normalize(phone);
                 answerPool = answerPool.UpdateQuestionnaire(controlId, 0, newPhone, lineId: null);
             }
         }
         _unitOfWorkFactory.Execute(() => _answerRepository.ForceUpdateSnapshot(answerPool));
     } catch (Exception ex) {
         Console.WriteLine($"failed to process answerPoolId = {answerPoolId}, ex = {ex}");
     }
 }