public frmPedidosRequisicoesAdd(IPedidoModels pedidoModels,
                                        IAlunoModels alunoModels,
                                        IStocksModels stocksModels)
        {
            InitializeComponent();
            this.pedidoModels                  = pedidoModels;
            this.alunoModels                   = alunoModels;
            this.stocksModels                  = stocksModels;
            this.Load                         += delegate { LoaderFormsXML(); Loader(); };
            btnClose.Click                    += delegate { SaveFormsXML(); };
            txtCodigo.EditValueChanged        += IDTextEdit_TextChanged;
            windowsUIButtonPanel1.ButtonClick += WindowsUIButtonPanel1_ButtonClick;

            txtProduto.KeyDown           += TxtProduto_KeyDown;
            txtProduto.Validated         += delegate { Edit(txtProduto.Text); };
            txtProduto.ButtonClick       += TxtProduto_ButtonClick;
            txtAcrescer.EditValueChanged += TxtAcrescer_EditValueChanged;
            txtAcrescer.KeyPress         += TxtAcrescer_KeyPress;
            //txtAcrescer
            //btnAdicionar.Click += delegate { Execute(); };

            //if (alunoModels != null)
            //{
            //    IDTextEdit.EditValue = alunoModels.ID;
            //    txtInstituicao.EditValue = alunoModels.InstituicaoID;
            //    txtTurma.EditValue = alunoModels.TurmaID;
            //    txtNome.EditValue = alunoModels.Nome;
            //    txtNumeroEstudante.EditValue = alunoModels.NumeroEstudante;
            //    txtdataNascimento.EditValue = alunoModels.DataNascimento;
            //    txtdataRegisto.EditValue = alunoModels.DataRegisto;
            //    IsValidoToggleSwitch.EditValue = alunoModels.IsValido;
            //    txtSexo.EditValue = (SexoModels)alunoModels.Sexo;
            //    txtPratileiraPosicao.EditValue = (int)alunoModels.Idate;
            //    txtNumeroEstudante.Focus();
            //}
            //else
            //{
            //    txtdataRegisto.DateTime = DateTime.Now;
            //    txtNumeroEstudante.Focus();
            //}
            btnAddForenty1.Click     += BtnAddForenty_Click;
            txtDataEntrada.Validated += TxtdataNascimento_Validating;


            // Menu de contexto 2
            contextMenuStrip2.Opened += ContextMenuStrip2_Opened;
            btnAumentar.Click        += delegate { btnAumetar_Click(); };
            btnDimunir.Click         += delegate { btnDiminuir_Click(); };
            btnExcluir.Click         += delegate { btnExcluir_Click(); };

            txtEstudantes.EditValueChanged += TxtEstudantes_EditValueChanging;
            produtoStocksModelsBindingSource.DataSource = new List <ProdutoStocksModels>();
        }
Ejemplo n.º 2
0
        public frmAlunos(IAlunoModels alunoModels)
        {
            InitializeComponent();
            this.alunoModels = alunoModels;

            this.Load     += delegate { LoaderFormsXML(); Loader(); };
            this.Disposed += delegate { SaveFormsXML(); };

            this.gridView1.DoubleClick += MenuEditar_Click;

            //Menu
            contextMenuStrip1.Opened += ContextMenuStrip1_Opened;
            MenuNovo.Click           += MenuNovo_Click;
            MenuEditar.Click         += MenuEditar_Click;
            MenuApagar.Click         += MenuApagar_Click;
            MenuRelatorios.Click     += MenuRelatorios_Click;
        }
Ejemplo n.º 3
0
        public frmAlunosAdd(AlunoModels alunoModels, IAlunoModels alunoModelsRepostory,
                            IInstituicaoModels instituicaoModels,
                            ITurmaModels turmaModels)
        {
            InitializeComponent();
            this.Load      += delegate { LoaderFormsXML(); Loader(); };
            btnClose.Click += delegate { SaveFormsXML(); };
            IDTextEdit.EditValueChanged += IDTextEdit_TextChanged;

            windowsUIButtonPanel1.ButtonClick += WindowsUIButtonPanel1_ButtonClick;;
            this.alunoModels       = alunoModelsRepostory;
            this.instituicaoModels = instituicaoModels;
            this.turmaModels       = turmaModels;

            if (alunoModels != null)
            {
                IDTextEdit.EditValue           = alunoModels.ID;
                txtInstituicao.EditValue       = alunoModels.InstituicaoID;
                txtTurma.EditValue             = alunoModels.TurmaID;
                txtNome.EditValue              = alunoModels.Nome;
                txtNumeroEstudante.EditValue   = alunoModels.NumeroEstudante;
                txtdataNascimento.EditValue    = alunoModels.DataNascimento;
                txtdataRegisto.EditValue       = alunoModels.DataRegisto;
                IsValidoToggleSwitch.EditValue = alunoModels.IsValido;
                txtSexo.EditValue              = (SexoModels)alunoModels.Sexo;
                EmailTextEdit.EditValue        = (string)alunoModels.Email;
                txtPratileiraPosicao.EditValue = (int)alunoModels.Idate;
                txtNumeroEstudante.Focus();
            }
            else
            {
                txtdataRegisto.DateTime = DateTime.Now;
                txtNumeroEstudante.Focus();
            }
            btnAddForenty1.Click += BtnAddForenty_Click;
            btnAddForenty2.Click += BtnAddForenty_Click2;

            txtSexo.Properties.DataSource = Enum.GetValues(typeof(SexoModels));
            txtSexo.ItemIndex             = 0;

            txtdataNascimento.Validating += TxtdataNascimento_Validating;
            EmailTextEdit.Validating     += EmailTextEdit_Validating;
        }