public IActionResult Attendances(int id) { var attendances = this.studentsServices.GetAllStudentAttendaces <StudentAttendances>(id); var viewModel = new StudentAllRolesViewModel { Attendances = attendances, }; return(this.View(viewModel)); }
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); }
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)); }
public IActionResult StudentDetails(int id) { StudentAllRolesViewModel viewModel = this.StudentViewModel(id); return(this.View(viewModel)); }