private bool ValidarCampos()
        {
            bool val = true;

            if (txt_place.Text.Trim() == "")
            {
                val = false;
                Validaciones.SetError(txt_place, "Debe Ingresar un Lugar!");
            }
            else if ((!TextValidator.ValidarStringEntero(txt_place.Text) && !TextValidator.ValidarString(txt_place.Text)))
            {
                val = false;
                Validaciones.SetError(txt_place, "Debe ingresar un lugar valido!");
            }


            if (txt_hrs.Text.Trim() == "")
            {
                val = false;
                Validaciones.SetError(txt_hrs, "Debe ingresar las horas trabajadas!");
            }
            else if (!TextValidator.ValidarFloat(txt_hrs.Text))
            {
                val = false;
                Validaciones.SetError(txt_hrs, "Las hora pueden ser unicamente numeros!");
            }

            return(val);
        }
示例#2
0
        private bool ValidarCampos()
        {
            bool val = true;

            if (txt_Nombre.Text.Trim() == "")
            {
                val = false;
                Validaciones.SetError(txt_Nombre, "Debe Ingresar un Nombre!");
            }
            else if (!TextValidator.ValidarString(txt_Nombre.Text))
            {
                val = false;
                Validaciones.SetError(txt_Nombre, "El nombre debe contener unicamente letras!");
            }


            if (txt_Apellido.Text.Trim() == "")
            {
                val = false;
                Validaciones.SetError(txt_Apellido, "Debe Ingresar un Apellido!");
            }
            else if (!TextValidator.ValidarString(txt_Apellido.Text))
            {
                val = false;
                Validaciones.SetError(txt_Apellido, "El Apellido debe contener unicamente letras!");
            }

            if (txt_Telefono.Text.Trim() == "")
            {
                val = false;
                Validaciones.SetError(txt_Telefono, "Debe Ingresar un Telefono!");
            }
            else if (!TextValidator.ValidarTelefono(txt_Telefono.Text))
            {
                val = false;
                Validaciones.SetError(txt_Telefono, "Ingrese un telefono valido!");
            }


            if (txt_Domicilio.Text.Trim() == "")
            {
                val = false;
                Validaciones.SetError(txt_Domicilio, "Debe Ingresar un Domicilio!");
            }
            else if (!TextValidator.ValidarStringEntero(txt_Domicilio.Text))
            {
                val = false;
                Validaciones.SetError(txt_Domicilio, "Debe ingresar un domicilio valido!");
            }


            return(val);
        }
示例#3
0
        private bool ValidarCampos()
        {
            bool val = true;

            if (txt_Codigo.Text.Trim() == "")
            {
                val = false;
                Validaciones.SetError(txt_Codigo, "Debe ingresar un codigo!");
            }
            else if (!TextValidator.ValidarEntero(txt_Codigo.Text))
            {
                val = false;
                Validaciones.SetError(txt_Codigo, "El codigo es unicamente numerico");
            }

            if (txt_Producto.Text.Trim() == "")
            {
                val = false;
                Validaciones.SetError(txt_Producto, "Debe Ingresar un Producto!");
            }
            else if (!TextValidator.ValidarStringEntero(txt_Producto.Text) && (!TextValidator.ValidarString(txt_Producto.Text)))
            {
                val = false;
                Validaciones.SetError(txt_Producto, "Producto mal ingresado!");
            }

            if (txt_Precio.Text.Trim() == "")
            {
                val = false;
                Validaciones.SetError(txt_Precio, "Debe Ingresar un Precio para el producto!");
            }
            else if (!TextValidator.ValidarFloat(txt_Precio.Text))
            {
                val = false;
                Validaciones.SetError(txt_Precio, "El precio del producto debe ser numero y con 2 decimales");
            }

            return(val);
        }
示例#4
0
        private bool ValidarCampos()
        {
            bool val = true;

            if (txt_name.Text.Trim() == "")
            {
                val = false;
                Validaciones.SetError(txt_name, "Debe Ingresar un Nombre!");
            }
            else if (!TextValidator.ValidarString(txt_name.Text))
            {
                val = false;
                Validaciones.SetError(txt_name, "El nombre debe contener unicamente letras!");
            }


            if (txt_ape.Text.Trim() == "")
            {
                val = false;
                Validaciones.SetError(txt_ape, "Debe Ingresar un Apellido!");
            }
            else if (!TextValidator.ValidarString(txt_ape.Text))
            {
                val = false;
                Validaciones.SetError(txt_ape, "El Apellido debe contener unicamente letras!");
            }

            if (txt_tel.Text.Trim() == "")
            {
                val = false;
                Validaciones.SetError(txt_tel, "Debe Ingresar un Telefono!");
            }
            else if (!TextValidator.ValidarTelefono(txt_tel.Text))
            {
                val = false;
                Validaciones.SetError(txt_tel, "Ingrese un telefono valido!");
            }


            if (txt_dom.Text.Trim() == "")
            {
                val = false;
                Validaciones.SetError(txt_dom, "Debe Ingresar un Domicilio!");
            }
            else if (!TextValidator.ValidarStringEntero(txt_dom.Text))
            {
                val = false;
                Validaciones.SetError(txt_dom, "Debe ingresar un domicilio valido!");
            }

            if (txt_doc.Text.Trim() == "")
            {
                val = false;
                Validaciones.SetError(txt_doc, "Debe Ingresar un documento!");
            }
            else if (!TextValidator.ValidarEntero(txt_doc.Text))
            {
                val = false;
                Validaciones.SetError(txt_doc, "Debe ingresar un documento valido!");
            }

            if (txt_mat.Text.Trim() == "")
            {
                val = false;
                Validaciones.SetError(txt_mat, "Debe Ingresar una matricula!");
            }
            else if (!TextValidator.ValidarEntero(txt_mat.Text))
            {
                val = false;
                Validaciones.SetError(txt_mat, "Debe ingresar una matricula valida!");
            }

            if (txt_mail.Text.Trim() == "")
            {
                val = false;
                Validaciones.SetError(txt_mail, "Debe Ingresar un mail!");
            }
            else if (!TextValidator.ValidarMail(txt_mail.Text))
            {
                val = false;
                Validaciones.SetError(txt_mail, "Debe ingresar un mail valido!");
            }

            return(val);
        }