コード例 #1
0
        public IActionResult Add()
        {
            var model = new StudentAdd();

            model.Courses = _courseData.FindAll().ToList();
            return(View(model));
        }
コード例 #2
0
        public IActionResult Add(string courseID, string activityTypeID, string professorID, string studentID)
        {
            ActivityAdd model = new ActivityAdd();

            model.ActivityTypeID = activityTypeID;
            model.CourseID       = courseID;
            model.StudentID      = studentID;
            model.ProfessorID    = professorID;
            model.Professors     = _professorData.FindAll();
            if (studentID == null || studentID == "null")
            {
                model.Courses = _courseData.FindAll();
            }
            else
            {
                model.Courses = CoursesForCB(studentID);
            }
            if (courseID != "undefined")
            {
                model.ActivityTypes = _courseData.Find(courseID).ActivityTypes;
            }
            else
            {
                model.ActivityTypes = _activityTypeData.FindAll();
            }
            if (courseID == null || courseID == "null")
            {
                model.Students = _studentData.FindAll();
            }
            else
            {
                model.Students = StudentsForCB(courseID);
            }
            return(View(model));
        }
コード例 #3
0
        public IActionResult Courses()
        {
            var model = _courseData.FindAll();

            return(View(model));
        }