private async void DeleteButton_Clicked(object sender, EventArgs e) { try { var b = sender as Button; bool answer = false; int ID = -1; string username = ""; Dictionary <int, string> d = (Dictionary <int, string>)b.CommandParameter; foreach (KeyValuePair <int, string> p in d) { answer = await DisplayAlert("Confirm", "Are you sure you want to remove " + p.Value + " from this clinic?", "Yes", "No"); ID = p.Key; username = p.Value; } if (answer) { _client.RemoveUserFromClinicNotificationsCompleted += ClientRemoveUserFromClinicNotificationsCompleted; _client.RemoveUserFromClinicNotificationsAsync(username, ID, GlobalData.loginData); } } catch (Exception ex) { _client.AddLogMessageMobileAsync("In Manage Employee signups Page DeleteButton_Clicked. Error: ", ex.Message.ToString(), 0, GlobalData.loginData); _client.AddLogMessageMobileAsync("In Manage Employee signups Page DeleteButton_Clicked. Inner Exception Error: ", ex.InnerException.ToString(), 0, GlobalData.loginData); } }