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."); } }
public PageNewGradeTheme(DepClaSubTea depClaSubTea) { InitializeComponent(); DepClaSubTea = depClaSubTea; LabelDepClaSubTea.Content = $"{DepClaSubTea.ClaName} - {DepClaSubTea.SubName} - {DepClaSubTea.TeaName}"; reloadData(); }
public PageManageGrades(DepClaSubTea depClaSubTea) { DepClaSubTea = depClaSubTea; InitializeComponent(); reloadData(); }