Ejemplo n.º 1
0
        void InsertClimaLaboral()
        {
            BPAtencion BPAtencion = new BPAtencion();

            ENTResponse oENTResponse = new ENTResponse();
            ENTAtencion oENTAtencion = new ENTAtencion();
            ENTSession oENTSession;

            DataTable tblUsuario = null;
            DataRow rowUsuario;

            try
            {

                // Obtener el DataTable del grid
                tblUsuario = gcParse.GridViewToDataTable(this.gvUsuario, false);

                // Validaciones
                if (tblUsuario.Rows.Count == 0) { throw (new Exception("Es necesario seleccionar por lo menos un Usuario")); }
                if (this.ckeObservaciones.Text.Trim() == "") { throw new Exception("El campo [Observaciones] es requerido"); }

                // Obtener la sesión
                oENTSession = (ENTSession)this.Session["oENTSession"];

                // Formulario
                oENTAtencion.UsuarioIdInsert = oENTSession.idUsuario;
                oENTAtencion.Grupal = Int16.Parse( ( tblUsuario.Rows.Count == 1 ? "0" : "1" ));
                oENTAtencion.Observaciones = this.ckeObservaciones.Text.Trim();

                // Usuarioes seleccionadas
                oENTAtencion.tblUsuario = new DataTable("tblUsuario");
                oENTAtencion.tblUsuario.Columns.Add("idUsuario", typeof(Int32));

                foreach(DataRow oDataRow in tblUsuario.Rows){

                    rowUsuario = oENTAtencion.tblUsuario.NewRow();
                    rowUsuario["idUsuario"] = oDataRow["idUsuario"];
                    oENTAtencion.tblUsuario.Rows.Add(rowUsuario);
                }

                // Transacción
                oENTResponse = BPAtencion.InsertClimaLaboral(oENTAtencion);

                // Errores y Warnings
                if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); }
                if (oENTResponse.sMessage != "") { throw (new Exception(oENTResponse.sMessage)); }

                // Transacción exitosa
                Clear();

                //Mensaje de usuario
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('Clima laboral registrado con éxito'); focusControl('" + this.ddlUsuario.ClientID + "');", true);

            }catch (Exception ex){
                throw (ex);
            }
        }
Ejemplo n.º 2
0
        // Funciones el programador
        void InsertAtencionDoctor()
        {
            ENTAtencion oENTAtencion = new ENTAtencion();
            ENTResponse oENTResponse = new ENTResponse();

            BPAtencion oBPAtencion = new BPAtencion();

            try
            {

                // Validaciones
                if (this.ddlDoctor.SelectedItem.Value == "0") { throw (new Exception("Es necesario seleccionar un doctor")); }

                // Formulario
                oENTAtencion.AtencionId = Int32.Parse(this.hddAtencionId.Value);
                oENTAtencion.FuncionarioId = Int32.Parse(this.ddlDoctor.SelectedItem.Value);

                // Transacción
                oENTResponse = oBPAtencion.InsertAtencionDoctor(oENTAtencion);

                // Errores y Warnings
                if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); }
                if (oENTResponse.sMessage != "") { throw (new Exception(oENTResponse.sMessage)); }

            }catch (Exception ex){
                throw (ex);
            }
        }
Ejemplo n.º 3
0
        void SelectAtencion()
        {
            BPAtencion oBPAtencion = new BPAtencion();
            ENTAtencion oENTAtencion = new ENTAtencion();
            ENTResponse oENTResponse = new ENTResponse();

            try
            {

                // Formulario
                oENTAtencion.AtencionId = Int32.Parse(this.hddAtencionId.Value);

                // Transacción
                oENTResponse = oBPAtencion.SelectAtencion_Detalle(oENTAtencion);

                // Errores y Warnings
                if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); }
                if (oENTResponse.sMessage != "") { throw (new Exception(oENTResponse.sMessage)); }

                // Formulario
                this.AtencionNumeroFolio.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["AtencionNumeroFolio"].ToString();
                this.AfectadoLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["Ciudadanos"].ToString();
                this.AtencionNumeroOficio.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["AtencionNumeroOficio"].ToString();
                this.AreaLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["Area"].ToString();
                this.ExpedienteNumeroLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["ExpedienteNumero"].ToString();
                this.SolicitudNumeroLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["SolicitudNumero"].ToString();
                this.EstatusLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["EstatusNombre"].ToString();
                this.DoctorLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["FuncionarioNombre"].ToString();

                this.FechaAtencionLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["FechaAtencion"].ToString();
                this.FechaAsignacionLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["FechaAsignacion"].ToString();
                this.UltimaModificacionLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["FechaUltimaModificacion"].ToString();

                this.DictamenMedicoLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["TipoDictamenNombre"].ToString();
                this.LugarRevisionLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["LugarAtencionNombre"].ToString();

            }catch (Exception ex){
                throw (ex);
            }
        }
