public AddGradeWindow(Student student) { InitializeComponent(); _student = student; courseComboBox.ItemsSource = _student.CoursesList; courseComboBox.SelectedIndex = 0; }
public StudentView(Student student) { InitializeComponent(); _student = student; this.firstName.Text = _student.FirstName; this.lastName.Text = _student.LastName; this.tbxFacultyNumber.Text = _student.FacultyNumber.ToString(); this.rank.Text = _student.Rank.ToString(); lvGrades.ItemsSource = _student.GradeList; this.homeTown.Text = _student.HomeTown; this.TotalPoints.Text = _student.TotalPoints.ToString(); this.AverageGrade.Text = string.Format("{0:F2}", _student.AverageGrade); this.BestCourse.Text = _student.BestCourse.ToString(); _student.CoursesList.Add(new Course(CourseName.Algorithms)); lvCourses.ItemsSource = _student.CoursesList; }