예제 #1
0
 private void MassDelToolStripMenuItem2_Click(object sender, EventArgs e)
 {
     foreach (TreeNode treeNode in CheckedNodes(StudentCardsTreeView.Nodes))
     {
         var currentStudent = SearchStudentInStudentList(treeNode);
         _manager.DeleteData(currentStudent);
     }
     DeleteTextBoxInfo();
     RefreshInfo();
     MessageBox.Show($"Данные удалены");
 }
예제 #2
0
 private void DeleteButton_Click(object sender, EventArgs e)
 {
     if (StudentCardsTreeView.SelectedNode != null && StudentCardsTreeView.SelectedNode.Name != "")
     {
         var currentStudent = SearchStudentInStudentList();
         _manager.DeleteData(currentStudent);
         MessageBox.Show($"Данные {currentStudent.Surname} удалены");
         DeleteTextBoxInfo();
         RefreshInfo();
     }
 }