private void btnGrabar_Click(object sender, EventArgs e) { try { Cursor = Cursors.WaitCursor; if (!ValidarIngreso()) { BankBL objBL_Bank = new BankBL(); BankBE objBank = new BankBE(); objBank.IdBank = IdBank; objBank.Swift = txtSwift.Text; objBank.NameBank = txtDescripcion.Text; objBank.IdCurrency = Convert.ToInt32(cboCurrency.EditValue); objBank.NumberCtaCte = txtNumberCtaCte.Text; objBank.CodeAba = txtCodeAba.Text; objBank.Address = txtAddress.Text; objBank.Phone = txtPhone.Text; objBank.Contac = txtContact.Text; objBank.FlagState = true; objBank.Login = Parametros.strUsuarioLogin; objBank.Machine = WindowsIdentity.GetCurrent().Name.ToString(); objBank.IdCompany = Parametros.intEmpresaId; if (pOperacion == Operacion.Nuevo) { objBL_Bank.Inserta(objBank); } else { objBL_Bank.Actualiza(objBank); } this.Close(); } } catch (Exception ex) { Cursor = Cursors.Default; XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }