Esempio n. 1
0
 private async void btn_delete_Click(object sender, RoutedEventArgs e)
 {
     if (await this.ShowMessageAsync("Are you sure", "You're deleting an instructor, are you sure you want to do that?", MessageDialogStyle.AffirmativeAndNegative) == MessageDialogResult.Affirmative)
     {
         Instructors.RemoveInstructor(EditedInstructor);
         Globals.RefreshReferenceInformation();
         this.Close();
     }
 }
        private async void button1_Copy9_Click(object sender, RoutedEventArgs e)
        {
            if (instructors_listView.SelectedIndex == -1)
            {
                return;
            }

            if (await this.ShowMessageAsync("Deleting", "You are going to delete " + instructors_listView.SelectedItems.Count + " Instructors are you sure?", MessageDialogStyle.AffirmativeAndNegative) == MessageDialogResult.Affirmative)
            {
                foreach (ListViewItem item in instructors_listView.SelectedItems)
                {
                    Instructors.RemoveInstructor((Instructor)item.Content);
                }
                Globals.RefreshReferenceInformation();
            }
        }