Beispiel #1
0
        private void SetearValidadores()
        {
            phFechaDesde.Controls.Add(GenerarValidadores.Requerido("txtFechaDesde", "Debe ingresar la fecha desde", true, "fechaDesdeReq"));
            phFechaDesde.Controls.Add(GenerarValidadores.Fecha("txtFechaDesde", "La fecha desde debe tener el formato DD/MM/AAAA", true, "desdeValid"));
            if (txtFechaHasta.Text == "")
            {
                txtFechaHasta.Text = DateTime.Now.ToShortDateString();
            }
            phFechaHasta.Controls.Add(GenerarValidadores.Fecha("txtFechaHasta", "La fecha hasta debe tener el formato DD/MM/AAAA", true, "hastaValid"));

            CustomValidator validadorRangoFechas = (CustomValidator)GenerarValidadores.Custom();

            validadorRangoFechas.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateRangoFechas);
            this.phValidRangoFechas.Controls.Add(validadorRangoFechas);

            CustomValidator validadorClientes = (CustomValidator)GenerarValidadores.Custom();

            validadorClientes.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(ValidateCliente);
            phValidLstCliente.Controls.Add(validadorClientes);

            CustomValidator validadorAgencia = (CustomValidator)GenerarValidadores.Custom();

            validadorAgencia.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(ValidateAgencia);
            phValidLstAgencia.Controls.Add(validadorAgencia);
        }
Beispiel #2
0
        private void SetearValidadores()
        {
            CustomValidator validadorCuit = (CustomValidator)GenerarValidadores.Custom();

            validadorCuit.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateCuit);
            this.phValidCuit.Controls.Add(validadorCuit);
        }
Beispiel #3
0
        /// <summary>
        /// Procedimiento para setear los validadores
        /// </summary>
        private void SetearValidadores()
        {
            // Validadores para el clietne
            CustomValidator validadorCliente = (CustomValidator)GenerarValidadores.Custom();

            validadorCliente.ServerValidate += new ServerValidateEventHandler(validadorCliente_ServerValidate);
            phValidarCliente.Controls.Add(validadorCliente);
            // Validadores para la unidad de venta
            CustomValidator validadorUnidadVenta = (CustomValidator)GenerarValidadores.Custom();

            validadorUnidadVenta.ServerValidate += new ServerValidateEventHandler(validadorUnidadVenta_ServerValidate);
            phValidarUnidadVenta.Controls.Add(validadorUnidadVenta);
            // Validadores para el tarifario de flete
            CustomValidator validadorTarifarioFlete = (CustomValidator)GenerarValidadores.Custom();

            validadorTarifarioFlete.ServerValidate += new ServerValidateEventHandler(validadorTarifarioFlete_ServerValidate);
            phValidarTarifariosFlete.Controls.Add(validadorTarifarioFlete);
            // Validadores para el tarifario de retiro/entrega
            CustomValidator validadorTarifarioRetiroEntrega = (CustomValidator)GenerarValidadores.Custom();

            validadorTarifarioRetiroEntrega.ServerValidate += new ServerValidateEventHandler(validadorTarifarioRetiroEntrega_ServerValidate);
            phValidarRetiroEntrega.Controls.Add(validadorTarifarioRetiroEntrega);
            // Validador para ingreso erróneo de fecha.
            phFechaHasta.Controls.Add(GenerarValidadores.Fecha("txtFechaHasta", "La Fecha hasta debe tener el formato DD/MM/AAAA", true, "hastaValid"));
        }
