private void SetearValidadoresFechas(bool habilita)
 {
     this.phValidRangoFechas.Controls.Add(GenerarValidadores.Fecha("txtFechaDesde", this.TraducirTexto("Errores.Invalidos.Fecha"), habilita, "fechaDesde"));
     this.phValidRangoFechas.Controls.Add(GenerarValidadores.Fecha("txtFechaHasta", this.TraducirTexto("Errores.Invalidos.Fecha"), habilita, "fechaHasta"));
     this.phFechaDesde.Controls.Add(GenerarValidadores.Requerido("txtFechaDesde", "Debe ingresar la fecha desde para realizar la consulta", habilita, "fechaDesdeReq"));
     this.phFechaHasta.Controls.Add(GenerarValidadores.Requerido("txtFechaHasta", "Debe ingresar la fecha hasta para realizar la consulta", habilita, "fechaHastaReq"));
 }
        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);*/
        }
 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")));
     this.phValidNroGuia.Controls.Add(GenerarValidadores.Entero("txtGuiaNro", this.TraducirTexto("Errores.Invalidos.NroGuia")));
     this.phValidNroGuia.Controls.Add(GenerarValidadores.Entero("txtSucGuia", this.TraducirTexto("Errores.Invalidos.NroSucursal")));
 }
 private void SetearValidadores()
 {
     this.phValidFechaDesde.Controls.Add(GenerarValidadores.Fecha("txtFechaDesde", this.TraducirTexto("Errores.Invalidos.Desde"), false, "validFechaDesde"));
     this.phValidFechaHasta.Controls.Add(GenerarValidadores.Fecha("txtFechaHasta", this.TraducirTexto("Errores.Invalidos.Hasta"), false, "validFechaHasta"));
     this.phValidUVenta.Controls.Add(SisPackController.GenerarValidadores.Requerido("ddlUnidadVenta", "Debe seleccionar una unidad de venta", false, "validUnidadVenta"));
     this.phValidConcepto.Controls.Add(SisPackController.GenerarValidadores.Requerido("ddlConceptoFacturacion", "Debe seleccionar un concepto de facturacion", false, "validConcepto"));
 }
Example #5
0
 private void SetearValidadores()
 {
     phValidFechaListado.Controls.Add(GenerarValidadores.Requerido("txtFechaListado", this.TraducirTexto("Errores.Obligatorios.Fecha"), false, "ReqFecha"));
     phValidFechaListado.Controls.Add(GenerarValidadores.Fecha("txtFechaListado", this.TraducirTexto("Errores.Invalidos.Fecha"), true, "ValidFecha"));
     //phValidNumero.Controls.Add(GenerarValidadores.Requerido("txtNroListadoConf", "El número de listado conformadas es obligatorio.", false, "ReqNumero"));
     //phValidNumero.Controls.Add(GenerarValidadores.EnteroPositivo("txtNroListadoConf", "El numero del listado debe ser un entero positivo.", true, "ValidNumero"));
 }
Example #6
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);
             */
        }
Example #7
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"));
        }
Example #8
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);
        }
Example #9
0
 private void SetearValidadores()
 {
     phMinimo.Controls.Add(GenerarValidadores.EnteroPositivo("txtMinimo", "El valor ingresado debe ser un entero positivo"));
     phFechaDesde.Controls.Add(GenerarValidadores.Requerido("txtFechaDesde", "Debe ingresar la fecha desde, es obligatorio"));
     //phFechaHasta.Controls.Add(GenerarValidadores.Requerido("txtFechaHasta", "Debe ingresar la fecha hasta, es obligatorio"));
     phFechaDesde.Controls.Add(GenerarValidadores.Fecha("txtFechaDesde", "El valor ingresado no tiene el formato dd/mm/aaaa"));
     phFechaHasta.Controls.Add(GenerarValidadores.Fecha("txtFechaHasta", "El valor ingresado no tiene el formato dd/mm/aaaa", true, "hastaValid"));
 }
        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);
        }
 void SetearValidadores()
 {
     this.phValidRangoFechasEmision.Controls.Add(GenerarValidadores.Fecha("txtFechaEmisionDesde", this.TraducirTexto("Errores.Invalidos.Fecha")));
     this.phValidRangoFechasEmision.Controls.Add(GenerarValidadores.Fecha("txtFechaEmisionHasta", this.TraducirTexto("Errores.Invalidos.Fecha")));
     this.phValidRangoFechasRecepcion.Controls.Add(GenerarValidadores.Fecha("txtFechaRecepcionDesde", this.TraducirTexto("Errores.Invalidos.Fecha")));
     this.phValidRangoFechasRecepcion.Controls.Add(GenerarValidadores.Fecha("txtFechaRecepcionHasta", this.TraducirTexto("Errores.Invalidos.Fecha")));
     this.phValidDiasEstadia.Controls.Add(GenerarValidadores.Entero("txtDiasEstadia", this.TraducirTexto("Errores.Invalidos.DiasPermanenciaAgencia")));
     this.phValidNroGuia.Controls.Add(GenerarValidadores.Entero("txtNroGuia", this.TraducirTexto("Errores.Invalidos.NroGuia")));
     this.phValidNroGuia.Controls.Add(GenerarValidadores.Entero("txtSucGuia", this.TraducirTexto("Errores.Invalidos.NroSucursal")));
 }
