Example #1
0
        public async Task LoadAsync()
        {
            IEnumerable <LookupItem> lookup = await _recipientLookupService.GetRecipientLookupAsync();

            Recipients.Clear();
            foreach (LookupItem lookupItem in lookup)
            {
                var navigationItemViewModel = new NavigationItemViewModel(lookupItem.ID, lookupItem.DisplayMember, nameof(RecipientDetailViewModel), _eventAggregator);
                Recipients.Add(navigationItemViewModel);
            }
        }
Example #2
0
        private async Task LoadRecipientsLookupAsync()
        {
            int?selectedRecipientId = Payment.RecipientID;

            Recipients.Clear();
            Recipients.Add(new NullLookupItem {
                DisplayMember = " - "
            });
            var lookup = await _recipientLookupDataService.GetRecipientLookupAsync();

            foreach (var item in lookup)
            {
                Recipients.Add(item);
            }

            Payment.RecipientID = selectedRecipientId;
        }