Exemple #1
0
 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!");
     }
 }
Exemple #2
0
 public void procesarPago(int op, double cantidad)
 {
     sonido();
     if (op == 1)
     {
         retirar(cantidad);
     }
     else
     {
         if (cantidad > cuenta.Saldo)
         {
             MessageBox.Show("Fondos insuficientes");
         }
         else
         {
             this.Hide();
             FormTransfer formTransfer = new FormTransfer(this.cuenta, cantidad);
             formTransfer.ShowDialog();
             this.Close();
         }
     }
 }