Ejemplo n.º 4
0
        void SelectAtencion_ForEdit(Int32 AtencionId)
        {
            BPAtencion oBPAtencion = new BPAtencion();

            ENTResponse oENTResponse = new ENTResponse();
            ENTAtencion oENTAtencion = new ENTAtencion();

            RadioButton oRadioButton;

            try
            {

                //Formulario
                oENTAtencion.AtencionId = AtencionId;

                //Transacción
                oENTResponse = oBPAtencion.SelectAtencion_Detalle_ById(oENTAtencion);

                //Validación
                if (oENTResponse.GeneratesException) { throw new Exception(oENTResponse.sErrorMessage); }
                if (oENTResponse.sMessage != "") { throw new Exception(oENTResponse.sMessage); }

                // Actualizar grid
                this.txtNumeroOficio.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["NumeroOficio"].ToString();
                this.ddlTipoDictamen.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["TipoDictamenId"].ToString();
                this.ddlLugarAtencion.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["LugarAtencionId"].ToString();

                // Ciudadano de la atención
                foreach (GridViewRow gvRow in this.gvCiudadano.Rows) {

                    oRadioButton = (RadioButton)this.gvCiudadano.Rows[gvRow.RowIndex].FindControl("RowSelector");
                    oRadioButton.Checked = ( oENTResponse.dsResponse.Tables[2].Select("CiudadanoId=" + this.gvCiudadano.DataKeys[gvRow.RowIndex]["CiudadanoId"].ToString() ).Length > 0 ? true : false );
                }

                // Detalle de la atención
                this.ckeDetalle.Text = oENTResponse.dsResponse.Tables[3].Select("Dictamen=0")[0]["Detalle"].ToString();

            }catch (Exception ex){
                throw (ex);
            }
        }
Ejemplo n.º 5
0
        void UpdateAtencion()
        {
            BPAtencion oBPAtencion = new BPAtencion();

            ENTResponse oENTResponse = new ENTResponse();
            ENTAtencion oENTAtencion = new ENTAtencion();
            ENTSession oENTSession;

            String CiudadanoId = "";
            RadioButton oRadioButton;

            try
            {

               // Obtener Sesion
                oENTSession = (ENTSession)this.Session["oENTSession"];

                // Obtener la autoridad seleccionada
                foreach (GridViewRow gvRow in this.gvCiudadano.Rows) {

                    oRadioButton = (RadioButton)this.gvCiudadano.Rows[gvRow.RowIndex].FindControl("RowSelector");
                    if (oRadioButton.Checked) {
                        CiudadanoId = this.gvCiudadano.DataKeys[gvRow.RowIndex]["CiudadanoId"].ToString();
                    }
                }

                //Formulario
                oENTAtencion.AtencionId = Int32.Parse(this.hddAtencionId.Value);
                oENTAtencion.SolicitudId = Int32.Parse(this.hddSolicitudId.Value);
                oENTAtencion.ExpedienteId = Int32.Parse(this.hddExpedienteId.Value);
                oENTAtencion.LugarAtencionId = Int32.Parse(this.ddlLugarAtencion.SelectedItem.Value);
                oENTAtencion.ModuloId = 3; // Visitadurías
                oENTAtencion.TipoDictamenId = Int32.Parse(this.ddlTipoDictamen.SelectedItem.Value);
                oENTAtencion.CiudadanoId = Int32.Parse(CiudadanoId);
                oENTAtencion.IdUsuario = oENTSession.idUsuario;
                oENTAtencion.NumeroOficio = this.txtNumeroOficio.Text.Trim();
                oENTAtencion.Detalle = this.ckeDetalle.Text.Trim();

                //Transacción
                oENTResponse = oBPAtencion.UpdateAtencion(oENTAtencion);

                //Validación
                if (oENTResponse.GeneratesException) { throw new Exception(oENTResponse.sErrorMessage); }
                if (oENTResponse.sMessage != "") { throw new Exception(oENTResponse.sMessage); }

                // Actualizar grid
                SelectExpediente();

            }catch (Exception ex){
                throw (ex);
            }
        }
