Exemplo n.º 1
0
        private void BindEnrolledStudentsData(Paper p) {
            //Updating the UI So we  don't get any {Collection} showing in the ListBoxes.
            BindingSource enrolledStudentBind = new BindingSource();
            enrolledStudentBind.DataSource = p.StudentsInPaper;
            ListSelectedPaperStudents.DisplayMember = "Value";
            ListSelectedPaperStudents.DataSource = enrolledStudentBind;

            if (p.StudentsInPaper.Count > 0) {
                LabNoStudentsByPaper.Hide();
                ListSelectedPaperStudents.Show();
            } else {
                LabNoStudentsByPaper.Show();
                ListSelectedPaperStudents.Hide();
            }
        }
Exemplo n.º 2
0
        private void BindEnrolledStudentsData(Paper p)
        {
            BindingSource enrolledStudentBind = new BindingSource();

            enrolledStudentBind.DataSource          = p.StudentsInPaper;
            ListSelectedPaperStudents.DisplayMember = "Value";
            ListSelectedPaperStudents.DataSource    = enrolledStudentBind;

            if (p.StudentsInPaper.Count > 0)
            {
                LabNoStudentsByPaper.Hide();
                ListSelectedPaperStudents.Show();
            }
            else
            {
                LabNoStudentsByPaper.Show();
                ListSelectedPaperStudents.Hide();
            }
        }