예제 #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);
        }
예제 #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;
        }
예제 #3
0
 public AulasController(INotificator notificator,
                        IMapper mapper,
                        IAulaService aulaService,
                        IAulaRepository aulaRepository) : base(notificator)
 {
     _mapper         = mapper;
     _aulaService    = aulaService;
     _aulaRepository = aulaRepository;
 }
        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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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
                );
        }
예제 #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);
        }
예제 #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();
            }
        }
예제 #10
0
 public CursadaController(ICursadaService cursadaService, IAulaService aulaService)
 {
     _cursadaService = cursadaService;
     _aulaService    = aulaService;
 }
예제 #11
0
 public AulaApplication(IAulaService service)
     : base(service)
 {
     _service = service;
 }
예제 #12
0
 public AulaAppService(IAulaService aulaService)
     : base(aulaService)
 {
     _aulaService = aulaService;
 }
예제 #13
0
 public AulaController(IAulaService aulaService)
 {
     _aulaService = aulaService;
 }
예제 #14
0
 public AulaControl(IAulaService aulaService)
     : this()
 {
     this._aulaService = aulaService;
 }
예제 #15
0
 public AulaControl(IAulaService aulaService) : this()
 {
     this._aulaService = aulaService;
 }