Ejemplo n.º 6
0
        // Rutinas el programador
        void DeleteAtencion( Int32 AtencionId)
        {
            BPAtencion oBPAtencion = new BPAtencion();

            ENTResponse oENTResponse = new ENTResponse();
            ENTAtencion oENTAtencion = new ENTAtencion();

            try
            {

                // Formulario
                oENTAtencion.AtencionId = AtencionId;

                // Transacción
                oENTResponse = oBPAtencion.DeleteAtencion(oENTAtencion);

                // Validación
                if (oENTResponse.GeneratesException) { throw new Exception(oENTResponse.sErrorMessage); }
                if (oENTResponse.sMessage != "") { throw new Exception(oENTResponse.sMessage); }

                // Actualizar grid
                SelectExpediente();

            }catch (Exception ex){
                throw (ex);
            }
        }
Ejemplo n.º 7
0
        // Rutinas del grid Anidado
        void SelectAtencion_Detalle(Int32 AtencionId)
        {
            BPAtencion oBPAtencion = new BPAtencion();

            ENTResponse oENTResponse = new ENTResponse();
            ENTAtencion oENTAtencion = new ENTAtencion();

            try
            {

                //Formulario
                oENTAtencion.AtencionId = AtencionId;

                //Transacción
                oENTResponse = oBPAtencion.SelectAtencion_Detalle_ById(oENTAtencion);

                //Validación
                if (oENTResponse.GeneratesException) { throw new Exception(oENTResponse.sErrorMessage); }
                if (oENTResponse.sMessage != "") { throw new Exception(oENTResponse.sMessage); }

                // Actualizar grid
                gvAtencionDetalle.DataSource = oENTResponse.dsResponse.Tables[3];
                gvAtencionDetalle.DataBind();

            }catch (Exception ex){
                throw (ex);
            }
        }
Ejemplo n.º 8
0
        void RechazarAtencion()
        {
            BPAtencion oBPAtencion = new BPAtencion();
            ENTAtencion oENTAtencion = new ENTAtencion();
            ENTResponse oENTResponse = new ENTResponse();

            try
            {

                // TODO: Checar en el SP la actualización de la fecha/hora
                // Formulario
                oENTAtencion.AtencionId = Int32.Parse(this.hddAtencionId.Value);
                oENTAtencion.EstatusId = 18; // Por atender atención
                oENTAtencion.ModuloId = 5; // Atención a Víctimas

                // Transacción
                oENTResponse = oBPAtencion.UpdateAtencion_Estatus(oENTAtencion);

                // Errores y Warnings
                if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); }
                if (oENTResponse.sMessage != "") { throw (new Exception(oENTResponse.sMessage)); }

            }catch (Exception ex){
                throw (ex);
            }
        }
