Exemplo n.º 1
0
        public IActionResult OnGet()
        {
            Courses = courses.AllCourses();
            if (!string.IsNullOrEmpty(FilterCriteria))
            {
                Courses = courses.FilterCourse(FilterCriteria);
            }

            return(Page());
        }
Exemplo n.º 2
0
        private void LoadFormStuff()
        {
            //Bind all the DGV's to the classes


            //combo box not being passed across
            myStudent.DGVStudent = DGVStudents;
            myMarks.DGVMarks     = DGVMarks;
            myCourses.DGVCourse  = DGVCourse;

            //fill the Combobox
            cbxCourses.DataSource    = myCourses.FillTheCourseComboBox();
            cbxCourses.DisplayMember = "CourseName";
            //set the value member - what data is returned - to the ID
            cbxCourses.ValueMember = "CourseID";
            //cbxCourses.SelectedIndex = 1;

            DGVStudents.DataSource = myStudent.AllStudentsDirect();
            // myStudent.AllStudents();
            DGVCourse.DataSource = myCourses.AllCourses();
            myMarks.AllMarks();
        }