private void button1_Click(object sender, EventArgs e) { Entidades.Productos producto; Entidades.Clientes cliente; Entidades.Cotizaciones cotizacion; producto = new Entidades.Productos { ProductoId = 0, Descripcion = "Cebolla", Precio = 100 }; cliente = new Entidades.Clientes(); cliente.ClienteId = 0; cliente.Nombres = "Enel"; producto = BLL.Productos.Guardar(producto); cliente = BLL.Clientes.Guardar(cliente); cotizacion = new Entidades.Cotizaciones(); cotizacion.ClienteId = cliente.ClienteId; cotizacion.Fecha = DateTime.Now; cotizacion.Monto = 100; cotizacion.AgregarDetalle(producto, 1); cotizacion = BLL.Cotizaciones.Guardar(cotizacion); MessageBox.Show("Cotizaciones creada" + cotizacion.ClienteId.ToString()); }
private void button1_Click(object sender, EventArgs e) { Cotizacion.AgregarDetalle(detalle.Producto, CantidadnumericUpDown.Value); LlenarGrid(Cotizacion); }