Exemplo n.º 1
0
        private bool Validar()
        {
            bool Validar = false;

            if (string.IsNullOrWhiteSpace(NombresTextBox.Text))
            {
                GeneralErrorProvider.SetError(NombresTextBox, "Debes llenar este campo");
                Validar = true;
            }

            if (string.IsNullOrWhiteSpace(NombreUsuarioTextBox.Text))
            {
                GeneralErrorProvider.SetError(NombreUsuarioTextBox, "Debes llenar este campo");
                Validar = true;
            }

            if (string.IsNullOrWhiteSpace(ClaveTextBox.Text))
            {
                GeneralErrorProvider.SetError(ClaveTextBox, "Debes llenar este campo");
                Validar = true;
            }

            if (string.IsNullOrWhiteSpace(CargosComboBox.Text))
            {
                GeneralErrorProvider.SetError(CargosComboBox, "Debes Elegir una opcion");
                Validar = true;
            }

            return(Validar);
        }
        private bool Validar(int validar) // VALIDAR
        {
            bool paso = false;

            if (validar == 1 && IdnumericUpDown.Value == 0)
            {
                GeneralErrorProvider.SetError(IdnumericUpDown, "Ingrese un ID");
                paso = true;
            }
            if (validar == 2 && DescripciontextBox.Text == string.Empty)
            {
                GeneralErrorProvider.SetError(DescripciontextBox, "Ingrese una descripcion");
                paso = true;
            }
            if (validar == 2 && PrecionumericUpDown.Value == 0)
            {
                GeneralErrorProvider.SetError(PrecionumericUpDown, "Ingrese un precio");
                paso = true;
            }
            if (validar == 2 && CantCotnumericUpDown.Text == string.Empty)
            {
                GeneralErrorProvider.SetError(CantCotnumericUpDown, "Ingrese la cantidad cotizada");
            }
            return(paso);
        }
Exemplo n.º 3
0
        private bool Validar()
        {
            bool Validar = false;

            if (string.IsNullOrWhiteSpace(DescripcionTextBox.Text))
            {
                GeneralErrorProvider.SetError(DescripcionTextBox, "Debes llenar la descripcion");
                Validar = true;
            }

            return(Validar);
        }
Exemplo n.º 4
0
        private bool Validar(int validar)
        {
            bool Validar = false;

            if (string.IsNullOrWhiteSpace(NombreTextBox.Text))
            {
                GeneralErrorProvider.SetError(NombreTextBox, "Favor Ingrese el nombre");
                Validar = true;
            }

            return(Validar);
        }
Exemplo n.º 5
0
        private bool Validar(int validar)
        {
            bool paso = false;

            if (validar == 2 && DescripcionTextBox.Text == string.Empty)
            {
                GeneralErrorProvider.SetError(DescripcionTextBox, "Ingrese una descripcion");
                paso = true;
            }

            return(paso);
        }
Exemplo n.º 6
0
        private bool Validar()
        {
            bool Validar = false;

            if (CantidadNumericUpDown2.Value == 0)
            {
                GeneralErrorProvider.SetError(CantidadNumericUpDown2, "Digite la Cantidad de entradas");
                Validar = true;
            }

            return(Validar);
        }
Exemplo n.º 7
0
        private bool Validar(int error)
        {
            bool paso = false;

            if (error == 1 && VentaIdNumericUpDown.Value == 0)
            {
                GeneralErrorProvider.SetError(VentaIdNumericUpDown,
                                              "Favor Introduzca Un Id");
                paso = true;
            }

            if (error == 2 && string.IsNullOrEmpty(DescripcionTextBox.Text))
            {
                GeneralErrorProvider.SetError(DescripcionTextBox,
                                              "Es obligatorio Agregar una Descripcion");
                paso = true;
            }

            if (error == 2 && (UsuariosComboBox.SelectedIndex < 0))
            {
                GeneralErrorProvider.SetError(UsuariosComboBox,
                                              "Agrege El usuario");
                paso = true;
            }

            if (error == 2 && (ProductoComboBox.SelectedIndex < 0))
            {
                GeneralErrorProvider.SetError(ProductoComboBox,
                                              "Agrege Un Producto");
                paso = true;
            }

            if (error == 2 && VentaDetalleDataGridView.RowCount == 0)
            {
                GeneralErrorProvider.SetError(VentaDetalleDataGridView,
                                              "Es obligatorio Agregar un Producto");
                paso = true;
            }

            if (error == 3 && string.IsNullOrEmpty(ImporteTextBox.Text))
            {
                GeneralErrorProvider.SetError(ImporteTextBox,
                                              "Es obligatorio Agregar un Producto");
                paso = true;
            }

            return(paso);
        }
