private async void ProgenyToolBarItem_OnClicked(object sender, EventArgs e) { ObservableCollection <Progeny> progenyCollection = new ObservableCollection <Progeny>(); List <Progeny> progList = await ProgenyService.GetProgenyList(await UserService.GetUserEmail()); foreach (Progeny progeny in progList) { progenyCollection.Add(progeny); } SelectProgenyPage selProPage = new SelectProgenyPage(progenyCollection); await Shell.Current.Navigation.PushModalAsync(selProPage); }
private async void ProgenyToolBarItem_OnClicked(object sender, EventArgs e) { string userEmail = await UserService.GetUserEmail(); List <Progeny> progenyList = await ProgenyService.GetProgenyList(userEmail); ObservableCollection <Progeny> progenyCollection = new ObservableCollection <Progeny>(); if (progenyList != null && progenyList.Any()) { foreach (Progeny prog in progenyList) { progenyCollection.Add(prog); } } SelectProgenyPage selProPage = new SelectProgenyPage(progenyCollection); await Shell.Current.Navigation.PushModalAsync(selProPage); }