Beispiel #4
0
        private void SetearValidadores()
        {
            CustomValidator validadorRangoFechas = (CustomValidator)GenerarValidadores.Custom();

            validadorRangoFechas.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateRangoFechas);
            this.phValidRangoFechas.Controls.Add(validadorRangoFechas);
        }
        private void SetearValidadores()
        {
            CustomValidator valPrioridades = (CustomValidator)GenerarValidadores.Custom("", "", false, "valPrioridad");

            valPrioridades.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidatePrioridades);
            this.phValidPrioridades.Controls.Add(valPrioridades);
        }
        private void SetearValidadores()
        {
            phFechaDesde.Controls.Add(GenerarValidadores.Fecha("txtFechaDesde", "La fecha desde debe tener el formato dd/mm/aaaa", true, "fechaDesdeValid"));
            phFechaDesde.Controls.Add(GenerarValidadores.Requerido("txtFechaDesde", "Debe ingresar la fecha desde, es obligatorio", true, "fechaDesdeReq"));
            phFechaHasta.Controls.Add(GenerarValidadores.Fecha("txtFechaHasta", "La fecha hasta debe tener el formato dd/mm/aaaa", true, "fechaHastaValid"));
            phFechaHasta.Controls.Add(GenerarValidadores.Requerido("txtFechaHasta", "Debe ingresar la fecha hasta, es obligatorio", true, "fechaHastaReq"));
            CustomValidator validarRangoFecha = (CustomValidator)GenerarValidadores.Custom();

            validarRangoFecha.ServerValidate += new ServerValidateEventHandler(ValidateRangoFecha);
            phFechaHasta.Controls.Add(validarRangoFecha);
            CustomValidator validarCliente = (CustomValidator)GenerarValidadores.Custom();

            validarCliente.ServerValidate += new ServerValidateEventHandler(ValidateCliente);

            /*phCliente.Controls.Add(validarCliente);
            *  CustomValidator validarUnidadVenta = (CustomValidator)GenerarValidadores.Custom();
            *  validarUnidadVenta.ServerValidate += new ServerValidateEventHandler(ValidateUnidadVenta);
            *  phUnidadVenta.Controls.Add(validarUnidadVenta);
            *  CustomValidator validarOrigen = (CustomValidator)GenerarValidadores.Custom();
            *  validarOrigen.ServerValidate += new ServerValidateEventHandler(ValidateOrigen);
            *  phOrigen.Controls.Add(validarOrigen);
            *  CustomValidator validarDestino = (CustomValidator)GenerarValidadores.Custom();
            *  validarDestino.ServerValidate += new ServerValidateEventHandler(ValidateDestino);
            *  phDestino.Controls.Add(validarDestino);*/
        }
Beispiel #7
0
        private void SetearValidadores()
        {
            phFactura.Controls.Add(GenerarValidadores.Requerido("txtNroFactura", "Debe ingresar el número de factura, es obligatorio", false, "facturaReq"));
            phFechasEmision.Controls.Add(GenerarValidadores.Requerido("txtFechaEmision", "Debe ingresar la fecha de emisión, es obligatorio", false, "fechaReq"));
            phFechasEmision.Controls.Add(GenerarValidadores.Fecha("txtFechaEmision", "La fecha debe tener el formato DD/MM/AAAA"));
            phImporte.Controls.Add(GenerarValidadores.Requerido("txtImporte", "Debe ingresar el importe total, es obligatorio", false, "importeReq"));
            phImporte.Controls.Add(GenerarValidadores.DecimalPositivo("txtImporte", "El importe debe ser un decimal positivo", true, "importeValid"));
            phKilos.Controls.Add(GenerarValidadores.DecimalPositivo("txtKilos", "El valor de los kilos debe ser un decimal positivo", true, "kilosValid"));
            phKilos.Controls.Add(GenerarValidadores.Requerido("txtKilos", "Debe ingresar los kilos, es obligatorio", false, "kilosReq"));
            phBultos.Controls.Add(GenerarValidadores.EnteroPositivo("txtBultos", "El valor de los bultos debe ser un enteror positivo", true, "bultosValid"));
            phBultos.Controls.Add(GenerarValidadores.Requerido("txtBultos", "Debe ingresar la cantidad de bultos, es obligatorio", false, "bultosReq"));
            phRetiro.Controls.Add(GenerarValidadores.DecimalPositivo("txtRetiro", "El valor del retiro debe ser un decimal positivo", true, "retiroValid"));
            phEntrega.Controls.Add(GenerarValidadores.DecimalPositivo("txtEntrega", "El valor de la entrega debe ser un decimal positivo", true, "entregaValid"));
            phSeguro.Controls.Add(GenerarValidadores.DecimalPositivo("txtSeguro", "El valor del seguro debe ser un decimal positivo", true, "seguroValid"));
            phFlete.Controls.Add(GenerarValidadores.DecimalPositivo("txtFlete", "El valor del flete debe ser un decimal positivo", true, "fleteValid"));
            phIva.Controls.Add(GenerarValidadores.DecimalPositivo("txtIva", "El valor del IVA debe ser un decimal positivo", true, "ivaValid"));
            phOrigen.Controls.Add(GenerarValidadores.Requerido(Origen.FindControl("txtAgenciaID").UniqueID, "Debe ingresar el origen, es obligatorio", false, "origenReq"));
            phDestino.Controls.Add(GenerarValidadores.Requerido(Destino.FindControl("txtAgenciaID").UniqueID, "Debe ingresar el destino, es obligatorio", false, "destinoReq"));

            CustomValidator validadorEmpresaTerceros = (CustomValidator)GenerarValidadores.Custom();

            validadorEmpresaTerceros.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(ValidateEmpresaTerceros);
            phEmpresa.Controls.Add(validadorEmpresaTerceros);

            /*
             * CustomValidator validadorFechaEmision = (CustomValidator)GenerarValidadores.Custom();
             * validadorFechaEmision.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(ValidateFechaEmision);
             * phFechasEmision.Controls.Add(validadorFechaEmision);
             */
        }
        private void SetearValidadores()
        {
            CustomValidator validadorAgencia = (CustomValidator)GenerarValidadores.Custom();

            validadorAgencia.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(ValidateAgencia);
            phAgencia.Controls.Add(validadorAgencia);
        }
        public void Validaciones()
        {
            CustomValidator valImportes = (CustomValidator)GenerarValidadores.Custom("", "", false, "valImportes");

            valImportes.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateImportes);
            this.Controls.Add(valImportes);
        }
