public PensumController(IPensumRepository pensumRepository, IGradeRepository gradeRepository, ICourseRepository courseRepository, IAcademicGradeRepository academicGradeRepository)
 {
     _pensumRepository        = pensumRepository;
     _gradeRepository         = gradeRepository;
     _courseRepository        = courseRepository;
     _academicGradeRepository = academicGradeRepository;
     _viewMessageLogic        = new ViewMessageLogic(this);
 }
 public GradeController(IGradeRepository gradeRepository, IAcademicGradeRepository academicGradeRepository, IPensumRepository pensumRepository, IEducationLevelRepository educationLevelRepository, ISessionManagementService sessionManagementService, IUserRepository userRepository)
 {
     _gradeRepository          = gradeRepository;
     _academicGradeRepository  = academicGradeRepository;
     _pensumRepository         = pensumRepository;
     _educationLevelRepository = educationLevelRepository;
     _sessionManagementService = sessionManagementService;
     _userRepository           = userRepository;
     _viewMessageLogic         = new ViewMessageLogic(this);
 }
 public AcademicYearController(IAcademicYearRepository academicYearRepository, IUserRepository userRepository, ISessionManagementService sessionManagementService, IGradeRepository gradeRepository, IPensumRepository pensumRepository, IAcademicGradeRepository academicGradeRepository, IAcademicCourseRepository academicCourseRepository)
 {
     _academicYearRepository   = academicYearRepository;
     _userRepository           = userRepository;
     _sessionManagementService = sessionManagementService;
     _gradeRepository          = gradeRepository;
     _pensumRepository         = pensumRepository;
     _academicGradeRepository  = academicGradeRepository;
     _academicCourseRepository = academicCourseRepository;
     _viewMessageLogic         = new ViewMessageLogic(this);
 }
Beispiel #4
0
 public CourseController(ICourseRepository courseRepository, 
                         IEducationLevelRepository areaRepository,
                         IPensumRepository pensumRepository)
 {
     if (courseRepository == null) throw new ArgumentNullException("courseRepository");
     if (areaRepository == null) throw new ArgumentNullException("areaRepository");
     _courseRepository = courseRepository;
     _areaRepository = areaRepository;
     _pensumRepository = pensumRepository;
     _viewMessageLogic = new ViewMessageLogic(this);
 }
Beispiel #5
0
 public CourseController(ICourseRepository courseRepository,
                         IEducationLevelRepository areaRepository,
                         IPensumRepository pensumRepository)
 {
     if (courseRepository == null)
     {
         throw new ArgumentNullException("courseRepository");
     }
     if (areaRepository == null)
     {
         throw new ArgumentNullException("areaRepository");
     }
     _courseRepository = courseRepository;
     _areaRepository   = areaRepository;
     _pensumRepository = pensumRepository;
     _viewMessageLogic = new ViewMessageLogic(this);
 }
Beispiel #6
0
        protected override void Seed(MhotivoContext context)
        {
            if (context.Users.Any())
            {
                return;
            }
            _passwordGenerationService = new PreloadedPasswordsGenerationService(context);
            _areaRepository            = new EducationLevelRepository(context);
            _gradeRepository           = new GradeRepository(context);
            _courseRepository          = new CourseRepository(context, _areaRepository);
            _pensumRepository          = new PensumRepository(context);
            _academicYearRepository    = new AcademicYearRepository(context);
            var admin = new User
            {
                DisplayName = "Administrador",
                Email       = "*****@*****.**",
                Password    = "******",
                IsActive    = true,
                Role        = Roles.Administrador
            };

            admin.EncryptPassword();
            context.Users.AddOrUpdate(admin);
            context.SaveChanges();
            context.NotificationTypes.AddOrUpdate(new NotificationType {
                Id = 1, Description = "General"
            });
            context.NotificationTypes.AddOrUpdate(new NotificationType {
                Id = 2, Description = "Nivel De Educacion"
            });
            context.NotificationTypes.AddOrUpdate(new NotificationType {
                Id = 3, Description = "Grado"
            });
            context.NotificationTypes.AddOrUpdate(new NotificationType {
                Id = 4, Description = "Personal"
            });
            context.SaveChanges();
            DebuggingSeeder(context);
            context.SaveChanges();
        }
Beispiel #7
0
 public PensumController(IPensumRepository pensumRepository, IGradeRepository gradeRepository, ICourseRepository courseRepository)
 {
     _pensumRepository = pensumRepository;
     _gradeRepository  = gradeRepository;
     _courseRepository = courseRepository;
 }