Example #12
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);
        }
Example #13
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);
        }
        private void SetearValidadores()
        {
            /* Validaciones para los filtros Agencia */
            this.phValidFechaDesde.Controls.Add(GenerarValidadores.Fecha("txtFechaDesde", this.TraducirTexto("Errores.Invalidos.Fecha"), false, "valFechaDesde"));
            this.phValidFechaHasta.Controls.Add(GenerarValidadores.Fecha("txtFechaHasta", this.TraducirTexto("Errores.Invalidos.Fecha"), false, "valFechaHasta"));
            this.phValidNroFormulario.Controls.Add(GenerarValidadores.EnteroPositivo("txtNroFormulario", "El campo Nro. de formulario es incorrecto.", false, "valNroFormulario"));

            /* Validaciones para los filtros Archivo */
            this.phValidFechaDesdeEnArch.Controls.Add(GenerarValidadores.Fecha("txtFechaDesdeEnArch", this.TraducirTexto("Errores.Invalidos.Fecha"), false, "valFechaDesdeEnArch"));
            this.phValidFechaHastaEnArch.Controls.Add(GenerarValidadores.Fecha("txtFechaHastaEnArch", this.TraducirTexto("Errores.Invalidos.Fecha"), false, "valFechaHastaEnArch"));
        }
 private void SetearValidadores()
 {
     try
     {
         phFecha.Controls.Add(GenerarValidadores.Fecha("txtFecha", "La fecha desde debe tener el formato DD/MM/AAAA", true, "FechaValid"));
     }
     catch (Exception ex)
     {
         ((ErrorWeb)phErrores.Controls[0]).setMensaje(ex.Message);
     }
 }
        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);
        }
Example #17
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()
        {
            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 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);
        }
        /// <summary>
        /// Procedimiento para setear los validadores
        /// </summary>
        private void SetearValidadores()
        {
            // Fecha desde
            phFechaDesde.Controls.Add(GenerarValidadores.Fecha("txtFechaDesde", "La fecha desde debe tener el formato DD/MM/AAAA", true, "desdeValid"));
            phFechaDesde.Controls.Add(GenerarValidadores.Requerido("txtFechaDesde", "Debe ingresar la fecha Desde", true, "desdeReq"));
            // Fecha hasta
            phFechaHasta.Controls.Add(GenerarValidadores.Fecha("txtFechaHasta", "La fecha hasta debe tener el formato DD/MM/AAAA", true, "hastaValid"));
            phFechaHasta.Controls.Add(GenerarValidadores.Requerido("txtFechaHasta", "Debe ingresar la fecha Hasta", true, "hastaReq"));

            /*CustomValidator validadorAgencia = (CustomValidator) GenerarValidadores.Custom();
             * validadorAgencia.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(ValidateAgencia);
             * phValidLstAgencia.Controls.Add(validadorAgencia);*/
        }
