Beispiel #1
0
        public async Task SetUserContactsFromServerAsync(RegisterViewModel model)
        {
            var contacts = await _DynamixReturnService.GetConnectedContactsAsync(model);

            if (contacts != null)
            {
                //var contactStore = new ContactStorageRepository(_MasterRepo, OfflineStorageRepository.Instance);
                var task = await SelectContactsWithRole(model, contacts, "Beneficiary");

                if (task.Count > 0)
                {
                    _MasterRepo.DataSource.DefaultBeneficiary = task[0];
                }
                _MasterRepo.DataSource.TrustedSources = await SelectContactsWithRole(model, contacts, "Trusted Friend");

                await _MasterRepo.SaveBeneficiaryAsync(_MasterRepo.DataSource.DefaultBeneficiary);

                await _MasterRepo.SaveTrustedSourceListAsync(_MasterRepo.DataSource.TrustedSources);
            }
        }