Exemplo n.º 1
0
        private void FillStudentsList(Exam exam)
        {
            var allStudents = _getAllStudentsQueryHandler.Handle();

            var enrolledStudents = exam.EnrollStudents(allStudents, out var isEnoughStudents);

            if (!isEnoughStudents)
            {
                MessageBox.Show(this, "Not enough students for the exam", "Warning");
            }

            studentBindingSource.DataSource = enrolledStudents;
            dgvEnrolledStudents.Refresh();
        }