Example #21
0
        private void SetearValidadores()
        {
            this.phValidNroRendicion.Controls.Add(GenerarValidadores.Requerido("txtNroRendicion", this.TraducirTexto("Errores.Obligatorios.NroRendicion"), false, "reqTxtNroRendicion"));
            this.phValidNroRendicion.Controls.Add(GenerarValidadores.Entero("txtNroRendicion", this.TraducirTexto("Errores.Invalidos.NroRendicion"), false, "validTxtNroRendicion"));

            this.phValidNombreEntidad.Controls.Add(GenerarValidadores.Requerido("txtNombreEntidad", this.TraducirTexto("Errores.Obligatorios.NombreEntidad"), false, "validNombreEntidad"));
            this.phValidNroComprobante.Controls.Add(GenerarValidadores.Requerido("txtNroTransaccion", this.TraducirTexto("Errores.Obligatorios.NroTransaccion"), false, "validNroTransaccion"));
            this.phValidImporte.Controls.Add(GenerarValidadores.Requerido("txtImporte", this.TraducirTexto("Errores.Obligatorios.Importe"), false, "validImporte"));
            this.phValidImporte.Controls.Add(GenerarValidadores.DecimalPositivo("txtImporte", this.TraducirTexto("Errores.Invalidos.Importe"), false, "validImporteDec"));

            this.phValidFechaBoleta.Controls.Add(GenerarValidadores.Requerido("txtFechaBoleta", this.TraducirTexto("Errores.Obligatorios.Fecha"), false, "ReqFecha"));
            this.phValidFechaBoleta.Controls.Add(GenerarValidadores.Fecha("txtFechaBoleta", this.TraducirTexto("Errores.Invalidos.Fecha"), false, "ValidFecha"));
        }
Example #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region IsAuthenticated
            if (Session["Usuario"] != null)
            {
                usuario = (IUsuarios)Session["Usuario"];
            }


            if (User.Identity.IsAuthenticated)
            {
                string       sOpcion = "ReporteAutorizacionVD";
                SisPacK.Menu oMenu   = (SisPacK.Menu) this.FindControl("Menu1");
                this.ValidarSeguridad(oMenu, sOpcion);
            }
            #endregion

            #region Reportes
            string permiteReportes   = System.Configuration.ConfigurationSettings.AppSettings["Server"];
            string dirServerReportes = System.Configuration.ConfigurationSettings.AppSettings["DirServerReportes"];

            //if (permiteReportes == "P")
            //{
            //    // si no permite reportes, entonces redirecciona al servidor de reportes
            //    string pass = Session["Pass"] != null ? Session["Pass"].ToString() : "";
            //    Response.Redirect(dirServerReportes + "Redirecciona.aspx?LoginRedir=" + this.UsuarioConectadoID + "&p=" + pass + "&Pagina=ReporteAutorizacionVD.aspx");
            //}
            #endregion

            if (!IsPostBack)
            {
                this.LlenarListas();
            }
            this.RegistrarScripts();
            this.lstAgOrigen.Attributes.Add("onclick", "DesmarcarAgOriTodos();");
            this.lstUnidadesVenta.Attributes.Add("onclick", "DesmarcarUnVtaTodos();");
            this.lstClientes.Attributes.Add("onclick", "DesmarcarClienteTodos();");
            this.lstDestinos.Attributes.Add("onclick", "DesmarcarDestinoTodos();");
            this.lstUsuario.Attributes.Add("onclick", "DesmarcarUsuarioTodos();");

            this.chkUnidadesVentas.Attributes.Add("onclick", "ChangeUnidadVentaTodos();");
            this.chkAgOrigenTodas.Attributes.Add("onclick", "ChangeAgOrigenTodos();");
            this.chkClientes.Attributes.Add("onclick", "ChangeClienteTodos();");
            this.chkDestinos.Attributes.Add("onclick", "ChangeDestinoTodos();");
            this.chkUsuarios.Attributes.Add("onclick", "ChangeUsuarioTodos();");

            this.plFechaFin.Controls.Add(GenerarValidadores.Fecha("txtFechaFin", this.TraducirTexto("Errores.Invalidos.FechaFinVigencia")));
            this.plFechaInicio.Controls.Add(GenerarValidadores.Fecha("txtFechaInicio", this.TraducirTexto("Errores.Invalidos.FechaFinVigencia")));
        }
 private void SetearValidadores()
 {
     this.phValidPlanillaRemitoNro.Controls.Add(GenerarValidadores.Requerido("txtPlanillaRemitoNro", this.TraducirTexto("Errores.Requerido.PlanillaRemito"), false, "ReqPlaRemNro"));
     this.phValidPlanillaRemitoNro.Controls.Add(GenerarValidadores.Entero("txtPlanillaRemitoNro", this.TraducirTexto("Errores.Invalidos.PlanillaRemito"), false, "ValPlaRemNro"));
     this.phValidNombre.Controls.Add(GenerarValidadores.Requerido("txtNombre", this.TraducirTexto("Errores.Obligatorios.Nombre")));
     this.phValidNombre.Controls.Add(GenerarValidadores.Nombre("txtNombre", this.TraducirTexto("Errores.Invalidos.Nombre")));
     this.phValidApellido.Controls.Add(GenerarValidadores.Requerido("txtApellido", this.TraducirTexto("Errores.Obligatorios.Apellido")));
     this.phValidApellido.Controls.Add(GenerarValidadores.Nombre("txtApellido", this.TraducirTexto("Errores.Invalidos.Apellido")));
     this.phValidNroDoc.Controls.Add(GenerarValidadores.Requerido("txtNroDoc", this.TraducirTexto("Errores.Requerido.NroDoc")));
     this.phValidNroDoc.Controls.Add(GenerarValidadores.Entero("txtNroDoc", this.TraducirTexto("Errores.Invalidos.NroDoc")));
     this.phValidTipoDoc.Controls.Add(GenerarValidadores.Requerido("ddlTipoDoc", this.TraducirTexto("Errores.Obligatorios.TipoDoc")));
     this.phValidTipoDoc.Controls.Add(GenerarValidadores.Entero("ddlTipoDoc", this.TraducirTexto("Errores.Invalidos.TipoDoc")));
     this.phValidFechaRecepcion.Controls.Add(GenerarValidadores.Fecha("txtFechaRecepcion", this.TraducirTexto("Errores.Invalidos.FechaRecepcion")));
     this.phValidFechaRecepcion.Controls.Add(GenerarValidadores.Requerido("txtFechaRecepcion", this.TraducirTexto("Errores.Obligatorios.FechaRecepcion")));
 }
 private void SetearValidadores()
 {
     try
     {
         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 validRango = (CustomValidator)GenerarValidadores.Custom("", "", true, "rangoValid");
         validRango.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(ValidateRango);
         phFechaHasta.Controls.Add(validRango);
     }
     catch (Exception ex)
     {
         ((SisPacK.ErrorWeb)phErrores.Controls[0]).setMensaje(ex.Message);
     }
 }
        private void SetearValidadores()
        {
            this.phValidNombre.Controls.Add(GenerarValidadores.Requerido("txtNombre", this.TraducirTexto("Errores.Obligatorios.Nombre")));

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

            validadorEsPropia.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateEsPropia);
            this.phValidEsPropia.Controls.Add(validadorEsPropia);

            this.phValidFechaFinVigencia.Controls.Add(GenerarValidadores.Fecha("txtFechaFinVigencia", this.TraducirTexto("Errores.Invalidos.FechaFinVigencia")));

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

            validadorFechaFin.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateFechaFin);
            this.phValidFechaFinVigencia.Controls.Add(validadorFechaFin);
        }
