コード例 #1
0
        public bool Validar()
        {
            bool Error = false;



            if (String.IsNullOrWhiteSpace(nombresTextBox.Text))
            {
                GeneralerrorProvider.SetError(nombresTextBox, "Llenar Casilla de Nombre");
                Error = true;
            }

            if (String.IsNullOrWhiteSpace(telefonoMaskedTextBox.Text))
            {
                GeneralerrorProvider.SetError(telefonoMaskedTextBox, "Llenar Casilla de Telefono");
                Error = true;
            }

            if (String.IsNullOrWhiteSpace(cedulaMaskedTextBox.Text))
            {
                GeneralerrorProvider.SetError(cedulaMaskedTextBox, "Llenar Casilla de Nombre");
                Error = true;
            }

            if (String.IsNullOrWhiteSpace(direccionTextBox.Text))
            {
                GeneralerrorProvider.SetError(direccionTextBox, "Llenar Casilla de Direccion");
                Error = true;
            }


            return(Error);
        }
コード例 #2
0
        private bool Validar(int validar)
        {
            bool paso = false;

            if (validar == 1 && GrupoIdnumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(GrupoIdnumericUpDown, "Ingrese un ID");
                paso = true;
            }
            if (validar == 2 && descripcionTextBox.Text == String.Empty)
            {
                GeneralerrorProvider.SetError(descripcionTextBox, "digite una  Descripcion");
                paso = true;
            }
            if (validar == 2 && CantidadnumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(CantidadnumericUpDown, "Ingrese Cantidad");
                paso = true;
            }
            if (validar == 2 && GDeseadosnumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(GDeseadosnumericUpDown, "Ingrese el Precio");
                paso = true;
            }
            return(paso);
        }
コード例 #3
0
        //


        public bool ValidarGuardar()
        {
            bool Error = false;

            if (String.IsNullOrEmpty(nombreTextBox.Text))
            {
                GeneralerrorProvider.SetError(nombreTextBox, "Llenar Casilla de Nombre");
                Error = true;
            }


            if (String.IsNullOrEmpty(descripcionTextBox.Text))
            {
                GeneralerrorProvider.SetError(descripcionTextBox, "Llenar Casilla de Direccion");
                Error = true;
            }


            if (cantidadNumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(cantidadNumericUpDown, "Llenar Casilla de Cantidad");
                Error = true;
            }


            if (String.IsNullOrEmpty(precioTextBox.Text))
            {
                GeneralerrorProvider.SetError(precioTextBox, "Llenar Casilla de Cantidad");
                Error = true;
            }


            return(Error);
        }
コード例 #4
0
        private bool Validar(int valida)
        {
            bool paso = false;

            if (valida == 1 && TipoId_numericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(TipoId_numericUpDown, "Digite un ID");
                paso = true;
            }
            if (valida == 2 && LibroId_numericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(LibroId_numericUpDown, "Digite un ID");
                paso = true;
            }
            if (valida == 2 && Siglas_textBox.Text == string.Empty)
            {
                GeneralerrorProvider.SetError(Siglas_textBox, "Digite una sigla");
                paso = true;
            }
            if (valida == 2 && Descripcion_textBox.Text == string.Empty)
            {
                GeneralerrorProvider.SetError(Descripcion_textBox, "Digite una Descripcion");
                paso = true;
            }
            return(paso);
        }
コード例 #5
0
        public bool Validar(int validar)
        {
            bool paso = false;

            if (validar == 1 && IdnumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(IdnumericUpDown, "Introduzca un ID");
                paso = true;
            }
            if (validar == 2 && DescripciontextBox.Text == string.Empty)
            {
                GeneralerrorProvider.SetError(DescripciontextBox, "Introduzca el nombre del grupo");
                paso = true;
            }
            if (validar == 1 && CantidadnumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(CantidadnumericUpDown, "Introduzca una cantidad de estudiantes");
            }
            if (validar == 1 && GruposnumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(GruposnumericUpDown, "Introduzca la cantidad de grupos");
            }

            return(paso);
        }
