private void ButAddStudent_Click(object sender, RoutedEventArgs e) { Models.Student newStudent = new Models.Student(string.Empty, string.Empty); StudentAdd dlgStudentAdd = new StudentAdd(newStudent); if (dlgStudentAdd.ShowDialog() == true) { VacinationQueue.Add(newStudent); butStabStudent.IsEnabled = true; } }
public StudentAdd(Models.Student student) : this() { Student = student; DataContext = Student; }