Пример #1
0
 private void tlbMenu_NewClick()
 {
     try
     {
         frmManBankEdit objManBank = new frmManBankEdit();
         objManBank.lstBank       = mLista;
         objManBank.pOperacion    = frmManBankEdit.Operacion.Nuevo;
         objManBank.IdBank        = 0;
         objManBank.StartPosition = FormStartPosition.CenterParent;
         objManBank.ShowDialog();
         Cargar();
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #2
0
        public void InicializarModificar()
        {
            if (gvBank.RowCount > 0)
            {
                BankBE objBank = new BankBE();

                objBank.IdBank = int.Parse(gvBank.GetFocusedRowCellValue("IdBank").ToString());

                frmManBankEdit objManBankEdit = new frmManBankEdit();
                objManBankEdit.pOperacion    = frmManBankEdit.Operacion.Modificar;
                objManBankEdit.IdBank        = objBank.IdBank;
                objManBankEdit.pBankBE       = objBank;
                objManBankEdit.StartPosition = FormStartPosition.CenterParent;
                objManBankEdit.ShowDialog();

                Cargar();
            }
            else
            {
                MessageBox.Show("No se pudo editar");
            }
        }