Пример #1
0
 //删除
 private void DeleteMemberBtn_Click(object sender, RoutedEventArgs e)
 {
     if (MemberDataGrid.SelectedItem is Teacher teacher)
     {
         if (System.Windows.MessageBox.Show("是否删除该用户?", "提示", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
         {
             bool flag = dbUtill.DeleteMemberByID(teacher.memberId);
             if (flag == true)
             {
                 System.Windows.MessageBox.Show("删除成功", "提示");
             }
             else
             {
                 System.Windows.MessageBox.Show("删除失败", "提示");
             }
         }
         Init();
     }
     else
     {
         System.Windows.MessageBox.Show("请先选择被检测人", "提示");
     }
 }