コード例 #1
0
        private void StockActual_PreviewKeyUp(object sender, KeyRoutedEventArgs e)
        {
            TextBox tb = (TextBox)sender;

            CloureManager.NumberInput(tb);
            ProductStock productStock = (ProductStock)((FrameworkElement)e.OriginalSource).DataContext;
            double       stock_actual = 0;

            double.TryParse(tb.Text, out stock_actual);
            productStock.Actual = stock_actual;
        }
コード例 #2
0
        private void txtCarritoCant_PreviewKeyUp(object sender, KeyRoutedEventArgs e)
        {
            double  cant    = 0;
            TextBox txtCant = (TextBox)sender;

            CloureManager.NumberInput(txtCant);

            double.TryParse(txtCant.Text, out cant);
            CartItem cartItem = (CartItem)((FrameworkElement)e.OriginalSource).DataContext;
            double   importe  = cartItem.Importe * cant;

            cartItem.Cantidad = cant;
            cartItem.Total    = importe;
            calcular_total();
        }
コード例 #3
0
 private void txtPrecioDesperdicio_TextChanged(object sender, TextChangedEventArgs e)
 {
     CloureManager.NumberInput(sender);
     CalcularDesperdicio();
 }