Example #26
0
        private void dtgAgencias_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                /*int empresaID = DataBinder.Eval(e.Item.DataItem, "EmpresaID") == null ? 0 : Convert.ToInt32(DataBinder.Eval(e.Item.DataItem, "EmpresaID"));
                 * if(empresaID != 0)
                 * {
                 *      IEmpresa unidadNegocio = UnidadNegocioFactory.GetUnidadNegocio();
                 *      unidadNegocio.UnidadNegocioID = unidadNegocioID;
                 *      unidadNegocio.Consultar();
                 *      if(unidadNegocio.EsPropia)
                 *              e.Item.Cells[6].Text = "";
                 * }*/
            }
            else if (e.Item.ItemType == ListItemType.EditItem)
            {
                DropDownList ddlEmpresas = (DropDownList)e.Item.FindControl("ddlEmpresas");

                if (this.Request.QueryString["Tipo"] == "Administracion")
                {
                    SisPackController.LlenarCombos.Empresa(ddlEmpresas, this.TraducirTexto("Combos.ElijaEmpresa"), this.UnidadNegocioID);
                }
                else if (this.Request.QueryString["Tipo"] == "AdministracionUN")
                {
                    SisPackController.LlenarCombos.Empresa(ddlEmpresas, this.TraducirTexto("Combos.ElijaEmpresa"));
                }

                TextBox txtNroSucursal         = (TextBox)e.Item.FindControl("txtNroSucursal");
                TextBox txtFechaInicioVigencia = (TextBox)e.Item.FindControl("txtFechaInicioVigencia");
                TextBox txtFechaFinVigencia    = (TextBox)e.Item.FindControl("txtFechaFinVigencia");

                //validaciones
                PlaceHolder phValidFechaFinVigencia = (PlaceHolder)e.Item.FindControl("phValidFechaFinVigencia");
                //phValidFechaFinVigencia.Controls.Add(GenerarValidadores.Requerido("txtFechaFinVigencia", this.TraducirTexto("Errores.Obligatorios.FechaFinVigencia"), true, "reqFechaFinVigencia"));
                phValidFechaFinVigencia.Controls.Add(GenerarValidadores.Fecha("txtFechaFinVigencia", this.TraducirTexto("Errores.Invalidos.Fecha"), true, "validFechaFinVigencia"));

                PlaceHolder phValidSucursalDGI = (PlaceHolder)e.Item.FindControl("phValidSucursalDGI");
                phValidSucursalDGI.Controls.Add(GenerarValidadores.Requerido("txtNroSucursal", this.TraducirTexto("Errores.Obligatorios.NroSucursal"), true, "reqNroSucursal"));
                phValidSucursalDGI.Controls.Add(GenerarValidadores.Entero("txtNroSucursal", this.TraducirTexto("Errores.Invalidos.NroSucursal"), true, "validNroSucursal"));

                /*this.txtFechaInicioVigencia.Text = txtFechaFinVigencia.Text;
                 * this.txtFechaFinVigencia.Text = txtFechaFinVigencia.Text;
                 * CustomValidator validadorRangoFechas = (CustomValidator) GenerarValidadores.Custom();
                 * validadorRangoFechas.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateRangoFechas);
                 * phValidFechaHastaIncentivo.Controls.Add(validadorRangoFechas);*/
            }
        }
