Exemplo n.º 1
0
        public frmTurma(ITurmaModels userModels)
        {
            InitializeComponent();
            this.userModels = userModels;

            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;
        }
Exemplo n.º 2
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;
        }
Exemplo n.º 3
0
        public frmTurmaAdd(TurmaModels userModels, ITurmaModels turmaModels,
                           IClasseModels classeModels)
        {
            InitializeComponent();
            this.turmaModels                   = turmaModels;
            this.classeModels                  = classeModels;
            this.Load                         += delegate { LoaderFormsXML(); Loader(); };
            btnClose.Click                    += delegate { SaveFormsXML(); };
            IDTextEdit.EditValueChanged       += IDTextEdit_TextChanged;
            windowsUIButtonPanel1.ButtonClick += WindowsUIButtonPanel1_ButtonClick;;

            if (userModels != null)
            {
                IDTextEdit.EditValue             = userModels.ID;
                GruposModelsLookUpEdit.EditValue = userModels.ClasseModelsID;
                UserNameTextEdit.EditValue       = userModels.Descricao;
                UserNameTextEdit.Focus();
            }
            btnAddForenty.Click += BtnAddForenty_Click;
            GruposModelsLookUpEdit.EditValueChanged += GruposModelsLookUpEdit_EditValueChanged;
        }