Beispiel #1
0
        public HomeController(ICalendarBookingRepositoryMarker calendarRepositoryMarker,
                              IClassroomRepositoryMarker classroomRepositoryMarker,
                              IFreeDocumentRepositoryMarker freeDocumentRepositoryMarker,
                              IFreeDocumentStudentRepositoryMarker freeDocumentStudentRepositoryMarker,
                              IFreeVideoRepositoryMarker freeVideoRepositoryMarker,
                              IFreeVideoStudentRepositoryMarker freeVideoStudentRepositoryMarker,
                              IPaidDocuemtStudentRepositoryMarker paidDocuemtStudentRepositoryMarker,
                              IPaidDocumentRepositoryMarker paidDocumentRepositoryMarker,
                              IPaidVideoRepositoryMarker paidVideoRepositoryMarker,
                              IPaidVideoStudentRepositoryMarker paidVideoStudentRepositoryMarker,
                              IStudentRepositoryMarker studentRepositoryMarker,
                              IStudentTypeRepositoryMarker studentTypeRepositoryMarker,
                              ISubjectRepositoryMarker subjectRepositoryMarker,
                              ITeacherRepositoryMarker teacherRepositoryMarker,
                              IBookingTimeRepositoryMarker bookingTimeRepositoryMarker)
        {
            var unitOfWork = new TeachersAssistantUnitOfWork(calendarRepositoryMarker,
                                                             classroomRepositoryMarker,
                                                             freeDocumentRepositoryMarker,
                                                             freeDocumentStudentRepositoryMarker,
                                                             freeVideoRepositoryMarker,
                                                             freeVideoStudentRepositoryMarker,
                                                             paidDocuemtStudentRepositoryMarker,
                                                             paidDocumentRepositoryMarker,
                                                             paidVideoRepositoryMarker,
                                                             paidVideoStudentRepositoryMarker,
                                                             studentRepositoryMarker,
                                                             studentTypeRepositoryMarker,
                                                             subjectRepositoryMarker,
                                                             teacherRepositoryMarker,
                                                             bookingTimeRepositoryMarker);

            _teacherRepository = new TeachersAssistantRepositoryServices(unitOfWork);
            _teacherRepository.GetSubjectList();
        }
        private List <SelectListItem> GetSubjectList()
        {
            var subjects    = _teacherRepository.GetSubjectList();
            var subjectList = new List <SelectListItem>();

            foreach (var subject in subjects)
            {
                subjectList.Add(new SelectListItem {
                    Text = subject.SubjectName, Value = subject.SubjectId.ToString()
                });
            }

            return(subjectList);
        }
        private List <SelectListItem> GetSubjectList()
        {
            var subjects    = _repositoryServices.GetSubjectList();
            var subjectList = new List <SelectListItem>();

            subjectList.Add(new SelectListItem {
                Text = "Pick a Subject", Value = 0.ToString()
            });

            foreach (var subject in subjects)
            {
                subjectList.Add(new SelectListItem {
                    Text = subject.SubjectName, Value = subject.SubjectId.ToString()
                });
            }

            return(subjectList);
        }