Exemplo n.º 8
0
        private bool Validar(int error)
        {
            bool errores = false;

            if (error == 1 && TallerIdNumericUpDown.Value == 0)
            {
                GeneralErrorProvider.SetError(TallerIdNumericUpDown, "Introduzcca un Id");
                errores = true;
            }

            if (error == 2 && string.IsNullOrEmpty(NombretextBox.Text))
            {
                GeneralErrorProvider.SetError(NombretextBox, "Introduzca un Nombre");
                errores = true;
            }
            return(errores);
        }
        private bool validar(int error)
        {
            bool errores = false;

            if (error == 1 && EntradaIdNumericUpDown.Value == 0)
            {
                GeneralErrorProvider.SetError(EntradaIdNumericUpDown, "Introduzca un Id");
                errores = true;
            }

            if (error == 2 && CantidadNumericUpDown.Value == 0)
            {
                GeneralErrorProvider.SetError(CantidadNumericUpDown, "Introduzca un Nombre");
                errores = true;
            }
            return(errores);
        }
Exemplo n.º 10
0
        private bool Validar(int error)
        {
            bool paso = false;
            int  num  = 0;

            if (error == 1 && string.IsNullOrEmpty(CriterioTextBox.Text))
            {
                GeneralErrorProvider.SetError(CriterioTextBox, "Por Favor, Llenar Casilla!");
                paso = true;
            }
            if (error == 2 && int.TryParse(CriterioTextBox.Text, out num) == false)
            {
                GeneralErrorProvider.SetError(CriterioTextBox, "Ingrese un Numero");
                paso = true;
            }

            return(paso);
        }
Exemplo n.º 11
0
        private bool validar(int error)
        {
            bool paso = false;

            if (error == 1 && vehiculoIdNumericUpDown.Value == 0)
            {
                GeneralErrorProvider.SetError(vehiculoIdNumericUpDown,
                                              "Introduzca un Id");
                paso = true;
            }

            if (error == 2 && string.IsNullOrEmpty(DescripcionTextBox.Text))
            {
                GeneralErrorProvider.SetError(DescripcionTextBox,
                                              "Introduzca una Descripcion");
                paso = true;
            }

            return(paso);
        }
Exemplo n.º 12
0
        private bool Validar(int error)
        {
            bool paso = false;

            if (error == 1 && UsuarioIdNumericUpDown.Value == 0)
            {
                GeneralErrorProvider.SetError(UsuarioIdNumericUpDown,
                                              "Introduzca Id");
                paso = true;
            }

            if (error == 2 && string.IsNullOrEmpty(NombresTextBox.Text))
            {
                GeneralErrorProvider.SetError(NombresTextBox,
                                              "Introduzca El Nombre");
                paso = true;
            }

            if (error == 2 && string.IsNullOrEmpty(UsuarioTextBox.Text))
            {
                GeneralErrorProvider.SetError(UsuarioTextBox,
                                              "Introduzca Nombre De Usuario");
                paso = true;
            }

            if (error == 2 && string.IsNullOrEmpty(ClaveTextBox.Text))
            {
                GeneralErrorProvider.SetError(ClaveTextBox,
                                              "Introduzca La Contraseña");
                paso = true;
            }

            if (error == 3 && ClaveTextBox.Text != VerificarClaveTextBox.Text)
            {
                GeneralErrorProvider.SetError(VerificarClaveTextBox,
                                              "Confirme La Contraseña");
                paso = true;
            }

            return(paso);
        }
