public StudentInformationVM(Student student, StudentInformation studentInformation) { Student = student; fillSubjectsName(studentInformation); fillTeachersName(studentInformation); fillEvaluationsName(studentInformation); fillStudentMarks(studentInformation); }
private void marksBtn_Click(object sender, RoutedEventArgs e) { Student student = ((MainWindowVM)DataContext).Student; StudentInformation studentInformation = new StudentInformation(); StudentInformationVM siVM = new StudentInformationVM(student, studentInformation); studentInformation.DataContext = siVM; studentInformation.ShowDialog(); }
private void fillStudentMarks(StudentInformation studentInformation) { List <string> studentMarks = getStudentsMarks(); for (int i = 1; i <= studentMarks.Count(); i++) { var mark = (Label)studentInformation.FindName("mark" + i); mark.Content = studentMarks.ElementAt(i - 1); } }
private void fillEvaluationsName(StudentInformation studentInformation) { List <string> evaluationsMethod = getEvaluationMethods(); for (int i = 1; i <= evaluationsMethod.Count(); i++) { var evaluation = (Label)studentInformation.FindName("evaluation" + i); evaluation.Content = evaluationsMethod.ElementAt(i - 1); } }
private void fillTeachersName(StudentInformation studentInformation) { List <string> teachersName = getTeachersNames(); for (int i = 1; i <= teachersName.Count(); i++) { var teacher = (Label)studentInformation.FindName("teacher" + i); teacher.Content = teachersName.ElementAt(i - 1); } }
private void fillSubjectsName(StudentInformation studentInformation) { List <string> subjectsName = getSubjectsNames(); for (int i = 1; i <= subjectsName.Count(); i++) { var subject = (Label)studentInformation.FindName("subject" + i); subject.Content = subjectsName.ElementAt(i - 1); } }