Exemple #1
0
 private bool Validaciones()
 {
     if (txtVenta.Text.Trim() != string.Empty && LTienda.esNum(txtVenta.Text.Trim()))
     {
         int venta = int.Parse(txtVenta.Text);
         if (t1.Cantidad >= venta && venta != 0)
         {
             return(true);
         }
         else
         {
             MessageBox.Show("Cantidad insuficiente");
         }
     }
     return(false);
 }
Exemple #2
0
        private bool validaciones()
        {
            Espacios();
            if (txtNombre.Text != string.Empty)
            {
                if (txtPrecio.Text != string.Empty && LTienda.esNumF(txtPrecio.Text))
                {
                    if (txtCantidad.Text != string.Empty && LTienda.esNum(txtCantidad.Text))
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }