private async void OnDialogLoaded(object sender, RoutedEventArgs e) { ImsDataService imsSvc = new ImsDataService(App.ApiSettings); var inventory = await imsSvc.GetMedicineInventoryListAsync(); SuggestedMedicines = new ObservableCollection <MedicineInventory>(inventory); }
private async void GetMedicinesAsync() { List <MedicineInventory> medicines = await imsSvc.GetMedicineInventoryListAsync(); MedicineInventories = new ObservableCollection <MedicineInventory>(medicines.OrderBy(inv => inv.GenericName)); }