Esempio n. 1
0
        public override void proModificar()
        {
            base.proModificar();
            try
            {
                foreach (TreeListNode varNodo in treListado.GetAllCheckedNodes())
                {
                    int varRegistro = int.Parse(varNodo[treListado.KeyFieldName].ToString());
                    using (xfrmSegManMenu frmFormulario = new xfrmSegManMenu(varCodFormulario, varCodOperacion, varRegistro, 0, "")) { frmFormulario.ShowDialog(); }
                }

                this.treListado.DataSource = clsSegMenu.funListar();
                this.treListado.ExpandAll();
            }
            catch (Exception ex) { XtraMessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
        }
Esempio n. 2
0
 public override void proNuevo()
 {
     base.proNuevo();
     try
     {
         object varCodigo = treListado.FocusedNode[treListado.KeyFieldName];
         object varNombre = treListado.FocusedNode[treMenNombre];
         using (xfrmSegManMenu frmFormulario = new xfrmSegManMenu(varCodFormulario, varCodOperacion, 0, varCodigo == null ? 0 : (int)varCodigo, varNombre == null ? "" : varNombre.ToString()))
         {
             frmFormulario.ShowDialog();
             this.treListado.DataSource = clsSegMenu.funListar();
             this.treListado.ExpandAll();
         }
     }
     catch (Exception ex) { XtraMessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
 }