//**************************************************** // Method: void Populate(BCS426Homework4DLL.CourseWork courseWork) // // Purpose: populates the listviews // //**************************************************** private void Populate(BCS426Homework4DLL.CourseWork courseWork) { //puts the course name into the textbox textBoxCourseName.Text = courseWork.CourseName; //puts the grade into the textbox textBoxOverallGrade.Text = courseWork.CalculateGrade().ToString(); //converts to string //loops through all the categories and adds to the category listview foreach (BCS426Homework4DLL.Category cat in courseWork.Categories) { listViewCategories.Items.Add(cat); } //loops through all the assignments and adds to the assignment listview foreach (BCS426Homework4DLL.Assignment assign in courseWork.Assignments) { listViewAssignments.Items.Add(assign); } //loops through all the submissions and adds to the submission listview foreach (BCS426Homework4DLL.Submission sub in courseWork.Submissions) { listViewSubmissions.Items.Add(sub); } }