Exemplo n.º 13
0
        private bool Validar(int error)
        {
            bool paso = false;

            if (error == 1 && ProductoIdNumericUpDown.Value == 0)
            {
                GeneralErrorProvider.SetError(ProductoIdNumericUpDown,
                                              "Introduzca Id");
                paso = true;
            }

            if (error == 2 && PrecioNumericUpDown.Value == 0)
            {
                GeneralErrorProvider.SetError(PrecioNumericUpDown,
                                              "Introduzca El Precio");
                paso = true;
            }

            if (error == 2 && GananciaNumericUpDown.Value == 0)
            {
                GeneralErrorProvider.SetError(GananciaNumericUpDown,
                                              "Introduzca La Ganancia");
                paso = true;
            }

            if (error == 2 && CostoNumericUpDown.Value == 0)
            {
                GeneralErrorProvider.SetError(CostoNumericUpDown,
                                              "Introduzca El Costo");
                paso = true;
            }

            if (error == 2 && string.IsNullOrEmpty(DescripcionTextBox.Text))
            {
                GeneralErrorProvider.SetError(DescripcionTextBox,
                                              "Introduzca La Descripcion");
                paso = true;
            }

            return(paso);
        }
Exemplo n.º 14
0
        private bool Validar(int error)
        {
            bool paso = false;

            if (error == 1 && MantenimientoIdNumericUpDown.Value == 0)
            {
                GeneralErrorProvider.SetError(MantenimientoIdNumericUpDown,
                                              "Favor Introduzca Un Id");
                paso = true;
            }
            if (error == 2 && string.IsNullOrWhiteSpace(SubtotalTextBox.Text))
            {
                GeneralErrorProvider.SetError(SubtotalTextBox,
                                              "Favor Introducir SubTotal!");
                paso = true;
            }
            if (error == 2 && string.IsNullOrWhiteSpace(ITBISTextBox.Text))
            {
                GeneralErrorProvider.SetError(ITBISTextBox,
                                              "Favor Introducir ITBIS!");
                paso = true;
            }

            if (error == 2 && DetalleDataGridView.RowCount == 0)
            {
                GeneralErrorProvider.SetError(DetalleDataGridView,
                                              "Es obligatorio Agregar un Articulo");
                paso = true;
            }

            if (error == 3 && string.IsNullOrEmpty(ImporteTextBox.Text))
            {
                GeneralErrorProvider.SetError(ImporteTextBox,
                                              "Es obligatorio Agregar un Articulo");
                paso = true;
            }

            return(paso);
        }
Exemplo n.º 15
0
        private bool Validar()
        {
            bool Validar = false;

            if (string.IsNullOrWhiteSpace(NombresTextBox.Text))
            {
                GeneralErrorProvider.SetError(NombresTextBox, "Debes llenar este campo");
                Validar = true;
            }

            if (string.IsNullOrWhiteSpace(SexoComboBox.Text))// ojo cuando es combobox es .text preguntar
            {
                GeneralErrorProvider.SetError(SexoComboBox, "Debes llenar este campo");
                Validar = true;
            }

            if (string.IsNullOrWhiteSpace(CedulaMaskedTextBox.Text))
            {
                GeneralErrorProvider.SetError(CedulaMaskedTextBox, "Debes llenar este campo");
                Validar = true;
            }

            if (string.IsNullOrWhiteSpace(DireccionTextBox.Text))
            {
                GeneralErrorProvider.SetError(DireccionTextBox, "Debes llenar este campo");
                Validar = true;
            }

            if (string.IsNullOrWhiteSpace(NumeroCelularMaskedTextBox.Text))
            {
                GeneralErrorProvider.SetError(NumeroCelularMaskedTextBox, "Debes llenar este campo");
                Validar = true;
            }

            return(Validar);
        }