コード例 #6
0
        private bool Validar()
        {
            bool HayErrores = false;

            if (String.IsNullOrWhiteSpace(TelefonomaskedTextBox.Text))
            {
                GeneralerrorProvider.SetError(TelefonomaskedTextBox,
                                              "No debes dejar el telefono vacio");
                HayErrores = true;
            }
            if (String.IsNullOrWhiteSpace(NombretextBox.Text))
            {
                GeneralerrorProvider.SetError(NombretextBox,
                                              "No debes dejar el nombre vacio");
                HayErrores = true;
            }
            if (String.IsNullOrWhiteSpace(DirecciontextBox.Text))
            {
                GeneralerrorProvider.SetError(DirecciontextBox,
                                              "No debes dejar la direccion vacia");
                HayErrores = true;
            }
            if (String.IsNullOrWhiteSpace(CedulamaskedTextBox.Text))
            {
                GeneralerrorProvider.SetError(CedulamaskedTextBox,
                                              "No debes dejar la cedula vacia");
                HayErrores = true;
            }

            return(HayErrores);
        }
コード例 #7
0
ファイル: Registro.cs プロジェクト: EudyCabral/Primer-Parcial
        public bool validar(int error)
        {
            bool paso = false;

            if (error == 1 && grupoidNumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(grupoidNumericUpDown, "Llenar Grupo ID");
                paso = true;
            }


            if (error == 2 && string.IsNullOrEmpty(descripcionTextBox.Text))
            {
                GeneralerrorProvider.SetError(descripcionTextBox, "Lllenar Descripcion");
                paso = false;
            }

            if (error == 2 && cantidadNumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(cantidadNumericUpDown, "Llenar Cantidad De Estudiantes");
                paso = true;
            }
            if (error == 2 && grupoNumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(grupoNumericUpDown, "Llenar Existencia");
                paso = true;
            }

            return(paso);
        }
コード例 #8
0
        public bool validar(int error)
        {
            bool paso = false;

            if (error == 1 && personaIdNumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(personaIdNumericUpDown, "Llenar Persona ID");
                paso = true;
            }


            if (error == 2 && string.IsNullOrEmpty(nombresTextBox.Text))
            {
                GeneralerrorProvider.SetError(nombresTextBox, "Llenar Nombre");
                paso = false;
            }

            if (error == 2 && string.IsNullOrEmpty(cedulaTextBox.Text))
            {
                GeneralerrorProvider.SetError(cedulaTextBox, "Llenar Cedula");
                paso = true;
            }
            if (error == 2 && string.IsNullOrEmpty(direccionTextBox.Text))
            {
                GeneralerrorProvider.SetError(direccionTextBox, "Llenar Direccion");
                paso = true;
            }

            return(paso);
        }
コード例 #9
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, "Debe Digitar un Numero");
                paso = true;
            }

            if (error == 3 && int.TryParse(CriteriotextBox.Text, out num) == true)
            {
                GeneralerrorProvider.SetError(CriteriotextBox, "Debe Digitar Caracteres");
                paso = true;
            }

            if (error == 4 && int.TryParse(CriteriotextBox.Text, out num) == true)
            {
                GeneralerrorProvider.SetError(CriteriotextBox, "Debe usar los Guiones");
                paso = true;
            }

            return(paso);
        }
コード例 #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, "Debe Digitar un Numero");
                paso = true;
            }

            if (error == 3 && int.TryParse(CriteriotextBox.Text, out num) == true)
            {
                GeneralerrorProvider.SetError(CriteriotextBox, "Debe Digitar Caracteres");
                paso = true;
            }

            if (error == 4 && cobroIdNumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(cobroIdNumericUpDown, "Llenar Cobro Id Id");
                paso = true;
            }

            if (error == 5 && int.TryParse(PagosTextBox.Text, out num) == false)
            {
                GeneralerrorProvider.SetError(PagosTextBox, "Debe Digitar numeros");
                paso = true;
            }
            return(paso);
        }
