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); } }
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); } }