Beispiel #10
0
        private void SetearValidadores()
        {
            if (!ValidarHabilitado)
            {
                this.phValidCalle.Controls.Add(GenerarValidadores.Requerido("txtCalle", this.TraducirTexto("Errores.Obligatorios.Calle"), false, "valRequeridoCalle"));
                this.phValidCalle.Controls.Add(GenerarValidadores.Descripcion("txtCalle", this.TraducirTexto("Errores.Invalidos.Calle"), false, "valDescripcionCalle"));
                this.phValidCalleNro.Controls.Add(GenerarValidadores.EnteroNroCalle("txtCalleNro", this.TraducirTexto("Errores.Invalidos.CalleNro"), false, "valEnteroNroCalle"));//VER
                this.phValidProvincia.Controls.Add(GenerarValidadores.Requerido("txtProvincia", this.TraducirTexto("Errores.Obligatorios.Provincia"), false, "valRequeridoProvincia"));
                this.phValidLocalidad.Controls.Add(GenerarValidadores.Requerido("txtLocalidad", this.TraducirTexto("Errores.Obligatorios.Localidad"), false, "valRequeridoLocalidad"));
            }
            else
            {
                this.phValidCalle.Controls.Add(GenerarValidadores.Requerido("txtCalle", this.TraducirTexto("Errores.Obligatorios.Calle")));
                this.phValidCalle.Controls.Add(GenerarValidadores.Descripcion("txtCalle", this.TraducirTexto("Errores.Invalidos.Calle")));
                this.phValidCalleNro.Controls.Add(GenerarValidadores.EnteroNroCalle("txtCalleNro", this.TraducirTexto("Errores.Invalidos.CalleNro")));
                this.phValidTelefono.Controls.Add(GenerarValidadores.Requerido("txtTelefono", this.TraducirTexto("Errores.Obligatorios.Telefono")));
                this.phValidTelefonoCodArea.Controls.Add(GenerarValidadores.Requerido("txtTelefonoCodArea", this.TraducirTexto("Errores.Obligatorios.Telefono")));
                this.phValidLocalidad.Controls.Add(GenerarValidadores.Requerido("txtLocalidad", this.TraducirTexto("Errores.Obligatorios.Localidad")));
            }

            CustomValidator cstmValidatorProvincia = (CustomValidator)GenerarValidadores.Custom("", "", false, "cstmValidatorProvincia");

            cstmValidatorProvincia.ServerValidate += new ServerValidateEventHandler(cstmValidatorProvincia_ServerValidate);
            this.phValidProvincia.Controls.Add(cstmValidatorProvincia);

            CustomValidator cstmValidatorLocalidad = (CustomValidator)GenerarValidadores.Custom("", "", false, "cstmValidatorLocalidad");

            cstmValidatorLocalidad.ServerValidate += new ServerValidateEventHandler(cstmValidatorLocalidad_ServerValidate);
            this.phValidLocalidad.Controls.Add(cstmValidatorLocalidad);
        }
        private void SetearValidadores()
        {
            //this.phValidCodigo.Controls.Add(GenerarValidadores.Requerido("txtCodigo", this.TraducirTexto("Errores.Obligatorios.Codigo")));
            //this.phValidCodigo.Controls.Add(GenerarValidadores.Entero("txtCodigo", this.TraducirTexto("Errores.Invalidos.Codigo")));

            this.phValidRazonSocial.Controls.Add(GenerarValidadores.Requerido("txtRazonSocial", this.TraducirTexto("Errores.Obligatorios.RazonSocial")));
            this.phValidEmail.Controls.Add(GenerarValidadores.Email("txtEmail", this.TraducirTexto("Errores.Invalidos.Email")));
            CustomValidator validadorResponsable = (CustomValidator)GenerarValidadores.Custom();

            validadorResponsable.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateResponsable);
            this.phValidResponsable.Controls.Add(validadorResponsable);
            CustomValidator validadorRefRedespacho = (CustomValidator)GenerarValidadores.Custom();

            validadorRefRedespacho.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateReferenciaRedespacho);
            this.phValidReferenciaRedespacho.Controls.Add(validadorRefRedespacho);

            //this.phValidEmpresa.Controls.Add(GenerarValidadores.Requerido("ddlEmpresa", this.TraducirTexto("Errores.Obligatorios.Empresa")));
            this.phValidNombre.Controls.Add(GenerarValidadores.Requerido("txtNombre", this.TraducirTexto("Errores.Obligatorios.Nombre")));
            CustomValidator validadorEntrega = (CustomValidator)GenerarValidadores.Custom();

            validadorEntrega.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateEntrega);
            this.phValidEntrega.Controls.Add(validadorEntrega);

            CustomValidator validadorEmpresaTerceros = (CustomValidator)GenerarValidadores.Custom();

            validadorEmpresaTerceros.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateEmpresaTerceros);
            this.phValidEmpresaTerceros.Controls.Add(validadorEmpresaTerceros);

            CustomValidator validadorDomicilio = (CustomValidator)GenerarValidadores.Custom();

            validadorDomicilio.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateDomicilio);
            this.phValidDomicilio.Controls.Add(validadorDomicilio);
        }
        protected void SetearValidadores()
        {
            CustomValidator validadorAgencia = (CustomValidator)GenerarValidadores.Custom();

            validadorAgencia.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateAgencia);
            this.phValidAgencia.Controls.Add(validadorAgencia);
        }
        private void SetearValidadores()
        {
            CustomValidator validadorLocalidades = (CustomValidator)GenerarValidadores.Custom();

            validadorLocalidades.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateLocalidades);
            this.phValiddtgLocalidades.Controls.Add(validadorLocalidades);
            validadorLocalidades.Enabled = false;
        }
        private void SetearValidadores()
        {
            this.phValidRangoFechas.Controls.Add(GenerarValidadores.Fecha("txtFechaHasta", this.TraducirTexto("Errores.Invalidos.Fecha")));
            this.phValidRangoFechas.Controls.Add(GenerarValidadores.Fecha("txtFechaDesde", this.TraducirTexto("Errores.Invalidos.Fecha")));
            CustomValidator validadorRangoFechas = (CustomValidator)GenerarValidadores.Custom();

            validadorRangoFechas.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateRangoFechas);
            this.phValidRangoFechas.Controls.Add(validadorRangoFechas);
        }
