private async void BtnDelete_Clicked(object sender, EventArgs e) { await firebaseHelper.DeletePerson(Convert.ToInt32(txtPersonId.Text)); await DisplayAlert("Success", "Data Deleted Successfully", "OK"); var allPersons = await firebaseHelper.GetAllPersons(); lstPersons.ItemsSource = allPersons; }
private async void ButtonDelete_Clicked(object sender, EventArgs e) { ToggleIndicator(); if (SelectedPerson == null) { await DisplayAlert("Error", "A person must be selected to proceed", "OK"); return; } await _service.DeletePerson(SelectedPerson.PersonId); await DisplayAlert("Success", "Person Deleted Successfully", "OK"); await ReloadPeopleList(); ToggleIndicator(); }