public async void cdg_DeleteSubject() { ContentDialog deletesubject = new ContentDialog() { Title = "Fach löschen?", Content = "Wenn du dieses Fach löschst, werden alle damit verbundenen Daten wie Noten, Stundenplaneinträge, etc. verloren gehen!", PrimaryButtonText = "Abbrechen", SecondaryButtonText = "Bestätigen" }; ContentDialogResult result = await deletesubject.ShowAsync(); if (result == ContentDialogResult.Secondary) { Subject selected_subject = subject_to_show; SubjectManager.DeleteSubject(SubjectManager.selected_subject_id); Frame.Navigate(typeof(Subjects)); } }
public void DeleteSubject() { SubjectManager.DeleteSubject(this.id); }