示例#1
0
        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));
            }
        }
示例#2
0
 public void DeleteSubject()
 {
     SubjectManager.DeleteSubject(this.id);
 }