Ejemplo n.º 1
0
        private void CalcularGanancia()
        {
            double costo, precio;

            costo  = ToDouble(CostoTextBox.Text);
            precio = ToDouble(PrecioTextBox.Text);
            PctGananciaTextBox.Text = ArticulosBLL.PorcientoGanancia(costo, precio).ToString();
        }
 private void CostonumericUpDown_ValueChanged(object sender, EventArgs e)
 {
     //--------------- BUSCAR PORCENTAGE
     if (Convert.ToDecimal(PrecionumericUpDown.Value) != 0)
     {
         if (Convert.ToDecimal(CostonumericUpDown.Value) != 0)
         {
             GanancianumericUpDown.Value = ArticulosBLL.PorcientoGanancia(Convert.ToDecimal(PrecionumericUpDown.Value), Convert.ToDecimal(CostonumericUpDown.Value));
         }
     }
     // --------------- BUSCAR PRECIO
     if (Convert.ToDecimal(GanancianumericUpDown.Value) != 0)
     {
         if (Convert.ToDecimal(CostonumericUpDown.Value) != 0)
         {
             PrecionumericUpDown.Value = ArticulosBLL.Precio(Convert.ToDecimal(CostonumericUpDown.Value), Convert.ToDecimal(GanancianumericUpDown.Value));
         }
     }
 }