コード例 #1
0
 private void Click_NewDependence(object sender, RoutedEventArgs e)
 {
     if (ComboBoxClasses.SelectedIndex >= 0 & ComboBoxSubjects.SelectedIndex >= 0 &
         ComboBoxTeachers.SelectedIndex >= 0)
     {
         DepClaSubTea newDepClaSubTea = new DepClaSubTea(
             classes[ComboBoxClasses.SelectedIndex].ClaId,
             subjectsResults[ComboBoxSubjects.SelectedIndex].SubId,
             teachersResults[ComboBoxTeachers.SelectedIndex].TeaId);
         if (db.createDependenceClassSubjectTeacher(newDepClaSubTea))
         {
             ComboBoxClasses.ItemsSource  = null;
             ComboBoxTeachers.ItemsSource = null;
             ComboBoxSubjects.ItemsSource = null;
             ComboBoxClasses.ItemsSource  = classes;
             reloadData();
         }
         else
         {
             MessageBox.Show("Dependence exists in database.");
         }
     }
     else
     {
         MessageBox.Show("You have to choose class and subject and teacher.");
     }
 }
コード例 #2
0
 public PageNewGradeTheme(DepClaSubTea depClaSubTea)
 {
     InitializeComponent();
     DepClaSubTea = depClaSubTea;
     LabelDepClaSubTea.Content = $"{DepClaSubTea.ClaName} - {DepClaSubTea.SubName} - {DepClaSubTea.TeaName}";
     reloadData();
 }
コード例 #3
0
 public PageManageGrades(DepClaSubTea depClaSubTea)
 {
     DepClaSubTea = depClaSubTea;
     InitializeComponent();
     reloadData();
 }