Beispiel #1
0
        private void buttonCotizar_Click(object sender, EventArgs e)
        {
            if (stock < cantidad)
            {
                this.textErrorCotizacion.Text = "No hay suficiente stock";
                return;
            }

            this.textErrorCotizacion.Text = "";

            float total = 0;

            total  = prenda.Cotizar(premium); //es unitario..
            total *= cantidad;

            this.labelCotizacion.Text = total.ToString("n2");

            //Le agrego cotizacion al vendedor

            Cotizacion cotizacion = new Cotizacion(prenda, cantidad, total, vendedor.idVendedor, prenda.ToString() + (premium ? " Premium " : "Standard"));

            vendedor.historial.AgregarCotizacion(cotizacion);
        }
 public void AgregarCotizacion(Cotizacion cotizacion)
 {
     cotizaciones.Add(cotizacion);
 }
Beispiel #3
0
 public void AgregarCotizacion(Cotizacion cotizacion)
 {
     historial.AgregarCotizacion(cotizacion);
 }