Example #27
0
        public void Validaciones()
        {
            CustomValidator valGuias = (CustomValidator)GenerarValidadores.Custom("", "", false, "valGuiasPendientes");

            valGuias.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidateGuias);
            this.phValidGuias.Controls.Add(valGuias);
            //this.phValidObservaciones.Controls.Add(GenerarValidadores.Requerido("txtObservaciones", this.TraducirTexto("Errores.Obligatorios.Observaciones"), true, "valReqObservaciones"));
            this.phValidFechaConsolidado.Controls.Add(GenerarValidadores.Requerido("txtFechaConsolidado", this.TraducirTexto("Errores.Obligatorios.Fecha")));
            this.phValidFechaConsolidado.Controls.Add(GenerarValidadores.Fecha("txtFechaConsolidado", this.TraducirTexto("Errores.Invalidos.Fecha")));
            this.phValidImporteFactura.Controls.Add(GenerarValidadores.DecimalPositivo("txtImporteFactura", this.TraducirTexto("Errores.Invalidos.ImporteFactura"), true, "valImporteFactura"));
            this.phValidDestino.Controls.Add(GenerarValidadores.Requerido("ddlDestino", this.TraducirTexto("Errores.Obligatorios.Destino"), false, "valDestino"));

            CustomValidator valNroFactura = (CustomValidator)GenerarValidadores.Custom("", "", false, "nroFacturaValid");

            valNroFactura.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(ValidarNroFactura);
            phValidNroFactura.Controls.Add(valNroFactura);
        }
        private void SetearValidadores()
        {
            if (this.radioTipo.Checked)
            {
                this.phValidTipoGuia.Controls.Add(GenerarValidadores.Requerido("ddlTipoGuia", this.TraducirTexto("Errores.Obligatorios.TipoGuia"), false, "validTipoGuia"));
                this.phValidNroSucursal.Controls.Add(GenerarValidadores.Requerido("txtNroSucursal", this.TraducirTexto("Errores.Obligatorios.NroSucursal"), false, "validNroSucursal"));
                this.phValidNroGuia.Controls.Add(GenerarValidadores.Requerido("txtNroGuia", this.TraducirTexto("Errores.Obligatorios.NroGuia"), false, "validNroGuia"));

                this.phValidNroSucursal.Controls.Add(GenerarValidadores.Entero("txtNroSucursal", this.TraducirTexto("Errores.Invalidos.NroSucursal"), false, "validNroSucursalInv"));
                this.phValidNroGuia.Controls.Add(GenerarValidadores.Entero("txtNroGuia", this.TraducirTexto("Errores.Invalidos.NroGuia"), false, "validNroGuiaInv"));
            }
            else
            {
                this.phValidCodigoBarra.Controls.Add(GenerarValidadores.Requerido("txtCodigoBarra", this.TraducirTexto("Errores.Obligatorios.CodigoBarraGuia"), false, "validCodigoBarra"));
            }

            this.phValidFechaListado.Controls.Add(GenerarValidadores.Requerido("txtFechaListado", this.TraducirTexto("Errores.Obligatorios.Fecha"), false, "ReqFechaListado"));
            this.phValidFechaListado.Controls.Add(GenerarValidadores.Fecha("txtFechaListado", this.TraducirTexto("Errores.Invalidos.Fecha"), false, "ValidFechaListado"));
        }
        private void SetearValidadores()
        {
            this.phValidFechaDesde.Controls.Add(GenerarValidadores.Fecha("txtFechaDesde", this.TraducirTexto("Errores.Invalidos.Fecha"), false, "valFechaDesde"));
            this.phValidFechaHasta.Controls.Add(GenerarValidadores.Fecha("txtFechaHasta", this.TraducirTexto("Errores.Invalidos.Fecha"), false, "valFechaHasta"));
            CustomValidator validadorRangoFechas = (CustomValidator)GenerarValidadores.Custom("", "", false, "valRangoFechas");

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

            this.phValidEstadoStockFormulario.Controls.Add(GenerarValidadores.Requerido("ddlEstadoStockFormulario", "El campo Estado es obligatorio.", false, "valEstado"));
            this.phValidNroInternoDesde.Controls.Add(GenerarValidadores.Requerido("txtNroInternoDesde", "El campo Nro. de interno desde es obligatorio.", false, "reqNroInternoDesde"));
            this.phValidNroInternoDesde.Controls.Add(GenerarValidadores.EnteroPositivo("txtNroInternoDesde", "El campo Nro. de interno desde es incorrecto.", false, "valNroInternoDesde"));
            this.phValidNroInternoHasta.Controls.Add(GenerarValidadores.Requerido("txtNroInternoHasta", "El campo Nro. de interno hasta es obligatorio.", false, "reqNroInternoHasta"));
            this.phValidNroInternoHasta.Controls.Add(GenerarValidadores.EnteroPositivo("txtNroInternoHasta", "El campo Nro. de interno hasta es incorrecto.", false, "valNroInternoHasta"));
            CustomValidator validadorAgencia = (CustomValidator)GenerarValidadores.Custom("", "", false, "valAgencia");

            validadorAgencia.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(this.ValidarAgencia);
            this.phValidAgencia.Controls.Add(validadorAgencia);
        }
