public MainWindow(StudentRepository.Student student) { InitializeComponent(); this.DataContext = viewModel; viewModel = new MainWindowVM(student); fillStudentData(); }
private void ButtonSearch_Click(object sender, RoutedEventArgs e) { String n = null; //n = Convert.ToString(txtFac.Text); n = txtFac.Text.ToString(); //var searchStudent = SearchStudent(n); StudentRepository.Student find = StudentRepository.StudentData.testStudents[0];//SearchStudent(n);//StudentRepository.StudentData.isThereStudent(n); txtName.Text = find.name; txtSecondName.Text = find.secondName; txtLastName.Text = find.lastName; txtFac.Text = find.faculty; txtSpec.Text = find.spec; txtOKS.Text = find.eqDegree; txtStatus.Text = find.status; txtFacNum.Text = find.facNum; txtCourse.Text = find.course.ToString(); txtStream.Text = find.stream.ToString(); txtGroup.Text = find.group.ToString(); //String n = (String)txtFac.Text; //txtName.Text = StudentRepository.StudentData.isThereStudent(n).name; //txtSecondName.Text = StudentRepository.StudentData.isThereStudent(n).secondName; //txtLastName.Text = StudentRepository.StudentData.isThereStudent(n).lastName; //txtFac.Text = StudentRepository.StudentData.isThereStudent(n).faculty; //txtSpec.Text = StudentRepository.StudentData.isThereStudent(n).spec; //txtOKS.Text = StudentRepository.StudentData.isThereStudent(n).eqDegree; //txtStatus.Text = StudentRepository.StudentData.isThereStudent(n).status; //txtCourse.Text = StudentRepository.StudentData.isThereStudent(n).course.ToString(); //txtStream.Text = StudentRepository.StudentData.isThereStudent(n).stream.ToString(); //txtGroup.Text = StudentRepository.StudentData.isThereStudent(n).group.ToString(); }
public MainWindowVM(StudentRepository.Student student) { this.student = student; }