コード例 #1
0
        private void numericUpDownCantidad_ValueChanged(object sender, EventArgs e)
        {
            double valorActual = Venta.CalcularPrecioFinal(this.producto.Precio, (int)numericUpDownCantidad.Value);
            string aux         = $"Precio final: ${valorActual:#.00}";

            lblPrecioFinal.Text = aux;
        }
コード例 #2
0
        private void ActualizarPrecio()
        {
            int    cantidadSeleccionada = Convert.ToInt32(this.numericUpDownCantidad.Value);
            double nuevoPrecioFinal     = Venta.CalcularPrecioFinal(this.productoSeleccionado.Precio, cantidadSeleccionada);

            this.lblPrecioFinal.Text = String.Format("Precio Final: ${0:0.00}", nuevoPrecioFinal);
        }
コード例 #3
0
 public VentasForm(Comiqueria comiqueria, Producto producto) : this()
 {
     this.comiqueriaVe    = comiqueria;
     this.productoVe      = producto;
     this.cantidad        = 1;
     lblDescripcion.Text  = producto.Descripcion;
     lblPrecioFinal2.Text = string.Format("{0:#,###.00}",
                                          Venta.CalcularPrecioFinal(productoVe.Precio, cantidad).ToString());
 }
コード例 #4
0
 public VentasForm(Comiqueria c, Producto p)
 {
     InitializeComponent();
     this.numericUpDown1.Minimum = 1;
     this.lblDescripcion.Text    = p.Descripcion;
     this.auxC = c;
     this.aux  = p;
     this.lblPrecioFinal.Text = Venta.CalcularPrecioFinal(aux.Precio, (int)this.numericUpDown1.Value).ToString();
 }
コード例 #5
0
        private void numericUpDown1_ValueChanged(object sender, EventArgs e)
        {
            // Modificando el maximo NO se permite que el usuario puede seleccionar una cantidad mayor al stock
            numericUpDownCantidad.Maximum = producto.Stock;
            double  precioFinal        = Venta.CalcularPrecioFinal(producto.Precio, (int)numericUpDownCantidad.Value);
            decimal precioFinalDecimal = Convert.ToDecimal(precioFinal);

            lblPrecioFinal.Text = "PrecioFinal: $" + precioFinalDecimal.ToString("N2");
        }
コード例 #6
0
 public VentasForm(Comiqueria comiqueria, Producto productoSeleccionado)
 {
     InitializeComponent();
     this.comiqueria           = comiqueria;
     this.productoSeleccionado = productoSeleccionado;
     //this.cantidad = int.Parse(this.lblCantidad.Text);
     this.lblDescripcion.Text = this.productoSeleccionado.Descripcion;
     //this.lvlPrecioMostrar.Text = Venta.CalcularPrecioFinal(productoSeleccionado.Precio, cantidad);
     this.lvlPrecioMostrar.Text = (Venta.CalcularPrecioFinal(productoSeleccionado.Precio, this.cantidad)).ToString();
 }
コード例 #7
0
        //Venta venta;

        //public Venta GetVenta
        //{
        //    get { return this.venta; }
        //}

        public VentasForm(Producto p, Comiqueria comiqueria)
        {
            InitializeComponent();
            this.producto   = p;
            this.comiqueria = comiqueria;
            double valorActual = Venta.CalcularPrecioFinal(this.producto.Precio, (int)numericUpDownCantidad.Value);
            string aux         = $"Precio final: ${valorActual:#.00}";

            lblPrecioFinal.Text = aux;
            lblDescripcion.Text = this.producto.Descripcion;
        }
コード例 #8
0
 private void numericUpDownCantidad_ValueChanged(object sender, EventArgs e)
 {
     this.lblPrecioFinal.Text = "Precio Final: $" + Venta.CalcularPrecioFinal(productoSeleccionado.Precio, (int)numericUpDownCantidad.Value);
 }
コード例 #9
0
 private void numericUpDownCantidad_ValueChanged(object sender, EventArgs e)
 {
     invokere
     this.cantidad        = (int)numericUpDownCantidad.Value;
     lblPrecioFinal2.Text = string.Format("{0,-10:#,###.00}", Venta.CalcularPrecioFinal(productoVe.Precio, cantidad).ToString());
 }
コード例 #10
0
        /// <summary>
        /// Actualiza el precio del producto en el form.
        /// </summary>
        private void UpdatePrice()
        {
            double finalPrice = Venta.CalcularPrecioFinal(selectedProd.Precio, (int)numCantidad.Value);

            lblPrecio.Text = $"Precio: ${Math.Round(finalPrice, 2)}";
        }
コード例 #11
0
        private void ActualizarPrecio()
        {
            double precio = Venta.CalcularPrecioFinal(producto.Precio, Convert.ToInt32(numericUpDownCantidad.Value));

            lblPrecioFinalValor.Text = precio.ToString("0.00");
        }
コード例 #12
0
 private void numericUpDown1_ValueChanged(object sender, EventArgs e)
 {
     this.cantidad = int.Parse(this.numericUpDown1.Value.ToString());
     this.lvlPrecioMostrar.Text = (Venta.CalcularPrecioFinal(productoSeleccionado.Precio, this.cantidad)).ToString();
     //MessageBox.Show(this.cantidad.ToString()); PARA VER
 }
コード例 #13
0
        private void actualizarPrecio()
        {
            double precio = Venta.CalcularPrecioFinal(producto.Precio, getIntFromNumericUpDown());

            this.lblPrecioFinal.Text = (String.Format("${0:#,0.00}", precio));
        }
コード例 #14
0
 private void numericUpDownCantidad_ValueChanged(object sender, EventArgs e)
 {
     lblPrecioFinal.Text = String.Format("Precio Final: $ {0:0.00}",
                                         Venta.CalcularPrecioFinal(producto.Precio, (int)numericUpDownCantidad.Value));
 }
コード例 #15
0
 private void numericUpDown1_ValueChanged(object sender, EventArgs e)
 {
     this.lblPrecioFinal.Text = Venta.CalcularPrecioFinal(aux.Precio, (int)this.numericUpDown1.Value).ToString();
 }