private bool VerificarCantidadProducto() { if (string.IsNullOrEmpty(txtCodigoBarra.Text) == false || string.IsNullOrEmpty(txtDescripcion.Text) == false || string.IsNullOrEmpty(txtPrecioVenta.Text) == false || string.IsNullOrEmpty(txtCantidad.Text) == false) { //verificar cant de producto var result = productosNegocio.BuscarCantidadProductosPorCodigoBarra(codigoBarra).FirstOrDefault(); if (result != null) { existenciaProd = result.Existencia; if (ConfirmarCant(existenciaProd)) { return(true); } } else { MessageBox.Show(string.Format("El Producto con Codigo de Barra: {0} No Existe en almacen...", txtCodigoBarra.Text), "El Producto No Existe", MessageBoxButtons.OK, MessageBoxIcon.Error); } } return(false); }