public ShowEachTeacher() { InitializeComponent(); manager = new DBA.DbaTeacher(); managerNotation = new DBA.DbaNotation(); update(); selecteurTeacher = 0; }
public void updateTeacherComboBox() { managerTeacher = new DBA.DbaTeacher(); teacher = managerTeacher.teacherOverview(); for (int i = 0; i < teacher.Count; i++) { ComboBoxItem item = new ComboBoxItem(); item.Content = teacher[i].Id; idBooster.Items.Add(item); } idBooster.SelectedIndex = 0; }
private void createTeacherSubmit(object sender, RoutedEventArgs e) { countCourse = 0; countCampu = 0; countCampus.Text = countCampu.ToString(); countCourses.Text = countCourse.ToString(); manager = new DBA.DbaTeacher(); teacher = new Teacher(); teacher.name = name.Text; teacher.firstname = firstname.Text; teacher.email = teacher.firstname + "." + teacher.name + "@supinfo.com"; teacher.campus = (campusY.SelectedItem as ComboBoxItem).Content.ToString(); teacher.current_promotion = (promotion.SelectedItem as ComboBoxItem).Content.ToString(); teacher.campus_would_teach = campusList; teacher.courses_would_teach = courseList; teacher.comments = "None"; teacher.campus_already_teach = "None"; teacher.courses_already_teach = "None"; if (!teacher.name.Equals("")) { if (!teacher.firstname.Equals("")) { manager.createTeacher(teacher); name.Text = ""; firstname.Text = ""; } else { firstname.Text = "Set Something"; } } else { name.Text = "Set Something"; } }