Example #30
0
 private void SetearValidadores()
 {
     try
     {
         phFechaDesde.Controls.Add(GenerarValidadores.Fecha("txtFechaDesde", "La fecha desde debe tener el formato DD/MM/AAAA", true, "desdeValid"));
         phFechaDesde.Controls.Add(GenerarValidadores.Requerido("txtFechaDesde", "Debe ingresar la fecha Desde", true, "desdeReq"));
         phFechaHasta.Controls.Add(GenerarValidadores.Fecha("txtFechaHasta", "La fecha hasta debe tener el formato DD/MM/AAAA", true, "hastaValid"));
         phFechaHasta.Controls.Add(GenerarValidadores.Requerido("txtFechaHasta", "Debe ingresar la fecha Hasta", true, "hastaReq"));
         PHDesdeImporteTotal.Controls.Add(GenerarValidadores.Entero("TxtDesdeImporte", "El valor ingresado en Desde Importe Total es incorrecto. Debe ingresar un número sin decimales", true, "ValidarCampoDesdeImporte"));
         PHHastaImporteTotal.Controls.Add(GenerarValidadores.Rango("TxtDesdeImporte", "TxtHastaImporte", "El campo Hasta Importe Total debe ser mayor al campo Desde Importe Total", true, "ValidarDesdeHastaImporte", true));
         PHHastaImporteTotal.Controls.Add(GenerarValidadores.Entero("TxtHastaImporte", "El valor ingresado en Hasta Importe Total es incorrecto. Debe ingresar un número sin decimales", true, "ValidarCampoHastaImporte"));
         CustomValidator validRango = (CustomValidator)GenerarValidadores.Custom("", "", true, "rangoValid");
         validRango.ServerValidate += new System.Web.UI.WebControls.ServerValidateEventHandler(ValidateRango);
         phFechaHasta.Controls.Add(validRango);
     }
     catch (Exception ex)
     {
         ((ErrorWeb)phErrores.Controls[0]).setMensaje(ex.Message);
     }
 }