Ejemplo n.º 9
0
        void SelectAtencion()
        {
            BPAtencion oBPAtencion = new BPAtencion();
            ENTAtencion oENTAtencion = new ENTAtencion();
            ENTResponse oENTResponse = new ENTResponse();

            try
            {

                // Formulario
                oENTAtencion.AtencionId = Int32.Parse(this.hddAtencionId.Value);

                // Transacción
                oENTResponse = oBPAtencion.SelectAtencion_Detalle(oENTAtencion);

                // Errores y Warnings
                if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); }
                if (oENTResponse.sMessage != "") { throw (new Exception(oENTResponse.sMessage)); }

                // Campos ocultos
                this.hddEstatusId.Value = oENTResponse.dsResponse.Tables[1].Rows[0]["EstatusId"].ToString();
                this.hddFuncionarioId.Value = oENTResponse.dsResponse.Tables[1].Rows[0]["FuncionarioId"].ToString();

                // Formulario
                this.AtencionNumeroFolio.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["AtencionNumeroFolio"].ToString();
                this.AfectadoLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["Ciudadanos"].ToString();
                this.AtencionNumeroOficio.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["AtencionNumeroOficio"].ToString();
                this.AreaLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["Area"].ToString();
                this.ExpedienteNumeroLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["ExpedienteNumero"].ToString();
                this.SolicitudNumeroLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["SolicitudNumero"].ToString();
                this.EstatusLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["EstatusNombre"].ToString();
                this.DoctorLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["FuncionarioNombre"].ToString();

                this.FechaAtencionLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["FechaAtencion"].ToString();
                this.FechaAsignacionLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["FechaAsignacion"].ToString();
                this.UltimaModificacionLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["FechaUltimaModificacion"].ToString();

                this.DictamenMedicoLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["TipoDictamenNombre"].ToString();
                this.LugarRevisionLabel.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["LugarAtencionNombre"].ToString();

                // Grid
                this.gvAtencionDetalle.DataSource = oENTResponse.dsResponse.Tables[2];
                this.gvAtencionDetalle.DataBind();

                // Documentos
                if (oENTResponse.dsResponse.Tables[3].Rows.Count == 0){

                    this.SinDocumentoLabel.Text = "<br /><br />No hay documentos anexados al Dictámen";
                }else{

                    this.SinDocumentoLabel.Text = "";
                    this.dlstDocumentoList.DataSource = oENTResponse.dsResponse.Tables[3];
                    this.dlstDocumentoList.DataBind();
                }

                // Dictámen
                this.gvDictamen.DataSource = oENTResponse.dsResponse.Tables[4];
                this.gvDictamen.DataBind();

            }catch (Exception ex){
                throw (ex);
            }
        }
Ejemplo n.º 10
0
        // Funciones el programador
        void UpdateAtencion_NumeroFolio()
        {
            ENTAtencion oENTAtencion = new ENTAtencion();
            ENTResponse oENTResponse = new ENTResponse();

            BPAtencion oBPAtencion = new BPAtencion();

            try
            {

                // Validaciones
                if (this.txtNumeroFolio.Text.Trim() == "") { throw (new Exception("Es necesario ingresar un número de folio")); }

                // Formulario
                oENTAtencion.AtencionId = Int32.Parse(this.hddAtencionId.Value);
                oENTAtencion.NumeroFolio = this.txtNumeroFolio.Text.Trim();

                // Transacción
                oENTResponse = oBPAtencion.InsertAtencionDoctor(oENTAtencion);

                // Errores y Warnings
                if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); }
                if (oENTResponse.sMessage != "") { throw (new Exception(oENTResponse.sMessage)); }

            }catch (Exception ex){
                throw (ex);
            }
        }
Ejemplo n.º 11
0
        // Rutinas del programador
        private void SelectAtencion(Boolean Recovery)
        {
            BPAtencion oBPAtencion = new BPAtencion();
            ENTAtencion oENTAtencion = new ENTAtencion();
            ENTResponse oENTResponse = new ENTResponse();

            try
            {

                // Formulario
                oENTAtencion.Numero = this.txtAtencionNumero.Text.Trim();
                oENTAtencion.Quejoso = this.txtQuejoso.Text.Trim();
                oENTAtencion.FuncionarioId = Int32.Parse(this.ddlDoctor.SelectedItem.Value);
                oENTAtencion.FechaDesde = (Recovery ? dtBeginDate : this.wucBeginDate.BeginDate);
                oENTAtencion.FechaHasta = (Recovery ? dtEndDate : this.wucEndDate.EndDate);

                // Transacción
                oENTResponse = oBPAtencion.SelectAtencion_Filtro(oENTAtencion);

                // Errores
                if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); }

                // Warnings
                if (oENTResponse.sMessage != "") { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('" + oENTResponse.sMessage + "');", true); }

                // Llenado de control
                this.gvAtencion.DataSource = oENTResponse.dsResponse.Tables[1];
                this.gvAtencion.DataBind();

            }catch (Exception ex){
                throw (ex);
            }
        }
Ejemplo n.º 12
0
        // Rutinas del programador
        private void SelectAtencion()
        {
            BPAtencion oBPAtencion = new BPAtencion();
            ENTAtencion oENTAtencion = new ENTAtencion();
            ENTResponse oENTResponse = new ENTResponse();

            ENTSession oSession = (ENTSession)Session["oENTSession"];

            try
            {

                // Formulario
                oENTAtencion.IdUsuario = oSession.idUsuario;
                oENTAtencion.Nivel = 0;

                // Transacción
                oENTResponse = oBPAtencion.SelectAtencion(oENTAtencion);

                // Errores
                if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); }

                // Warnings
                if (oENTResponse.sMessage != "") { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('" + oENTResponse.sMessage + "');", true); }

                // Llenado de control
                this.gvAtencion.DataSource = oENTResponse.dsResponse.Tables[1];
                this.gvAtencion.DataBind();

            }catch (Exception ex){
                throw (ex);
            }
        }