Beispiel #15
0
        private void SetearValidadores()
        {
            phGuiaValid.Controls.Add(GenerarValidadores.EnteroPositivo("txtGuia", "El código de barrras es un entero positivo", false, "guiaEntero"));

            CustomValidator validarLongitud = (CustomValidator)GenerarValidadores.Custom();

            validarLongitud.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(ValidateLongitud);
            phGuiaValid.Controls.Add(validarLongitud);
        }
Beispiel #16
0
        private void SetearValidadores()
        {
            this.phValidFecha.Controls.Add(GenerarValidadores.Fecha("txtFecha", this.TraducirTexto("Errores.Invalidos.Fecha")));
            this.phValidFecha.Controls.Add(GenerarValidadores.Requerido("txtFecha", "Debe ingresar una fecha para realizar la consulta", false, "validFechaDesde"));

            CustomValidator validadorAgencia = (CustomValidator)GenerarValidadores.Custom();

            validadorAgencia.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidarAgencia);
            this.phValidAgencia.Controls.Add(validadorAgencia);
        }
        private void SetearValidadores()
        {
            this.phValidTarifarioDescrip.Controls.Add(GenerarValidadores.Requerido("txtTarifarioDescrip", this.TraducirTexto("Errores.Obligatorios.TarifarioDescrip"), false, "reqDescrip"));
            this.phValidTarifarioDescrip.Controls.Add(GenerarValidadores.DescripcionTarifario("txtTarifarioDescrip", this.TraducirTexto("Errores.Invalidos.TarifarioDescrip"), false, "valDescrip"));

            CustomValidator validadorValorizacion = (CustomValidator)GenerarValidadores.Custom("", "", false, "valValorizacion");

            validadorValorizacion.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateValorizacion);
            this.phValidValorizacion.Controls.Add(validadorValorizacion);

            CustomValidator validadorImporteKgExcedente = (CustomValidator)GenerarValidadores.Custom("", "", false, "valImporte");

            validadorImporteKgExcedente.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateImporteKgExcedente);
            this.phValidImporteKgExcedente.Controls.Add(validadorImporteKgExcedente);

            BaseValidator valImporteKgExc = GenerarValidadores.DecimalPositivo("txtImporteKgExcedente", this.TraducirTexto("Errores.Invalidos.ImportePositivo"), false, "valImporteKgExc");

            this.phValidImporteKgExcedente.Controls.Add(valImporteKgExc);

            BaseValidator reqImporteAjuste = GenerarValidadores.Requerido("txtImporteAjuste", this.TraducirTexto("Errores.Obligatorios.ImporteAjuste"));

            reqImporteAjuste.ID      = "reqImporteAjuste";
            reqImporteAjuste.Enabled = false;
            this.phValidImporteAjuste.Controls.Add(reqImporteAjuste);

            BaseValidator valImporteAjuste = GenerarValidadores.DecimalPositivo("txtImporteAjuste", this.TraducirTexto("Errores.Invalidos.Importe"), false, "valImporteAjuste");

            this.phValidImporteAjuste.Controls.Add(valImporteAjuste);

            BaseValidator reqImporteAjusteKgExcedente = GenerarValidadores.Requerido("txtImporteAjusteKgExcedente", this.TraducirTexto("Errores.Obligatorios.ImporteAjusteKgExcedente"));

            reqImporteAjusteKgExcedente.ID      = "reqImporteAjusteKgExcedente";
            reqImporteAjusteKgExcedente.Enabled = false;
            this.phValidImporteAjusKgExcedente.Controls.Add(reqImporteAjusteKgExcedente);

            BaseValidator valImporteAjusteKgExcedente = GenerarValidadores.Decimal("txtImporteAjusteKgExcedente", this.TraducirTexto("Errores.Invalidos.ImporteAjusteKgExcedente"), false, "valImporteAjusteKgExcedente");

            this.phValidImporteAjusKgExcedente.Controls.Add(valImporteAjusteKgExcedente);

            BaseValidator reqPorcenAjuste = GenerarValidadores.Requerido("txtPorcentajeAjuste", this.TraducirTexto("Errores.Obligatorios.PorcentajeAjuste"));

            reqPorcenAjuste.ID      = "reqPorcenAjuste";
            reqPorcenAjuste.Enabled = false;
            this.phValidPorcentajeAjuste.Controls.Add(reqPorcenAjuste);

            BaseValidator valPorcenAjuste = GenerarValidadores.Porcentaje("txtPorcentajeAjuste", this.TraducirTexto("Errores.Invalidos.Porcentaje"));

            valPorcenAjuste.ID      = "valPorcenAjuste";
            valPorcenAjuste.Enabled = false;
            this.phValidPorcentajeAjuste.Controls.Add(valPorcenAjuste);

            BaseValidator valImporteMinValorDeclarado = GenerarValidadores.EnteroPositivo("txtImporteMinValorDeclarado", this.TraducirTexto("El valor declarado no es válido"), false, "valImporteMinValorDeclarado");

            this.phValidImporteMinimo.Controls.Add(valImporteMinValorDeclarado);
        }
        private void SetearValidadores()
        {
            this.phValidCodigoBarras.Controls.Add(GenerarValidadores.EnteroPositivo("txtCodigoBarras", "El código de barras ingresado no es válido."));
            this.phValidSucursal.Controls.Add(GenerarValidadores.EnteroPositivo("txtNroSucursal", "El código de sucursal ingresado no es válido."));
            this.phValidNroGuia.Controls.Add(GenerarValidadores.EnteroPositivo("txtNroGuia", "El número de guía ingresado no es válido."));

            CustomValidator validadorRangoFechas = (CustomValidator)GenerarValidadores.Custom();

            validadorRangoFechas.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateRangoFechas);
            this.phValidRangoFechas.Controls.Add(validadorRangoFechas);
        }
Beispiel #19
0
        private void SetearValidadores()
        {
            phFechaDesde.Controls.Add(GenerarValidadores.Fecha("txtFechaDesde", "La fecha desde debe tener el formato dd/mm/aaaa", true, "fechaDesdeValid"));
            phFechaHasta.Controls.Add(GenerarValidadores.Fecha("txtFechaHasta", "La fecha hasta debe tener el formato dd/mm/aaaa", true, "fechaHastaValid"));
            phFechaDesde.Controls.Add(GenerarValidadores.Requerido("txtFechaDesde", "Debe ingresar la fecha desde, es obligatorio", true, "fechaDesdeReq"));
            phFechaHasta.Controls.Add(GenerarValidadores.Requerido("txtFechaHasta", "Debe ingresar la fecha hasta, es obligatorio", true, "fechaHastaReq"));
            CustomValidator validRango = (CustomValidator)GenerarValidadores.Custom("", "", true, "rangoValid");

            validRango.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(ValidateRango);
            phFechaHasta.Controls.Add(validRango);
        }
Beispiel #20
0
        public void Validaciones()
        {
            this.phValidConceptoDescrip.Controls.Add(GenerarValidadores.Requerido("txtConceptoDescrip", this.TraducirTexto("Errores.Obligatorios.ConceptoLiqDescrip")));
            this.phValidConceptoDescrip.Controls.Add(GenerarValidadores.Descripcion("txtConceptoDescrip", this.TraducirTexto("Errores.Invalidos.ConceptoLiqDescrip")));
            this.phValidEntidad.Controls.Add(GenerarValidadores.Requerido("ddlEntidad", this.TraducirTexto("Errores.Obligatorios.EntidadComision")));

            CustomValidator valConceptos = (CustomValidator)GenerarValidadores.Custom();

            valConceptos.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateConceptos);
            this.phValidConceptos.Controls.Add(valConceptos);
        }
Beispiel #21
0
        private void SetearValidadores()
        {
            this.phValidTiempoEntregaDescrip.Controls.Add(SisPackController.GenerarValidadores.Requerido("txtTiempoEntregaDescrip", this.TraducirTexto("Errores.Obligatorios.TiempoEntregaDescrip")));
            this.phValidTiempoEntregaDescrip.Controls.Add(SisPackController.GenerarValidadores.Descripcion("txtTiempoEntregaDescrip", this.TraducirTexto("Errores.Invalidos.TiempoEntregaDescrip")));
            this.phTiempoMaximoEntrega.Controls.Add(SisPackController.GenerarValidadores.Requerido("txtTiempoMaximoEntrega", this.TraducirTexto("Errores.Obligatorios.TiempoMaximoEntrega")));
            this.phTiempoMaximoEntrega.Controls.Add(SisPackController.GenerarValidadores.Entero("txtTiempoMaximoEntrega", this.TraducirTexto("Errores.Invalidos.TiempoMaximoEntrega")));
            CustomValidator valPrioridades = (CustomValidator)GenerarValidadores.Custom("", "", false, "valPrioridad");

            valPrioridades.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidatePrioridades);
            this.phValidPrioridades.Controls.Add(valPrioridades);
        }
Beispiel #22
0
        private void SetearValidadores()
        {
            CustomValidator validarOrigen = (CustomValidator)GenerarValidadores.Custom();

            validarOrigen.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(ValidateOrigen);
            phOrigen.Controls.Add(validarOrigen);

            CustomValidator validarDestino = (CustomValidator)GenerarValidadores.Custom();

            validarDestino.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(ValidateDestino);
            phDestino.Controls.Add(validarDestino);
        }
 private void SetearValidadoresAgencia()
 {
     if (this.Request.QueryString["Administracion"] != null)
     {
         if (this.Request.QueryString["Administracion"] == "1")
         {
             CustomValidator validadorAgencia = (CustomValidator)GenerarValidadores.Custom();
             validadorAgencia.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidarAgencia);
             this.phValidAgencia.Controls.Add(validadorAgencia);
         }
     }
 }
        private void SetearValidadores()
        {
            CustomValidator validadorVendedor = (CustomValidator)GenerarValidadores.Custom();

            validadorVendedor.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateVendedor);
            this.phValidVendedor.Controls.Add(validadorVendedor);

            CustomValidator validadorCliente = (CustomValidator)GenerarValidadores.Custom();

            validadorCliente.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateCliente);
            this.phValidCliente.Controls.Add(validadorCliente);
        }
        private void SetearValidadores()
        {
            phFechaDesde.Controls.Add(GenerarValidadores.Requerido("txtFechaDesde", "Debe ingresar la Fecha desde", true, "fechaDesdeReq"));
            phFechaHasta.Controls.Add(GenerarValidadores.Requerido("txtFechaHasta", "Debe ingresar la Fecha hasta", true, "fechaHastaReq"));
            phFechaDesde.Controls.Add(GenerarValidadores.Fecha("txtFechaDesde", "La Fecha desde debe tener el formato DD/MM/AAAA", true, "desdeValid"));
            phFechaHasta.Controls.Add(GenerarValidadores.Fecha("txtFechaHasta", "La Fecha hasta debe tener el formato DD/MM/AAAA", true, "hastaValid"));

            CustomValidator validadorRangoFechas = (CustomValidator)GenerarValidadores.Custom();

            validadorRangoFechas.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateRangoFechas);
            this.phValidRangoFechas.Controls.Add(validadorRangoFechas);
        }
        private void SetearValidadoresFecha()
        {
            this.phValidFechaDesde.Controls.Add(SisPackController.GenerarValidadores.Requerido("txtFechaDesde", this.TraducirTexto("Errores. Debe agregar la fecha desde, es obligatoria"), true, "fechaDesdereq"));
            this.phValidFechaDesde.Controls.Add(SisPackController.GenerarValidadores.Fecha("txtFechaDesde", this.TraducirTexto("Errores.Obligatorios.Fecha desde"), true, "fechaDesde"));
            this.phValidFechaHasta.Controls.Add(SisPackController.GenerarValidadores.Fecha("txtFechaHasta", this.TraducirTexto("Errores.Obligatorios.Fecha hasta"), true, "fechaHasta"));
            phValidFechaDesde.Controls.Add(GenerarValidadores.Fecha("txtFechaDesde", "La fecha desde debe tener el formato dd/mm/aaaa", true, "fechaDesdeValid"));
            phValidFechaHasta.Controls.Add(GenerarValidadores.Fecha("txtFechaHasta", "La fecha hasta debe tener el formato dd/mm/aaaa", true, "fechaHastaValid"));
            CustomValidator validarRangoFecha = (CustomValidator)GenerarValidadores.Custom();

            validarRangoFecha.ServerValidate += new ServerValidateEventHandler(ValidateRangoFecha);
            phValidFechaHasta.Controls.Add(validarRangoFecha);
        }
