Beispiel #1
0
        public RegistrationPresenter(
            IRegisterView view,
            IRegistrationService registrationService,
            ISubjectManagementService subjectManagementService,
            IClassOfStudentsManagementService classOfStudentsManagementService,
            IAccountManagementService accountManagementSerivce,
            IEmailSenderService emailSender,
            IPasswordGeneratorService passwordService)
            : base(view)
        {
            Guard.WhenArgument(registrationService, "registrationService").IsNull().Throw();
            Guard.WhenArgument(subjectManagementService, "subjectManagementService").IsNull().Throw();
            Guard.WhenArgument(classOfStudentsManagementService, "classOfStudentsManagementService").IsNull().Throw();
            Guard.WhenArgument(accountManagementSerivce, "accountManagementService").IsNull().Throw();
            Guard.WhenArgument(emailSender, "emailSender").IsNull().Throw();
            Guard.WhenArgument(passwordService, "passwordService").IsNull().Throw();

            this.registrationService              = registrationService;
            this.accountManagementSerivce         = accountManagementSerivce;
            this.subjectManagementService         = subjectManagementService;
            this.classOfStudentsManagementService = classOfStudentsManagementService;
            this.emailSender     = emailSender;
            this.passwordService = passwordService;

            this.View.EventRegisterUser         += this.RegisterUser;
            this.View.EventGetClassesOfStudents += this.View_EventGetClassesOfStudents;
            this.View.EventGetUserRoles         += this.View_EventGetUserRoles;
            this.View.EventGetAvailableSubjects += this.View_EventGetAvailableSubjects;
        }
        public ManagingMarksPresenter(
            IManagingMarksView managingMarksView,
            ISubjectManagementService subjectManagementService,
            IClassOfStudentsManagementService classOfStudentsManagementService,
            IStudentManagementService studentManagementService,
            IMarksManagementService marksManagementService)
            : base(managingMarksView)
        {
            Guard.WhenArgument(subjectManagementService, "subjectManagementService").IsNull().Throw();
            Guard.WhenArgument(classOfStudentsManagementService, "classOfStudentsManagementService").IsNull().Throw();
            Guard.WhenArgument(studentManagementService, "studentManagementService").IsNull().Throw();
            Guard.WhenArgument(marksManagementService, "marksManagementService").IsNull().Throw();

            this.subjectManagementService         = subjectManagementService;
            this.classOfStudentsManagementService = classOfStudentsManagementService;
            this.marksManagementService           = marksManagementService;
            this.studentManagementService         = studentManagementService;

            this.View.EventBindSubjectsForTheSelectedTeacher += this.View_EventBindSubjects;
            this.View.EventBindClasses          += this.View_EventBindClasses;
            this.View.EventBindSchoolReportCard += this.View_EventBindSchoolReportCard;
            this.View.EventInsertMark           += this.View_EventInsertMark;
            this.View.EventBindStudents         += this.View_EventBindStudents;
            this.View.EventBindMarks            += this.View_EventBindMarks;
        }
Beispiel #3
0
        public CreatingClassOfStudentsPresenter(
            ICreatingClassOfStudentsView view,
            IClassOfStudentsManagementService classOfStudentsManagementService,
            ISubjectManagementService subjectManagementService)
            : base(view)
        {
            Guard.WhenArgument(classOfStudentsManagementService, "classOfStudentsManagementService").IsNull().Throw();
            Guard.WhenArgument(subjectManagementService, "subjectManagementService").IsNull().Throw();

            this.classOfStudentsManagementService = classOfStudentsManagementService;
            this.subjectManagementService         = subjectManagementService;

            this.View.EventCreateClassOfStudents += this.CreateClassOfStudents;
            this.View.EventGetAllSubjects        += this.GetAllSubjects;
        }
Beispiel #4
0
        public AssignSubjectsToClassOfStudentsPresenter(
            IAssignSubjectsToClassOfStudentsView view,
            IClassOfStudentsManagementService classOfStudentManagementService,
            ISubjectManagementService subjectManagementService)
            : base(view)
        {
            Guard.WhenArgument(classOfStudentManagementService, "classOfStudentManagementService").IsNull().Throw();
            Guard.WhenArgument(subjectManagementService, "subjectManagementService").IsNull().Throw();

            this.classOfStudentManagementService = classOfStudentManagementService;
            this.subjectManagementService        = subjectManagementService;

            this.View.EventGetAllClassOfStudents           += this.View_EventGetAllClassOfStudents;
            this.View.EventGetAvailableSubjectsForTheClass += this.View_EventGetAvailableSubjectsForTheClass;
            this.View.EventAssignSubjectsToClassOfStudents += this.View_EventAssignSubjectsToClassOfStudents;
        }
        public ManagingSchedulePresenter(
            IManagingScheduleView view,
            IScheduleDataService scheduleService,
            IClassOfStudentsManagementService classOfStudentsManagementService,
            ISubjectManagementService subjectManagementService)
            : base(view)
        {
            Guard.WhenArgument(scheduleService, "scheduleService").IsNull().Throw();
            Guard.WhenArgument(classOfStudentsManagementService, "classOfStudentsManagementService").IsNull().Throw();
            Guard.WhenArgument(subjectManagementService, "subjectManagementService").IsNull().Throw();

            this.scheduleService = scheduleService;
            this.classOfStudentsManagementService = classOfStudentsManagementService;
            this.subjectManagementService         = subjectManagementService;

            this.View.EventBindScheduleData          += this.BindScheduleData;
            this.View.EventBindAllClasses            += this.GetAllClasses;
            this.View.EventBindDaysOfWeek            += this.BindDaysOfWeek;
            this.View.EventBitSubjectForCurrentClass += this.BindSubjectsForSpecificClass;
            this.View.EventAddSubjectToSchedule      += this.AddSubjectToSchedule;
            this.View.EventRemoveSubjectFromSchedule += this.RemoveSubjectFromSchedule;
        }