Ejemplo n.º 13
0
        void SetCheckList()
        {
            BPAtencion oBPAtencion = new BPAtencion();
            ENTAtencion oENTAtencion = new ENTAtencion();
            ENTResponse oENTResponse = new ENTResponse();

            try
            {

                // Formulario
                oENTAtencion.AtencionId = Int32.Parse(this.hddAtencionId.Value);

                // Transacción
                oENTResponse = oBPAtencion.SelectAtencion_Detalle(oENTAtencion);

                // Errores y Warnings
                if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); }
                if (oENTResponse.sMessage != "") { throw (new Exception(oENTResponse.sMessage)); }

                // Gestiones
                if (oENTResponse.dsResponse.Tables[4].Rows.Count == 0){
                    this.imgDictamen.ImageUrl = "~/Include/Image/Icon/AsignarIcon_Pending.png";
                    this.imgDictamen.ToolTip = "No se ha emitido el dictamen del expediente de atención a víctimas";
                    this.btnEnviar.Enabled = false;
                    this.btnEnviar.CssClass = "Button_General_Disabled";
                }

            }catch (Exception ex){
                throw (ex);
            }
        }
Ejemplo n.º 14
0
        public void PresentaReporte(string TipoReporte, DateTime FechaInicial, DateTime FechaFinal, int AreaId)
        {
            ENTResponse oResponse = new ENTResponse();
            System.Data.DataSet ds = new System.Data.DataSet();

            try
            {
                switch (TipoReporte)
                {
                    case "rptVisitaduriaGeneralpage":

                        // Declara Entidad y Buiseness
                        ENTVisitaduria entGVis = new ENTVisitaduria();
                        BPVisitaduria bssGVis = new BPVisitaduria();

                        // Asigna valores
                        entGVis.FechaDesde = FechaInicial.ToString("yyyy-MM-dd");
                        entGVis.FechaHasta = FechaFinal.ToString("yyyy-MM-dd");
                        entGVis.AreaId = AreaId;

                        //// Consulta reporte
                        oResponse = bssGVis.RptGeneralVisitaduria(entGVis);

                        oResponse.dsResponse.Tables[0].TableName = "tblExpPeriodo_I";
                        oResponse.dsResponse.Tables[1].TableName = "tblExpMedidaCautelar_II";
                        oResponse.dsResponse.Tables[2].TableName = "tblExpSolicitudGestion_III";
                        oResponse.dsResponse.Tables[3].TableName = "tblExpVisitaduriaGeneral_IV";
                        oResponse.dsResponse.Tables[4].TableName = "tblExpConcluidos_V";
                        oResponse.dsResponse.Tables[5].TableName = "tblExpNivelAutoridadVI";
                        oResponse.dsResponse.Tables[6].TableName = "tblPersonasAtendidasVII";
                        oResponse.dsResponse.Tables[7].TableName = "tblEntrevistas_VIII";
                        oResponse.dsResponse.Tables[8].TableName = "tblSupervisores_IX";
                        oResponse.dsResponse.Tables[9].TableName = "tblResultados_X";
                        oResponse.dsResponse.Tables[10].TableName = "tblDatosGenerales";

                        rptVisGeneral rptVisitaduriaGeneral = new rptVisGeneral();
                        rptVisitaduriaGeneral.SetDataSource(oResponse.dsResponse);
                        //// Presenta reporte
                        crViewer.ReportSource = rptVisitaduriaGeneral;
                        break;

                    case "rptEstadisticaPresidencia":
                        // Declara Entidad y Buiseness
                        ENTQueja entEstadisticaPresindecia = new ENTQueja();
                        BPQueja bssEstadisticaPresindecia = new BPQueja();

                        // Asigna valores
                        entEstadisticaPresindecia.FechaDesde = FechaInicial.ToString("yyyy-MM-dd");
                        entEstadisticaPresindecia.FechaHasta = FechaFinal.ToString("yyyy-MM-dd");

                        // Consulta reporte
                        oResponse = bssEstadisticaPresindecia.RptEstadisticaPresidencia(entEstadisticaPresindecia);

                        oResponse.dsResponse.Tables[0].TableName = "tblEncabezado_0";
                        oResponse.dsResponse.Tables[1].TableName = "tblEncabezado_I";
                        oResponse.dsResponse.Tables[2].TableName = "tblIntervenciones_II";
                        oResponse.dsResponse.Tables[3].TableName = "tblAsignacionExpediente_III";
                        oResponse.dsResponse.Tables[4].TableName = "tblMecanismoApertura_IV";
                        oResponse.dsResponse.Tables[5].TableName = "tblAsignaionExpQuejas_V";
                        oResponse.dsResponse.Tables[6].TableName = "tblAsignacionExpCautelares_VI";
                        oResponse.dsResponse.Tables[7].TableName = "tblAsignacionExpGestion_VII";
                        oResponse.dsResponse.Tables[8].TableName = "tblQuejasVulnerabilidad_VIII";
                        oResponse.dsResponse.Tables[9].TableName = "tblListadoExpGeneral_IX";
                        oResponse.dsResponse.Tables[10].TableName = "tblListadoCautelares_X";
                        oResponse.dsResponse.Tables[11].TableName = "tblSolicitudesGestion_XI";
                        oResponse.dsResponse.Tables[12].TableName = "tblExpQuejaAutoridad_XII";
                        oResponse.dsResponse.Tables[13].TableName = "tblDiligenciasYEntrevistas_XIII";
                        oResponse.dsResponse.Tables[14].TableName = "tblGrupoPersonasRelacionadas_XIV";
                        oResponse.dsResponse.Tables[15].TableName = "tblOrigenPersonasRelacionadas_XV";
                        oResponse.dsResponse.Tables[16].TableName = "tblDatosGenerales";

                        rptEstadisticaPresidencia rptCREstadisticaPresidencia = new rptEstadisticaPresidencia();
                        rptCREstadisticaPresidencia.SetDataSource(oResponse.dsResponse);
                        crViewer.ReportSource = rptCREstadisticaPresidencia;
                        break;

                    case "rptIntegralVictimas":
                        // Declara Entidad y Buiseness
                        ENTAtencion entIntegralVictimas = new ENTAtencion();
                        BPAtencion bssIntegralVictimas = new BPAtencion();

                        // Asigna valores
                        entIntegralVictimas.FechaDesde = FechaInicial.ToString("yyyy-MM-dd");
                        entIntegralVictimas.FechaHasta = FechaFinal.ToString("yyyy-MM-dd");

                        // Consulta reporte
                        oResponse = bssIntegralVictimas.RptIntegralVictimas(entIntegralVictimas);

                        oResponse.dsResponse.Tables[0].TableName = "tblDMFPrevioLesiones_I";
                        oResponse.dsResponse.Tables[1].TableName = "tblDMFPrevioLesionesPorGenero_II";
                        oResponse.dsResponse.Tables[2].TableName = "tblDMFPrevioLesionesEstatus_III";
                        oResponse.dsResponse.Tables[3].TableName = "tblDictamenPsicologico_163_IV";
                        oResponse.dsResponse.Tables[4].TableName = "tblDictamenPsicologico_163_PorGenero_V";
                        oResponse.dsResponse.Tables[5].TableName = "tblOpinionMedica_VI";
                        oResponse.dsResponse.Tables[6].TableName = "tblDesgloseDictamen_VII";
                        oResponse.dsResponse.Tables[7].TableName = "tblAcompanamientoEmocional_VIII";
                        oResponse.dsResponse.Tables[7].TableName = "tblClimaLaboral_IX";
                        oResponse.dsResponse.Tables[9].TableName = "tblDatosGenerales";

                        //rptEstadisticaPresidencia rptCR = new rptEstadisticaPresidencia();
                        rptIntegralVictimas rptCRIntegralVictimas = new rptIntegralVictimas();
                        rptCRIntegralVictimas.SetDataSource(oResponse.dsResponse);
                        crViewer.ReportSource = rptCRIntegralVictimas;
                        break;
                }
            }
            catch
            { }
            finally
            { }
        }