コード例 #11
0
        private bool Validar(int validar)
        {
            bool paso = false;

            if (validar == 1 && ArticuloIdnumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(ArticuloIdnumericUpDown, "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 && ExistencianumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(ExistencianumericUpDown, "Ingrese la Existencia del Articulo");
                paso = true;
            }
            if (validar == 2 && CCnumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(CCnumericUpDown, "Ingrese la cantidad cotizada");
                paso = true;
            }
            return(paso);
        }
        private bool validar(int error)
        {
            bool errores = false;

            if (error == 1 && libroIdNumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(libroIdNumericUpDown, "Llenar  Libros ID");
                errores = true;
            }

            if (error == 2 && string.IsNullOrWhiteSpace(descripcionTextBox.Text))
            {
                GeneralerrorProvider.SetError(descripcionTextBox, "Llene Descripcion");
                errores = true;
            }

            if (error == 2 && string.IsNullOrWhiteSpace(siglasTextBox.Text))
            {
                GeneralerrorProvider.SetError(siglasTextBox, "Llene Siglas");
                errores = true;
            }

            if (error == 2 && string.IsNullOrWhiteSpace(tipoTextBox.Text))
            {
                GeneralerrorProvider.SetError(tipoTextBox, "Llene Tipo");
                errores = true;
            }



            return(errores);
        }
コード例 #13
0
        private bool validar(int error)
        {
            bool errores = false;
            int  num     = 0;

            if (error == 1 && articuloIdNumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(articuloIdNumericUpDown, "Llenar Articulos Id");
                errores = true;
            }


            if (error == 2 && string.IsNullOrEmpty(nombreTextBox.Text))
            {
                GeneralerrorProvider.SetError(nombreTextBox, "Llene Nombre");
                errores = true;
            }

            if (error == 3 && int.TryParse(nombreTextBox.Text, out num) == true)
            {
                GeneralerrorProvider.SetError(nombreTextBox, "Debe Digitar Caracteres");
                errores = true;
            }

            return(errores);
        }
コード例 #14
0
        private bool validar(int error)
        {
            bool errores = false;
            int  num     = 0;

            if (error == 1 && clienteIdNumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(clienteIdNumericUpDown, "Llenar Cliente Id");
                errores = true;
            }

            if (error == 2 && string.IsNullOrWhiteSpace(direccionTextBox.Text))
            {
                GeneralerrorProvider.SetError(direccionTextBox, "Llene Direccion");
                errores = true;
            }

            if (error == 2 && cedulaMaskedTextBox.MaskFull == false)
            {
                GeneralerrorProvider.SetError(cedulaMaskedTextBox, "Completar los campos");

                errores = true;
            }

            if (error == 2 && telefonoMaskedTextBox.MaskFull == false)
            {
                GeneralerrorProvider.SetError(telefonoMaskedTextBox, "Completar los campos");

                errores = true;
            }

            if (error == 2 && string.IsNullOrWhiteSpace(cedulaMaskedTextBox.Text))
            {
                GeneralerrorProvider.SetError(cedulaMaskedTextBox, "Llene cedula");
                errores = true;
            }

            if (error == 2 && string.IsNullOrWhiteSpace(telefonoMaskedTextBox.Text))
            {
                GeneralerrorProvider.SetError(telefonoMaskedTextBox, "Llene telefono");
                errores = true;
            }

            if (error == 2 && string.IsNullOrEmpty(nombreTextBox.Text))
            {
                GeneralerrorProvider.SetError(nombreTextBox, "Llene nombre");
                errores = true;
            }
            if (error == 3 && int.TryParse(nombreTextBox.Text, out num) == true)
            {
                GeneralerrorProvider.SetError(nombreTextBox, "Debe Digitar Caracteres");
                errores = true;
            }


            return(errores);
        }
コード例 #15
0
        private bool validar(int error)
        {
            bool errores = false;
            int  num     = 0;

            if (error == 1 && usuariosIdNumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(usuariosIdNumericUpDown, "Llenar Usuario Id");
                errores = true;
            }

            if (error == 2 && string.IsNullOrWhiteSpace(nombreTextBox.Text))
            {
                GeneralerrorProvider.SetError(nombreTextBox, "Llene Nombre");
                errores = true;
            }

            if (error == 2 && string.IsNullOrWhiteSpace(usuarioTextBox.Text))
            {
                GeneralerrorProvider.SetError(usuarioTextBox, "Llene Usuario");
                errores = true;
            }

            if (error == 2 && string.IsNullOrWhiteSpace(contraseñaTextBox.Text))
            {
                GeneralerrorProvider.SetError(contraseñaTextBox, "Llene contraseña");
                errores = true;
            }

            if (error == 2 && string.IsNullOrWhiteSpace(ConfirmartextBox.Text))
            {
                GeneralerrorProvider.SetError(ConfirmartextBox, "Llene contraseña");
                errores = true;
            }

            if (error == 2 && string.IsNullOrEmpty(tipodeusuarioComboBox.Text))
            {
                GeneralerrorProvider.SetError(tipodeusuarioComboBox, "Llene Tipo de Usuario");
                errores = true;
            }
            if (error == 3 && int.TryParse(nombreTextBox.Text, out num) == true)
            {
                GeneralerrorProvider.SetError(nombreTextBox, "Debe Digitar Caracteres");
                errores = true;
            }

            if (error == 4 && contraseñaTextBox.Text != ConfirmartextBox.Text)
            {
                GeneralerrorProvider.SetError(ConfirmartextBox, "Llenar Confirmar Contraseña");
                errores = true;
            }


            return(errores);
        }
コード例 #16
0
        public bool ValidarBE()
        {
            bool Error = false;

            if (personaIdNumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(personaIdNumericUpDown, "Llenar Casilla Persona ID");
                Error = true;
            }
            return(Error);
        }
コード例 #17
0
        private bool Validar()
        {
            bool error = false;

            if (articuloIdNumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(articuloIdNumericUpDown, "Llenar Casilla Persona ID");
                error = true;
            }

            return(error);
        }
        private bool validar(int error)
        {
            bool    errores = false;
            decimal num     = 0;
            int     n       = 0;

            if (error == 1 && entradadeActivosIdNumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(entradadeActivosIdNumericUpDown, "Llenar Entrada Id");
                errores = true;
            }


            if (error == 2 && string.IsNullOrWhiteSpace(motivoTextBox.Text))
            {
                GeneralerrorProvider.SetError(motivoTextBox, "Llene Motivo");
                errores = true;
            }



            if (error == 2 && string.IsNullOrWhiteSpace(sumaTextBox.Text))
            {
                GeneralerrorProvider.SetError(sumaTextBox, "Llene suma");
                errores = true;
            }



            if (error == 3 && decimal.TryParse(sumaTextBox.Text, out num) == false)
            {
                GeneralerrorProvider.SetError(sumaTextBox, "Debe Digitar un monto");
                errores = true;
            }

            if (error == 4 && Convert.ToDecimal(sumaTextBox.Text) == 0)
            {
                GeneralerrorProvider.SetError(sumaTextBox, "Debe Digitar un monto");
                errores = true;
            }

            if (error == 5 && int.TryParse(motivoTextBox.Text, out n) == true)
            {
                GeneralerrorProvider.SetError(motivoTextBox, "Debe Digitar Caracteres");
                errores = true;
            }


            return(errores);
        }
コード例 #19
0
        private bool validar(int error)
        {
            bool errores = false;

            if (error == 1 && articulosIdNumericUpDown.Value == 0)
            {
                GeneralerrorProvider.SetError(articulosIdNumericUpDown, "Llenar ArticulosId Id");
                errores = true;
            }

            if (error == 2 && string.IsNullOrWhiteSpace(precioTextBox.Text))
            {
                GeneralerrorProvider.SetError(precioTextBox, "Llene precio");
                errores = true;
            }

            if (error == 2 && string.IsNullOrWhiteSpace(gananciaTextBox.Text))
            {
                GeneralerrorProvider.SetError(gananciaTextBox, "Llene Ganancia");
                errores = true;
            }

            if (error == 2 && string.IsNullOrWhiteSpace(costoTextBox.Text))
            {
                GeneralerrorProvider.SetError(costoTextBox, "Llene Costo");
                errores = true;
            }

            if (error == 2 && string.IsNullOrEmpty(descripcionTextBox.Text))
            {
                GeneralerrorProvider.SetError(descripcionTextBox, "Llene Descripcion");
                errores = true;
            }
            if (error == 2 && string.IsNullOrEmpty(descripcionTextBox.Text))
            {
                GeneralerrorProvider.SetError(descripcionTextBox, "Llene Descripcion");
                errores = true;
            }

            if (error == 2 && string.IsNullOrEmpty(inventarioTextBox.Text))
            {
                GeneralerrorProvider.SetError(inventarioTextBox, "Llene Inventario");
                errores = true;
            }


            return(errores);
        }
コード例 #20
0
        private bool HayErrores()
        {
            bool HayErrores = false;

            if (String.IsNullOrWhiteSpace(ObservaciontextBox.Text))
            {
                GeneralerrorProvider.SetError(ObservaciontextBox,
                                              "No debes dejar el Comentario vacio");
                HayErrores = true;
            }

            if (String.IsNullOrWhiteSpace(CanttextBox.Text))
            {
                GeneralerrorProvider.SetError(CanttextBox,
                                              "Debes introducir una cantidad");
                HayErrores = true;
            }

            if (String.IsNullOrWhiteSpace(PreciotextBox.Text))
            {
                GeneralerrorProvider.SetError(PreciotextBox,
                                              "Debes introducir un precio");
                HayErrores = true;
            }

            if (String.IsNullOrWhiteSpace(ImportetextBox.Text))
            {
                GeneralerrorProvider.SetError(ImportetextBox,
                                              "Debes introducir un importe");
                HayErrores = true;
            }

            if (CotizaciondataGridView.RowCount == 0)
            {
                GeneralerrorProvider.SetError(CotizaciondataGridView,
                                              "Es obligatorio este campo");
                HayErrores = true;
            }

            return(HayErrores);
        }