public static void LoadCourses(ref ComboBox dropDown, string deptId, string levelId, bool includeAll = false)
        {
            var repo     = new CourseRepo();
            var allItems = repo.GetAllCoursesSlim(deptId, levelId);

            if (includeAll)
            {
                allItems.Insert(0, new Course
                {
                    CourseTitle = "All Courses",
                    Id          = Base.IdForSelectAll
                });
            }
            else
            {
                allItems.Insert(0, new Course
                {
                    CourseTitle = "Select Course",
                    Id          = Base.IdForSelect
                });
            }

            dropDown.DataSource    = allItems;
            dropDown.DisplayMember = "Fullname";
            dropDown.ValueMember   = "Id";
            dropDown.SelectedIndex = 0;
        }
        private void LoadCourses()
        {
            if (comboLevel.Items.Count > 0)
            {
                _levelId = comboLevel.SelectedValue.ToString() == Base.IdForSelect ? "" : comboLevel.SelectedValue.ToString();
                if (comboDept.Items.Count > 0)
                {
                    _deptId = comboDept.SelectedValue.ToString() == Base.IdForSelect ? "" : comboDept.SelectedValue.ToString();

                    if (_deptId == "" || _levelId == "")
                    {
                        return;
                    }

                    var courseRepo = new CourseRepo();
                    var courses    = courseRepo.GetAllCoursesSlim(_deptId, _levelId);
                    checkCourses.DataSource    = courses;
                    checkCourses.DisplayMember = "CourseTitle";
                    checkCourses.ValueMember   = "Id";
                }
            }
        }