Example #1
0
 private void AddUserPhoneNumbersToDisplayList(User user)
 {
     foreach (var number in user.UserContactInformations.FirstOrDefault().UserPhoneNumbers)
     {
         UserPhoneNumbers.Add(number.PhoneNumber);
     }
 }
Example #2
0
        private void OnNewPhoneNumberReceived(Dictionary <string, string> phoneNumberAndType)
        {
            var user = _userService.GetAllUsers().FirstOrDefault(x => x.Id == _userId);

            foreach (var keyValuePair in phoneNumberAndType)
            {
                UserPhoneNumbers.Add(keyValuePair.Value);
                user.UserContactInformations.FirstOrDefault().UserPhoneNumbers.Add(new UserPhoneNumber()
                {
                    Active      = true, Description = null,
                    PhoneNumber = keyValuePair.Value, UserContactInformationId = user.UserContactInformations.FirstOrDefault().Id
                });
            }
        }