public new void btnEnter_Click(object sender, EventArgs e) { sonido(); if (!String.IsNullOrEmpty(txtMonto.Text)) { if (op == 1) { MessageBox.Show(this.cuenta.retirarSaldo(double.Parse(txtMonto.Text))); this.Hide(); FormCajero formCajero = new FormCajero(this.cuenta); formCajero.ShowDialog(); this.Close(); } else { double cantidad = double.Parse(txtMonto.Text); if (cantidad <= this.cuenta.Saldo) { this.Hide(); FormTransfer formTransfer = new FormTransfer(this.cuenta, cantidad); formTransfer.ShowDialog(); this.Close(); } } } else { MessageBox.Show("Digita el monto a retirar", "Atención!"); } }
public void retirar(double cantidad) { MessageBox.Show(cuenta.retirarSaldo(cantidad)); this.Hide(); FormCajero formCajero = new FormCajero(cuenta); formCajero.ShowDialog(); this.Close(); }
// Volver al anterior form public virtual void btnCancel_Click(object sender, EventArgs e) { sonido(); this.Hide(); FormCajero formCajero = new FormCajero(cuenta); formCajero.ShowDialog(); this.Close(); }
public new void btnEnter_Click(object sender, EventArgs e) { sonido(); int documento = 0; string clave = txtClave.Text; bool valid = false; try { documento = Convert.ToInt32(txtUsuario.Text); valid = true; } catch (Exception) { MessageBox.Show("Documento incorrecto"); } if (valid) { if (documento != 0 && !String.IsNullOrEmpty(clave)) { if (Cliente.login(documento, clave) != null) { FormCajero formCajero = new FormCajero(Cliente.login(documento, clave)); this.Hide(); formCajero.ShowDialog(); this.Close(); } else { MessageBox.Show("Documento y/o contraseña iconrrecto(s)."); } } else { MessageBox.Show("Completa los campos"); } } }
public new void btnEnter_Click(object sender, EventArgs e) { sonido(); if (!String.IsNullOrEmpty(lblNumCuenta.Text)) { if (cuenta.transferir(BigInteger.Parse(lblNumCuenta.Text), cantidad)) { MessageBox.Show($"Se realizo exisamente la transacción de {cuenta.darFormato(cantidad)} pesos."); this.Hide(); FormCajero formCajero = new FormCajero(cuenta); formCajero.ShowDialog(); this.Close(); } else { MessageBox.Show("La tarjeta no fue encontrada"); } } else { MessageBox.Show("Completa el número de cuenta.", "Error"); } }