コード例 #1
0
 private void btnNovo_Click(object sender, EventArgs e)
 {
     _op = Operacoes.inserindo;
     ValidaBotoes();
     limpar(this);
     _objModulo = new mModulos();
     gvForms.Columns[singleton.Name].ReadOnly = true;
     formulariosBindingSource.DataSource      = _objModulo.Formularios;
 }
コード例 #2
0
ファイル: modulosBO.cs プロジェクト: dramosti/Gerador_1.0
        public int Salvar(mModulos _objModulos)
        {
            if (_objModulos.idModulo == 0)
            {
                _ctxModulos.AddToentityModulos(_objModulos);
            }
            _ctxModulos.SaveChanges();

            return(_objModulos.idModulo);
        }
コード例 #3
0
        private void btnPesquisa_Click(object sender, EventArgs e)
        {
            UIPesquisaForm _frmPesquisaForm = new UIPesquisaForm();

            if (_frmPesquisaForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                _op = Operacoes.pesquisando;
                ValidaBotoes();
                _objModulo         = new mModulos();
                _objModulo         = _objBoMod.GetModulo(_frmPesquisaForm.IdMod);
                edtID.Text         = _objModulo.idModulo.ToString();
                edtModulo.Text     = _objModulo.xNome;
                edtNamesPrinc.Text = _objModulo.xNameSpaceCamada;
                formulariosBindingSource.DataSource = _objModulo.Formularios;
                gvForms.DataSource = formulariosBindingSource;
            }
        }
コード例 #4
0
 private void btnCancelar_Click(object sender, EventArgs e)
 {
     if (edtID.Text == "")
     {
         _op = Operacoes.livre;
         limpar(this);
     }
     else
     {
         _objModulo         = new mModulos();
         _objModulo         = _objBoMod.GetModulo(Convert.ToInt32(edtID.Text));
         edtID.Text         = _objModulo.idModulo.ToString();
         edtModulo.Text     = _objModulo.xNome;
         edtNamesPrinc.Text = _objModulo.xNameSpaceCamada;
         formulariosBindingSource.DataSource = _objModulo.Formularios;
         gvForms.DataSource = formulariosBindingSource;
         _op = Operacoes.pesquisando;
     }
     LimparValid();
     gvForms.ShowCellErrors = false;
     ValidaBotoes();
 }