private void ButtonRecibo_Click(object sender, EventArgs e) { int id = Convert.ToInt32(VentaIdNumericUpDown.Value); Ventas venta = VentasBLL.Buscar(id); int Id = Convert.ToInt32(VentaIdNumericUpDown.Value); List <Ventas> ventas = new List <Ventas>(); if (venta != null) { if (VentaIdNumericUpDown.Value > 0) { ventas = VentasBLL.GetList(v => v.VentaId == Id); vRecibo vRecibo = new vRecibo(ventas); vRecibo.ShowDialog(); } else { MessageBox.Show("Introduzca un Id!!", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { MessageBox.Show("No Hay Una Venta Con Ese Id!!", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void ButtonBuscar_Click(object sender, EventArgs e) { ventas = VentasBLL.GetList(v => v.VentaId == id); vRecibo recibo = new vRecibo(ventas); recibo.ShowDialog(); Hide(); }