private void button8_Click(object sender, EventArgs e) { Transferencia transferencia = new Transferencia(); agregarTransferencias ventana = new agregarTransferencias(); ventana.ShowDialog(); if (ventana.transferencia.importe != 0) { transferencia.importe = ventana.transferencia.importe; transferencia.Banco = ventana.transferencia.Banco; transferencia.numeroTransferencia = ventana.transferencia.numeroTransferencia; listaTransferencias.Add(transferencia); refrescarGrilla(); } }
private void button1_Click(object sender, EventArgs e) { if (cboPago.Text == "Transferencia") { t = new Transferencia(); agregarTransferencias ventana = new agregarTransferencias(); ventana.ShowDialog(); if (ventana.transferencia != null) { t = ventana.transferencia; this.Close(); } } else if (cboPago.Text == "Cheque") { c = new Cheque(); AgregarCheques ventana = new AgregarCheques(); ventana.ShowDialog(); if (ventana.cheque != null) { c = ventana.cheque; this.Close(); } } else if (cboPago.Text == "Efectivo") { ef = new Efectivo(); agregarEfectivo ventana = new agregarEfectivo(); ventana.ShowDialog(); if (ventana.importe != 0) { ef.importe = ventana.importe; this.Close(); } } }