/// <summary>
        /// Create a new mModulos object.
        /// </summary>
        /// <param name="idModulo">Initial value of the idModulo property.</param>
        /// <param name="xNome">Initial value of the xNome property.</param>
        /// <param name="xNameSpaceCamada">Initial value of the xNameSpaceCamada property.</param>
        public static mModulos CreatemModulos(global::System.Int32 idModulo, global::System.String xNome, global::System.String xNameSpaceCamada)
        {
            mModulos mModulos = new mModulos();

            mModulos.idModulo         = idModulo;
            mModulos.xNome            = xNome;
            mModulos.xNameSpaceCamada = xNameSpaceCamada;
            return(mModulos);
        }
示例#2
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;
 }
示例#3
0
        public int Salvar(mModulos _objModulos)
        {
            if(_objModulos.idModulo == 0)
            {
                _ctxModulos.AddToentityModulos(_objModulos);
            }
            _ctxModulos.SaveChanges();

            return _objModulos.idModulo;
        }
 /// <summary>
 /// Create a new mModulos object.
 /// </summary>
 /// <param name="idModulo">Initial value of the idModulo property.</param>
 /// <param name="xNome">Initial value of the xNome property.</param>
 /// <param name="xNameSpaceCamada">Initial value of the xNameSpaceCamada property.</param>
 public static mModulos CreatemModulos(global::System.Int32 idModulo, global::System.String xNome, global::System.String xNameSpaceCamada)
 {
     mModulos mModulos = new mModulos();
     mModulos.idModulo = idModulo;
     mModulos.xNome = xNome;
     mModulos.xNameSpaceCamada = xNameSpaceCamada;
     return mModulos;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the entityModulos EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToentityModulos(mModulos mModulos)
 {
     base.AddObject("entityModulos", mModulos);
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the entityModulos EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToentityModulos(mModulos mModulos)
 {
     base.AddObject("entityModulos", mModulos);
 }
示例#7
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();
 }
示例#8
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;
     }
 }