private void BindEnrolledPapersData(Student s) { //Updating the UI So we don't get any {Collection} showing in the ListBoxes. BindingSource enrolledPaperBind = new BindingSource(); enrolledPaperBind.DataSource = s.EnrolledPapers; ListSelectedStudentPapers.DisplayMember = "Value"; ListSelectedStudentPapers.DataSource = enrolledPaperBind; if (s.EnrolledPapers.Count > 0) { LabNoPapersByStudent.Hide(); ListSelectedStudentPapers.Show(); } else { LabNoPapersByStudent.Show(); ListSelectedStudentPapers.Hide(); } }
private void BindEnrolledPapersData(Student s) { BindingSource enrolledPaperBind = new BindingSource(); enrolledPaperBind.DataSource = s.EnrolledPapers; ListSelectedStudentPapers.DisplayMember = "Value"; ListSelectedStudentPapers.DataSource = enrolledPaperBind; if (s.EnrolledPapers.Count > 0) { LabNoPapersByStudent.Hide(); ListSelectedStudentPapers.Show(); } else { LabNoPapersByStudent.Show(); ListSelectedStudentPapers.Hide(); } }