コード例 #1
0
        public IActionResult Attendances(int id)
        {
            var attendances = this.studentsServices.GetAllStudentAttendaces <StudentAttendances>(id);

            var viewModel = new StudentAllRolesViewModel
            {
                Attendances = attendances,
            };

            return(this.View(viewModel));
        }
コード例 #2
0
        private StudentAllRolesViewModel StudentViewModel(int id)
        {
            var exams       = this.examsServices.GetAllStuentExans <StudentAllExams>(id);
            var attendances = this.studentsServices.GetAllStudentAttendaces <StudentAttendances>(id);
            var viewModel   = new StudentAllRolesViewModel
            {
                Attendances  = attendances,
                StudentExams = exams,
            };

            return(viewModel);
        }
コード例 #3
0
        public IActionResult Exams(int id)
        {
            var exams       = this.examsServices.GetAllStuentExans <StudentAllExams>(id);
            var attendances = this.studentsServices.GetAllStudentAttendaces <StudentAttendances>(id);

            var hasExams = exams.Count();

            if (hasExams == 0)
            {
                return(this.View("NotFound"));
            }

            var viewModel = new StudentAllRolesViewModel
            {
                Attendances  = attendances,
                StudentExams = exams,
            };

            return(this.View(viewModel));
        }
コード例 #4
0
        public IActionResult StudentDetails(int id)
        {
            StudentAllRolesViewModel viewModel = this.StudentViewModel(id);

            return(this.View(viewModel));
        }