public AssignTeacherSelection()
        {
            InitializeComponent();
            controller = BusinessController.getBusinessController();
            ICollection <TaughtCourse> courses  = controller.findAllTaughtCourses();
            ICollection <Teacher>      teachers = controller.findAllTeachers();
            TaughtCourse selectedTaughtCourse   = null;

            courseSelection.DataSource  = courses;
            teacherSelection.DataSource = teachers;
            toggleTaughtCourseVisibility(false);
            selectedTeacher = null;
        }
        private void pintaCursos()
        {
            ICollection <TaughtCourse> tcs         = businessControl.findAllTaughtCourses();
            BindingList <object>       bindingList = new BindingList <object>();

            foreach (TaughtCourse tc in tcs)
            {
                bindingList.Add(new
                {
                    id_prop       = tc.Id,
                    nombre_prop   = tc.Course.Name,
                    dia_prop      = tc.TeachingDay,
                    inicio_prop   = tc.StartDateTime.ToShortTimeString(),
                    duracion_prop = tc.SessionDuration
                });
            }
            profesorBindingSource.DataSource = bindingList;
        }
        public AssignStudentToCourse()
        {
            InitializeComponent();
            controller = BusinessController.getBusinessController();
            ICollection <TaughtCourse> courses     = controller.findAllTaughtCourses();
            List <TaughtCourse>        toBeDeleted = new List <TaughtCourse>();

            foreach (TaughtCourse t in courses)
            {
                if (t.StartDateTime <= DateTime.Now)
                {
                    toBeDeleted.Add(t);
                }
            }
            foreach (TaughtCourse t in toBeDeleted)
            {
                courses.Remove(t);
            }
            taughtCoursesList.DataSource = courses;
        }