public async void AddNewPlace(object sender, EventArgs a) { var placeform = new PlacesForm(); placeform.DataSender += AddList; await Navigation.PushAsync(placeform); }
protected async override void OnAppearing() { base.OnAppearing(); if (PlacesModel.PlacesList.Count == 0) { var response = await DisplayAlert("No places available", "Go to Places and add a place", "Ok", "Go back"); if (response) { var placeform = new PlacesForm(); placeform.DataSender += AddList; await Navigation.PushAsync(placeform); } else { await Navigation.PopAsync(); } } else { AreaEnabler(); Enabler(); if (appointmentRequest.Date != null && appointmentRequest.Time != null && appointmentRequest.Place != null) { SelectedDate.Text = appointmentRequest.Date; SelectedTime.Text = appointmentRequest.Time; SelectedLocation.Text = appointmentRequest.Place.PlaceDetail; } } }
public async void OnItemSelect(object sender, SelectedItemChangedEventArgs args) { (sender as ListView).SelectedItem = null; if (args.SelectedItem != null) { placesViewModel = args.SelectedItem as PlacesViewModel; placeform = new PlacesForm(placesViewModel.Places); placeform.DataSender += UpdateList; await Navigation.PushAsync(placeform); } }