Fehler beim Webservice abfangen

Und Meldung ausgeben
This commit is contained in:
2024-08-28 10:53:50 +02:00
parent c5879373c6
commit 2aff974144
2 changed files with 19 additions and 2 deletions

View File

@@ -1,8 +1,17 @@
using Jugenddienst_Stunden.ViewModels;
namespace Jugenddienst_Stunden.Views;
public partial class StundenPage : ContentPage {
public StundenPage() {
InitializeComponent();
if(BindingContext is StundenViewModel vm) {
vm.AlertEvent += Vm_AlertEvent;
}
}
private void Vm_AlertEvent(object? sender, string e) {
DisplayAlert("Fehler:", e, "OK");
}
protected override void OnAppearing() {