Пример #1
0
 private void PrecioNumericUpDown_ValueChanged(object sender, EventArgs e)
 {
     if (CostoNumericUpDown.Value != 0)
     {
         GananciasNumericUpDown.Value = CalculosBLL.CalcularGanancias(PrecioNumericUpDown.Value, CostoNumericUpDown.Value);
     }
 }
Пример #2
0
        private void LlenaImporte()
        {
            int cantidad, precio;

            cantidad            = Utils.ToInt(cantidadTextBox.Text);
            precio              = Utils.ToInt(precioTextBox.Text);
            importeTextBox.Text = CalculosBLL.CalcularImporte(cantidad, precio).ToString();
        }
Пример #3
0
        private string SubTotal()
        {
            decimal monto = 0;

            foreach (var item in factura.Detalles)
            {
                monto += CalculosBLL.CalcularSubTotal(item.Importe);
            }
            return(MontoTextBox.Text = monto.ToString());
        }
Пример #4
0
 protected void GanaciasTextBox_TextChanged(object sender, EventArgs e)
 {
     if (GanaciasTextBox.Text != "")
     {
         var precio = CalculosBLL.CalcularPrecio(Utils.ToDecimal(CostoTextBox.Text), Utils.ToDecimal(GanaciasTextBox.Text));
     }
     else
     {
         PrecioTextBox.Text = "";
     }
 }
Пример #5
0
 protected void ImporteTextBox_TextChanged(object sender, EventArgs e)
 {
     if (ImporteTextBox.Text != "")
     {
         MontoTextBox.Text = CalculosBLL.CalcularSubTotal(Utils.ToDecimal(ImporteTextBox.Text)).ToString();
     }
     else
     {
         MontoTextBox.Text = "";
     }
 }
Пример #6
0
 private Decimal Devuelta()
 {
     if (EfectivoNumericUpDown.Value != 0 && TotalNumericUpDown.Value != 0)
     {
         return(DevueltaNumericUpDown.Value = CalculosBLL.CalcularDevuelta(EfectivoNumericUpDown.Value, TotalNumericUpDown.Value));
     }
     else
     {
         return(DevueltaNumericUpDown.Value = 0);
     }
 }
Пример #7
0
 //calculandp total
 private Decimal Total()
 {
     if (SubTotalNumericUpDown.Value != 0 && ItbisNumericUpDown.Value != 0)
     {
         return(TotalNumericUpDown.Value = CalculosBLL.CalcularTotal(SubTotalNumericUpDown.Value, ItbisNumericUpDown.Value));
     }
     else
     {
         return(TotalNumericUpDown.Value = 0);
     }
 }
Пример #8
0
 //calculando itbis
 private Decimal Itbis()
 {
     if (SubTotalNumericUpDown.Value != 0)
     {
         return(ItbisNumericUpDown.Value = CalculosBLL.CalcularItbis(SubTotalNumericUpDown.Value));
     }
     else
     {
         return(ItbisNumericUpDown.Value = 0);
     }
 }
Пример #9
0
 //calcualando subtotal
 private Decimal SubTotal()
 {
     if (ImporteNumericUpDown.Value != 0)
     {
         return(SubTotalNumericUpDown.Value += CalculosBLL.CalcularSubTotal(ImporteNumericUpDown.Value));
     }
     else
     {
         return(SubTotalNumericUpDown.Value = 0);
     }
 }
Пример #10
0
 //calculando importe
 private Decimal Importe()
 {
     if (CantidadNumericUpDown.Value != 0 && PrecioNumericUpDown.Value != 0)
     {
         return(ImporteNumericUpDown.Value = CalculosBLL.CalcularImporte(CantidadNumericUpDown.Value, PrecioNumericUpDown.Value));
     }
     else
     {
         return(ImporteNumericUpDown.Value = 0);
     }
 }
Пример #11
0
 private void GananciasNumericUpDown_ValueChanged(object sender, EventArgs e)
 {
     if (GananciasNumericUpDown.Value > 100)
     {
         MyErrorProvider.SetError(GananciasNumericUpDown, "Error");
         return;
     }
     else
     {
         PrecioNumericUpDown.Value = CalculosBLL.CalcularPrecio(CostoNumericUpDown.Value, GananciasNumericUpDown.Value);
     }
 }
Пример #12
0
        protected void PrecioTextBox_TextChanged(object sender, EventArgs e)
        {
            if (CostoTextBox.Text != "" && PrecioTextBox.Text != "")
            {
                var ganacias = CalculosBLL.CalcularGanancias(Utils.ToDecimal(PrecioTextBox.Text), Utils.ToDecimal(CostoTextBox.Text));

                GanaciasTextBox.Text = ganacias.ToString();
            }

            else
            {
                GanaciasTextBox.Text = "";
            }
        }
Пример #13
0
 protected void CantidadTextBox_TextChanged(object sender, EventArgs e)
 {
     ImporteTextBox.Text = CalculosBLL.CalcularImporte(Utils.ToDecimal(CantidadTextBox.Text), Utils.ToDecimal(PrecioTextBox.Text)).ToString();
 }