Beispiel #27
0
        private void SetearValidadores()
        {
            this.phValidRangoFechas.Controls.Add(GenerarValidadores.Fecha("txtFechaHasta", this.TraducirTexto("Errores.Invalidos.Fecha")));
            this.phValidRangoFechas.Controls.Add(GenerarValidadores.Fecha("txtFechaDesde", this.TraducirTexto("Errores.Invalidos.Fecha")));
            CustomValidator validadorRangoFechas = (CustomValidator)GenerarValidadores.Custom();

            validadorRangoFechas.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateRangoFechas);
            this.phValidRangoFechas.Controls.Add(validadorRangoFechas);
            this.phValidOrdenado.Controls.Add(GenerarValidadores.Requerido("ddlOrdenado", this.TraducirTexto("Errores.Obligatorios.OrdenadoPor")));
            this.phValidListCliente.Controls.Add(GenerarValidadores.Requerido("lstClientes", this.TraducirTexto("Errores.Obligatorios.Cliente")));
            this.phValidLstAgDestino.Controls.Add(GenerarValidadores.Requerido("lstAgDestino", this.TraducirTexto("Errores.Obligatorios.Filtro"), false, "lstAgDestinoValid"));
        }
        private void SetearValidadores()
        {
            this.phValidFechaHasta.Controls.Add(GenerarValidadores.Fecha("txtFechaHasta", this.TraducirTexto("Errores.Invalidos.Fecha")));
            this.phValidFechaDesde.Controls.Add(GenerarValidadores.Fecha("txtFechaDesde", this.TraducirTexto("Errores.Invalidos.Fecha")));
            this.phValidFechaHasta.Controls.Add(GenerarValidadores.Requerido("txtFechaHasta", this.TraducirTexto("Errores.Obligatorios.Fecha")));
            this.phValidFechaDesde.Controls.Add(GenerarValidadores.Requerido("txtFechaDesde", this.TraducirTexto("Errores.Obligatorios.Fecha")));
            this.phValidMontoAutorizado.Controls.Add(GenerarValidadores.Requerido("txtMontoAutorizado", this.TraducirTexto("Errores.Obligatorios.MontoAutorizado"), false, "valCredito"));
            this.phValidMontoAutorizado.Controls.Add(GenerarValidadores.Decimal("txtMontoAutorizado", this.TraducirTexto("Errores.Invalidos.MontoAutorizado")));
            CustomValidator validadorRangoFechas = (CustomValidator)GenerarValidadores.Custom();

            validadorRangoFechas.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateRangoFechas);
            this.phValidRangoFechas.Controls.Add(validadorRangoFechas);
        }
        private void butConfirmar_Click(object sender, System.EventArgs e)
        {
            try
            {
                BaseValidator bv;
                bv         = (BaseValidator)phDescripcion.FindControl("descripReq");
                bv.Enabled = true;
                bv.Validate();
                if (!bv.IsValid)
                {
                    return;
                }

                /*
                 * bv = (BaseValidator)phMontoHasta.FindControl("hastaReq");
                 * bv.Enabled = true;
                 * bv.Validate();
                 * if(!bv.IsValid)
                 *      return;
                 */
                CustomValidator validatorRango = (CustomValidator)GenerarValidadores.Custom();
                validatorRango.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(ValidateRango);
                phMontoHasta.Controls.Add(validatorRango);
                validatorRango.Validate();
                if (!validatorRango.IsValid)
                {
                    return;
                }

                bv         = (BaseValidator)phMontoDesde.FindControl("desdeReq");
                bv.Enabled = true;
                bv.Validate();
                if (!bv.IsValid)
                {
                    return;
                }
                ICategoria categoria = CategoriaFactory.GetCategoria();
                categoria.CategoriaID     = Utiles.Validaciones.obtieneEntero(txtCategoriaID.Text);
                categoria.Descripcion     = txtDescripcion.Text;
                categoria.TipoCategoriaID = rbtAgencia.Checked ? 1 : 2;
                categoria.MontoDesde      = Utiles.Validaciones.obtieneDouble(txtMontoDesde.Text);
                categoria.MontoHasta      = Utiles.Validaciones.obtieneDouble(txtMontoHasta.Text);
                categoria.Guardar();
                Response.Redirect("CategoriaConsul.aspx");
            }
            catch (Exception ex)
            {
                ((ErrorWeb)phErrores.Controls[0]).setMensaje(ex.Message);
            }
        }
        private void SetearValidadores()
        {
            if (!ValidarHabilitado)
            {
                this.phValidCalle.Controls.Add(GenerarValidadores.Requerido("txtCalle", this.TraducirTexto("Errores.Obligatorios.Calle"), false, "valRequeridoCalle"));
                this.phValidCalle.Controls.Add(GenerarValidadores.Descripcion("txtCalle", this.TraducirTexto("Errores.Invalidos.Calle"), false, "valDescripcionCalle"));
                //pzambudio 19-02-05 - COMIENZO
                //Nuevo validador para el número de calle
                //this.phValidCalleNro.Controls.Add(GenerarValidadores.Entero("txtCalleNro", this.TraducirTexto("Errores.Invalidos.CalleNro")));
                this.phValidCalleNro.Controls.Add(GenerarValidadores.EnteroNroCalle("txtCalleNro", this.TraducirTexto("Errores.Invalidos.CalleNro"), false, "valEnteroNroCalle"));//VER
                //pzambudio - FIN
                //pzambudio 19-02-05 - COMIENZO: agrego validador de teléfono requerido
                //this.phValidTelefono.Controls.Add(GenerarValidadores.Requerido("txtTelefono", this.TraducirTexto("Errores.Obligatorios.Telefono"),false,"valRequeridoTelefono"));
                //pzambudio - FIN
                this.phValidProvincia.Controls.Add(GenerarValidadores.Requerido("txtProvincia", this.TraducirTexto("Errores.Obligatorios.Provincia"), false, "valRequeridoProvincia"));
                //this.phValidLocalidad.Controls.Add(GenerarValidadores.Requerido("txtLocalidadSelec", this.TraducirTexto("Errores.Obligatorios.Localidad"), false, "valRequeridoLocalidad"));
                //VSA: Modificación desarrollo Código postales
                //this.phValidLocalidad.Controls.Add(GenerarValidadores.Requerido("ddlLocalidad", this.TraducirTexto("Errores.Obligatorios.Localidad"), false, "valRequeridoLocalidad"));
                this.phValidLocalidad.Controls.Add(GenerarValidadores.Requerido("txtLocalidad", this.TraducirTexto("Errores.Obligatorios.Localidad"), false, "valRequeridoLocalidad"));
            }
            else
            {
                this.phValidCalle.Controls.Add(GenerarValidadores.Requerido("txtCalle", this.TraducirTexto("Errores.Obligatorios.Calle")));
                this.phValidCalle.Controls.Add(GenerarValidadores.Descripcion("txtCalle", this.TraducirTexto("Errores.Invalidos.Calle")));
                //pzambudio 19-02-05 - COMIENZO
                //Nuevo validador para el número de calle
                //this.phValidCalleNro.Controls.Add(GenerarValidadores.Entero("txtCalleNro", this.TraducirTexto("Errores.Invalidos.CalleNro")));
                this.phValidCalleNro.Controls.Add(GenerarValidadores.EnteroNroCalle("txtCalleNro", this.TraducirTexto("Errores.Invalidos.CalleNro")));
                //pzambudio - FIN
                //pzambudio 19-02-05 - COMIENZO: agrego validador de teléfono requerido
                this.phValidTelefono.Controls.Add(GenerarValidadores.Requerido("txtTelefono", this.TraducirTexto("Errores.Obligatorios.Telefono")));
                this.phValidTelefonoCodArea.Controls.Add(GenerarValidadores.Requerido("txtTelefonoCodArea", this.TraducirTexto("Errores.Obligatorios.Telefono")));
                //pzambudio - FIN
                //this.phValidProvincia.Controls.Add(GenerarValidadores.Requerido("ddlProvincia", this.TraducirTexto("Errores.Obligatorios.Provincia")));
                //this.phValidLocalidad.Controls.Add(GenerarValidadores.Requerido("txtLocalidadSelec", this.TraducirTexto("Errores.Obligatorios.Localidad")));
                //VSA: Modificación desarrollo Código postales
                //this.phValidLocalidad.Controls.Add(GenerarValidadores.Requerido("ddlLocalidad", this.TraducirTexto("Errores.Obligatorios.Localidad")));
                this.phValidLocalidad.Controls.Add(GenerarValidadores.Requerido("txtLocalidad", this.TraducirTexto("Errores.Obligatorios.Localidad")));
            }

            CustomValidator cstmValidatorProvincia = (CustomValidator)GenerarValidadores.Custom("", "", false, "cstmValidatorProvincia");

            cstmValidatorProvincia.ServerValidate += new ServerValidateEventHandler(cstmValidatorProvincia_ServerValidate);
            this.phValidProvincia.Controls.Add(cstmValidatorProvincia);

            CustomValidator cstmValidatorLocalidad = (CustomValidator)GenerarValidadores.Custom("", "", false, "cstmValidatorLocalidad");

            cstmValidatorLocalidad.ServerValidate += new ServerValidateEventHandler(cstmValidatorLocalidad_ServerValidate);
            this.phValidLocalidad.Controls.Add(cstmValidatorLocalidad);
        }