private void tlbMenu_NewClick() { try { frmManCurrencyEdit objManCurrency = new frmManCurrencyEdit(); objManCurrency.lstCurrency = mLista; objManCurrency.pOperacion = frmManCurrencyEdit.Operacion.Nuevo; objManCurrency.IdCurrency = 0; objManCurrency.StartPosition = FormStartPosition.CenterParent; objManCurrency.ShowDialog(); Cargar(); } catch (Exception ex) { XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public void InicializarModificar() { if (gvCurrency.RowCount > 0) { CurrencyBE objCurrency = new CurrencyBE(); objCurrency.IdCurrency = int.Parse(gvCurrency.GetFocusedRowCellValue("IdCurrency").ToString()); frmManCurrencyEdit objManCurrencyEdit = new frmManCurrencyEdit(); objManCurrencyEdit.pOperacion = frmManCurrencyEdit.Operacion.Modificar; objManCurrencyEdit.IdCurrency = objCurrency.IdCurrency; objManCurrencyEdit.pCurrencyBE = objCurrency; objManCurrencyEdit.StartPosition = FormStartPosition.CenterParent; objManCurrencyEdit.ShowDialog(); Cargar(); } else { MessageBox.Show("No se pudo editar"); } }