public AddStudentWindow() { InitializeComponent(); student = new BE.Student(); this.DataContext = student; bl = BL.FactoryBL.GetBL(); this.studentCampusComboBox.ItemsSource = Enum.GetValues(typeof(BE.Campus)); this.studentGenderComboBox.ItemsSource = Enum.GetValues(typeof(BE.Gender)); }
private void addButton_Click(object sender, RoutedEventArgs e) { try { bl.AddStudent(student); student = new BE.Student(); this.DataContext = student; } catch (Exception ex) { MessageBox.Show(ex.Message); } }