Ejemplo n.º 1
0
        public PresencaServiceTests()
        {
            _alunoRepository = new Mock<IAlunoRepository>();
            _aulaRepository = new Mock<IAulaRepository>();
            _turmaRepository = new Mock<ITurmaRepository>();

            aulaService = new AulaService(_aulaRepository.Object, _alunoRepository.Object, _turmaRepository.Object);
        }
Ejemplo n.º 2
0
        public Home()
        {
            InitializeComponent();
            this.grafoService    = DependencyFactory.Resolve <IGrafoService>();
            this.aulaService     = DependencyFactory.Resolve <IAulaService>();
            this.dataBaseService = DependencyFactory.Resolve <IDataBaseService>();

            try
            {
                Configuracoes.CarregarInfosArquivo();
                this.IniciarConexaoBanco();
            }
            catch
            {
                DialogResult resultado = MessageBox.Show("Falha na leitura do arquivo de configuração. " +
                                                         "Deseja abrir as configurações agora ?", "Config file", MessageBoxButtons.YesNo,
                                                         MessageBoxIcon.Question);
                if (resultado == DialogResult.Yes)
                {
                    this.configuracoes.ShowDialog();
                }
                else
                {
                    return;
                }
            }

            try
            {
                this.login           = new Login();
                this.sobre           = new Sobre();
                this.buscarUsuario   = new BuscaUsuario();
                this.cadastroUsuario = new FormUsuario(0);
                this.editarUsuario   = new FormEditarUsuario();
                this.buscarPerfil    = new BuscarPerfil();
                this.formperfil      = new FormEditarPerfil();

                this.login.FormClosed         += Login_FormClosed;
                this.editarUsuario.FormClosed += EditarUsuario_FormClosed;
                this.periodos    = new HashSet <string>();
                this.materias    = new HashSet <string>();
                this.professores = new HashSet <string>();
                this.dias        = new HashSet <string>();
                this.horarios    = new HashSet <string>();

                this.AcoesLogout();
            }
            catch
            {
                DialogResult resultado = MessageBox.Show("Houve um problema na abertura do sistema. conecte ao banco e abra o aplicativo novamente", "Config file",
                                                         MessageBoxButtons.OK, MessageBoxIcon.Question);
                this.Close();
            }

            this.btnCadastrar.Visible     = false;
            this.btnBuscarUsuario.Visible = false;
            this.btnPerfil.Visible        = false;
        }
Ejemplo n.º 3
0
 public AulasController(INotificator notificator,
                        IMapper mapper,
                        IAulaService aulaService,
                        IAulaRepository aulaRepository) : base(notificator)
 {
     _mapper         = mapper;
     _aulaService    = aulaService;
     _aulaRepository = aulaRepository;
 }
Ejemplo n.º 4
0
        public AulaServiceTest()
        {
            _unitOfWork = new Mock<IUnitOfWork>();

            _aulaRepository = new Mock<IAulaRepository>();

            _alunoRepository = new Mock<IAlunoRepository>();

            _turmaRepository = new Mock<ITurmaRepository>();

            _aulaService = new AulaService(_aulaRepository.Object,
                _alunoRepository.Object, _turmaRepository.Object, _unitOfWork.Object);
        }
Ejemplo n.º 5
0
        public AulaDataManager()
        {
            var unitOfWork = Injection.Get<IUnitOfWork>();

            var aulaRepository = Injection.Get<IAulaRepository>();

            var alunoRepository = Injection.Get<IAlunoRepository>();

            var turmaRepository = Injection.Get<ITurmaRepository>();

            _aulaService = new AulaService(aulaRepository, alunoRepository, turmaRepository, unitOfWork);

            _alunoService = new AlunoService(alunoRepository, turmaRepository, unitOfWork);

            _turmaService = new TurmaService(turmaRepository, unitOfWork);

            _control = new AulaControl(_aulaService);
        }
Ejemplo n.º 6
0
        public AulaDataManager()
        {
            var unitOfWork = Injection.Get <IUnitOfWork>();

            var aulaRepository = Injection.Get <IAulaRepository>();

            var alunoRepository = Injection.Get <IAlunoRepository>();

            var turmaRepository = Injection.Get <ITurmaRepository>();

            _aulaService = new AulaService(aulaRepository, alunoRepository, turmaRepository, unitOfWork);

            _alunoService = new AlunoService(alunoRepository, turmaRepository, unitOfWork);

            _turmaService = new TurmaService(turmaRepository, unitOfWork);

            _control = new AulaControl(_aulaService);
        }
Ejemplo n.º 7
0
        public void initialize()
        {
            AlunoService = new AlunoService(
                AlunoRepository.Object,
                TurmaRepository.Object,
                UnitOfWork.Object
                );

            AulaService = new AulaService(
                AulaRepository.Object,
                AlunoRepository.Object,
                TurmaRepository.Object,
                UnitOfWork.Object
                );

            TurmaService = new TurmaService(
                TurmaRepository.Object,
                UnitOfWork.Object
                );
        }
Ejemplo n.º 8
0
        public AulaDataManager()
        {
            var factory = new DatabaseFactory();

            var unitOfWork = new UnitOfWork(factory);

            var aulaRepository = new AulaRepository(factory);

            var turmaRepository = new TurmaRepository(factory);

            var alunoRepository = new AlunoRepository(factory);

            _aulaService = new AulaService(aulaRepository, alunoRepository, turmaRepository, unitOfWork);

            _alunoService = new AlunoService(alunoRepository, turmaRepository, unitOfWork);

            _turmaService = new TurmaService(turmaRepository, unitOfWork);

            _control = new AulaControl(_aulaService);
        }
Ejemplo n.º 9
0
        public Home()
        {
            InitializeComponent();
            this.grafoService = DependencyFactory.Resolve <IGrafoService>();
            this.aulaService  = DependencyFactory.Resolve <IAulaService>();

            try
            {
                this.periodos    = new HashSet <string>();
                this.materias    = new HashSet <string>();
                this.professores = new HashSet <string>();
                this.dias        = new HashSet <string>();
                this.horarios    = new HashSet <string>();
            }
            catch
            {
                DialogResult resultado = MessageBox.Show("Houve um problema na abertura do sistema.", "Config file",
                                                         MessageBoxButtons.OK, MessageBoxIcon.Question);
                this.Close();
            }
        }
Ejemplo n.º 10
0
 public CursadaController(ICursadaService cursadaService, IAulaService aulaService)
 {
     _cursadaService = cursadaService;
     _aulaService    = aulaService;
 }
Ejemplo n.º 11
0
 public AulaApplication(IAulaService service)
     : base(service)
 {
     _service = service;
 }
Ejemplo n.º 12
0
 public AulaAppService(IAulaService aulaService)
     : base(aulaService)
 {
     _aulaService = aulaService;
 }
Ejemplo n.º 13
0
 public AulaController(IAulaService aulaService)
 {
     _aulaService = aulaService;
 }
Ejemplo n.º 14
0
 public AulaControl(IAulaService aulaService)
     : this()
 {
     this._aulaService = aulaService;
 }
Ejemplo n.º 15
0
 public AulaControl(IAulaService aulaService) : this()
 {
     this._aulaService = aulaService;
 }