private void PopulateCourseInformationView(int deptId) { courseInformationListView.Items.Clear(); CourseAssignToTeacherManager courseAssignToTeacherManager = new CourseAssignToTeacherManager(); List <CourseAssignToTeacher> courseAssignToTeachers = courseAssignToTeacherManager.GetAllCourseAssignToTeachers(deptId); foreach (CourseAssignToTeacher courseAssignToTeacher in courseAssignToTeachers) { ListViewItem item = new ListViewItem(); item.Text = courseAssignToTeacher.CourseCode; item.SubItems.Add(courseAssignToTeacher.CourseName); item.SubItems.Add(courseAssignToTeacher.Semester); item.SubItems.Add(courseAssignToTeacher.TeacherName); courseInformationListView.Items.Add(item); } }