Exemple #1
0
 private void AddMenuItem_Click(object sender, RoutedEventArgs e)
 {
     _studentAdd = new StudentAdd
     {
         UpdateBtn = { IsEnabled = false },
         SaveBtn   = { IsEnabled = true }
     };
     _studentAdd.ShowDialog();
     StudentlistBox.ItemsSource = StudentList;
     CountLabel.Content         = StudentList.Count;
 }
Exemple #2
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (StudentlistBox.SelectedItem != null)
     {
         _studentAdd = new StudentAdd
         {
             SaveBtn   = { IsEnabled = false },
             UpdateBtn = { IsEnabled = true }
         };
         _studentAdd.ShowDialog();
     }
     else
     {
         MessageBox.Show("You not selected item!");
     }
 }