private void NuevoButton_Click(object sender, EventArgs e)
 {
     ProductoIdNumericUpDown.Value = 0;
     DescripcionTextBox.Clear();
     GananciaNumericUpDown.Value = 0;
     CostoNumericUpDown.Value    = 0;
     PrecioNumericUpDown.Value   = 0;
     FechaIngresoDateTimePicker.ResetText();
     InventarioNumericUpDown.Value = 0;
 }
        private void BuscarButton_Click(object sender, EventArgs e)
        {
            int       id        = Convert.ToInt32(ProductoIdNumericUpDown.Value);
            Productos productos = BLL.ProductosBLL.Buscar(id);

            if (productos != null)
            {
                ProductoIdNumericUpDown.Value = productos.ProductoId;
                DescripcionTextBox.Text       = productos.Descripcion;
                GananciaNumericUpDown.Value   = Convert.ToDecimal(productos.Ganancia);
                CostoNumericUpDown.Value      = Convert.ToDecimal(productos.Costo);
                PrecioNumericUpDown.Value     = Convert.ToDecimal(productos.Precio);
                FechaIngresoDateTimePicker.ResetText();
                InventarioNumericUpDown.Value = Convert.ToDecimal(productos.Inventario);
            }
            else
            {
                MessageBox.Show("no se encontro", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            GeneralErrorProvider1.Clear();
        }