Esempio n. 1
0
        public async Task <IActionResult> GetStatusTaskAsync([FromServices] ICourseBusiness courseBusiness)
        {
            var coordId = Guid.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value);

            if (!(await courseBusiness.FindByCoordIdTaskAsync(coordId) is CourseVO course))
            {
                return(NotFound("Você não possui um curso cadastrado!"));
            }

            int lessonCount = await _lessonBusiness.FindCountByCourseIdTaskAsync(course.CourseId);

            int disciplinesCount = await _disciplineBusiness.FindCountByCourseIdTaskAsync(course.CourseId);

            int classesCount = await _classBusiness.FindCountByCourseIdTaskAsync(course.CourseId);

            int studentCount = await _studentBusiness.FindCountByCourseIdTaskAsync(course.CourseId);

            List <LessonDisciplineVO> fiveLastLessons = await _lessonBusiness.FindFiveLastLessonsByCourseIdTaskAsync(course.CourseId);

            return(Ok(new StatusVO
            {
                ClassesCouunt = classesCount,
                DisciplinesCount = disciplinesCount,
                LessonsCount = lessonCount,
                StudentsCount = studentCount,
                FiveLastLessons = fiveLastLessons
            }));
        }
 public StudentRegisterController(IStudentRegisterBusiness studentRegisterBusiness,
                                  IStudentBusiness StudentBusiness, ICourseBusiness courseBusiness)
 {
     this.studentRegisterBusiness = studentRegisterBusiness;
     this.StudentBusiness         = StudentBusiness;
     this.courseBusiness          = courseBusiness;
 }
 public CoursesController(ICourseBusiness courseBusiness, IDepartmentBusiness departmentBusiness, ISemesterBusiness semesterBusiness, IStudentResultBusiness studentResultBusiness)
 {
     _courseBusiness        = courseBusiness;
     _departmentBusiness    = departmentBusiness;
     _semesterBusiness      = semesterBusiness;
     _studentResultBusiness = studentResultBusiness;
 }
Esempio n. 4
0
 public DiscenteController(IPersonBusiness person,
                           IStudentBusiness student, ICourseBusiness course, IUserBusiness user, ICityBusiness city,
                           IStateBusiness state)
 {
     _servicoPerson  = person;
     _servicoStudent = student;
     _servicoUser    = user;
     _servicoCity    = city;
     _servicoState   = state;
 }
 public DiscenteController(IPersonBusiness person,
     IStudentBusiness student, ICourseBusiness course, IUserBusiness user, ICityBusiness city,
     IStateBusiness state)
 {
     _servicoPerson = person;
     _servicoStudent = student;
     _servicoUser = user;
     _servicoCity = city;
     _servicoState = state;
 }
Esempio n. 6
0
 public DocenteController(IPersonBusiness person,
                          ITeacherBusiness teacher, ICourseBusiness course, IUserBusiness user, ICityBusiness city,
                          IStateBusiness state, ICourseBusiness courses)
 {
     _servicoPerson  = person;
     _servicoTeacher = teacher;
     _servicoUser    = user;
     _servicoCity    = city;
     _servicoState   = state;
     _servicoCourse  = courses;
 }
 public DocenteController(IPersonBusiness person,
     ITeacherBusiness teacher, ICourseBusiness course, IUserBusiness user, ICityBusiness city,
     IStateBusiness state, ICourseBusiness courses)
 {
     _servicoPerson = person;
     _servicoTeacher = teacher;
     _servicoUser = user;
     _servicoCity = city;
     _servicoState = state;
     _servicoCourse = courses;
 }
Esempio n. 8
0
 public CourseViewModel(ICourseBusiness courseBusiness, IDepartmentBusiness departmentBusiness)
 {
     _courseBusiness     = courseBusiness;
     _departmentBusiness = departmentBusiness;
 }
 public LessonBusiness(IRepository <Lesson> repository, ICourseBusiness course, IRepository <FavoriteLesson> favorite)
 {
     _repository = repository;
     _course     = course;
     _favorite   = favorite;
 }
Esempio n. 10
0
 public CoursesController(ICourseBusiness courseBusiness)
 {
     this.courseBusiness = courseBusiness;
 }
Esempio n. 11
0
 public CoursesController(ISchoolContext context, ICourseBusiness courseBusiness, IMapper mapper)
 {
     _context        = context;
     _courseBusiness = courseBusiness;
     _mapper         = mapper;
 }
Esempio n. 12
0
 public StudentsController(IStudentBusiness studentBusiness, ICourseBusiness courseBusiness)
 {
     _studentBusiness = studentBusiness;
     _courseBusiness  = courseBusiness;
 }
 public DisciplinesController(IDisciplineBusiness disciplineBusiness, ICourseBusiness courseBusiness, IStudentBusiness studentBusiness)
 {
     _disciplineBusiness = disciplineBusiness;
     _courseBusiness     = courseBusiness;
     _studentBusiness    = studentBusiness;
 }
Esempio n. 14
0
 public LessonsController(ILessonBusiness lessonBusiness, ICourseBusiness courseBusiness, IDisciplineBusiness disciplineBusiness)
 {
     _lessonBusiness     = lessonBusiness;
     _courseBusiness     = courseBusiness;
     _disciplineBusiness = disciplineBusiness;
 }
Esempio n. 15
0
 public CoursesController(ICourseBusiness course, ILessonBusiness lesson)
 {
     _course = course;
     _lesson = lesson;
 }
 public CourseController(ICourseBusiness courseBusiness)
 {
     _courseBusiness = courseBusiness;
 }
Esempio n. 17
0
 public ClassesController(IClassBusiness classBusiness, ICourseBusiness courseBusiness)
 {
     _classBusiness  = classBusiness;
     _courseBusiness = courseBusiness;
 }
Esempio n. 18
0
 public CoursesController(ICourseBusiness courseBusiness, ICoordinatorBusiness coordinatorBusiness)
 {
     _courseBusiness      = courseBusiness;
     _coordinatorBusiness = coordinatorBusiness;
 }