Exemple #1
0
        public async Task LoadAsync()
        {
            IEnumerable <LookupItem> lookup = await _paymentPurposeLookupDataService.GetPaymentPurposeLookupAsync();

            PaymentPurposes.Clear();
            foreach (LookupItem lookupItem in lookup)
            {
                var navigationItemViewModel = new NavigationItemViewModel(lookupItem.ID, lookupItem.DisplayMember, nameof(PaymentPurposeDetailViewModel), _eventAggregator);
                PaymentPurposes.Add(navigationItemViewModel);
            }
        }
Exemple #2
0
        private async Task LoadPaymentPurposesLookupAsync()
        {
            int?selectedPaymentPurposetId = Payment.PaymentPurposeID;

            PaymentPurposes.Clear();
            PaymentPurposes.Add(new NullLookupItem {
                DisplayMember = " - "
            });
            var lookup = await _paymentPurposeLookupDataService.GetPaymentPurposeLookupAsync();

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

            Payment.PaymentPurposeID = selectedPaymentPurposetId;
        }