private void AddClick(object sender, RoutedEventArgs e)
        {
            GradeWindow gradeWindow = new GradeWindow(Subject, Student)
            {
                Owner = ((MainWindow)Application.Current.MainWindow)
            };

            if (true == gradeWindow.ShowDialog())
            {
                this.fetchData();
            }
        }
示例#2
0
 private void AddClick(object sender, RoutedEventArgs e)
 {
     if (StudentsListBox.SelectedItem != null)
     {
         GradeWindow gradeWindow = new GradeWindow(Subject, (Models.Student)StudentsListBox.SelectedItem)
         {
             Owner = ((MainWindow)Application.Current.MainWindow)
         };
         if (true == gradeWindow.ShowDialog())
         {
             //_context.SaveChanges();
         }
     }
 }
 private void EditClick(object sender, RoutedEventArgs e)
 {
     if (GradesListBox.SelectedItem != null)
     {
         GradeWindow gradeWindow = new GradeWindow((Models.Grade)GradesListBox.SelectedItem)
         {
             Owner = ((MainWindow)Application.Current.MainWindow)
         };
         if (true == gradeWindow.ShowDialog())
         {
             this.fetchData();
         }
     }
 }