예제 #1
0
 private void AppButtonAgregar_Click(object sender, RoutedEventArgs e)
 {
     int cantidad = int.Parse(TextBoxCantidadProductos.Text);
     ProductoCantidad pc = new ProductoCantidad() { Producto = tmpProduct, Cantidad = cantidad };
     double PrecioU = GetPrecio(pc);
     double PrecioT = PrecioU * cantidad;
     NuevoRequestProduct = new RequestProduct {PName = tmpProduct.Name, PNItems =  cantidad, PPriceU = PrecioU, PPriceT = PrecioT, PurlImage = tmpProduct.Pictures.FirstOrDefault().URL};
     Pedido.Pedidos.Add(NuevoRequestProduct);
     AppButtonAgregar.IsEnabled = false;
 }
        private void AppButtonAgregar_Click(object sender, RoutedEventArgs e)
        {
            int cantidad        = int.Parse(TextBoxCantidadProductos.Text);
            ProductoCantidad pc = new ProductoCantidad()
            {
                Producto = tmpProduct, Cantidad = cantidad
            };
            double PrecioU = GetPrecio(pc);
            double PrecioT = PrecioU * cantidad;

            NuevoRequestProduct = new RequestProduct {
                PName = tmpProduct.Name, PNItems = cantidad, PPriceU = PrecioU, PPriceT = PrecioT, PurlImage = tmpProduct.Pictures.FirstOrDefault().URL
            };
            Pedido.Pedidos.Add(NuevoRequestProduct);
            AppButtonAgregar.IsEnabled = false;
        }