예제 #1
0
 public List <Row> listarFormulaItemsConCategoria(int elemento, int sujetoRiesgo, string tipoMedida, int linea, string funcionalidad)
 {
     try
     {
         String sql = "";
         // DataSet dataSet = MGR_Common.OracleHelper.Query(conn, MgrEnumConsultaGeneral.MgrCompendioDetalleComboReferencia, System.Data.CommandType.Text, parameters);
         if (ConstanteEnum.FUENTE_DATOS.Equals(elemento))
         {
             if (funcionalidad.Equals(Constantes.MEDIDA_FUNCIONALIDAD_EVALUACION))
             {
                 sql = MgrEnumConsultaGeneral.MgrFuenteDatosProcesoEvaluacionCombo(sujetoRiesgo);
             }
             else if (funcionalidad.Equals(Constantes.MEDIDA_FUNCIONALIDAD_FISCALIZACION))
             {
                 sql = MgrEnumConsultaGeneral.MgrFuenteDatosProgramaFizcalizacionCombo(sujetoRiesgo);
             }
             else if (funcionalidad.Equals(Constantes.MEDIDA_FUNCIONALIDAD_BENFORD))
             {
                 sql = MgrEnumConsultaGeneral.MgrFuenteDatosrBenfordCombo(sujetoRiesgo);
             }
             else
             {
                 //Si el tipo de medida es (Modelo Probabilistico (PR) o Red Neuronal) y Filtro es el General de la Medida (linea condiciones es igual 0 (cero).
                 if ((tipoMedida.Equals(Constantes.TIPO_MEDIDA_MODELO_PROBABILISTICO) || tipoMedida.Equals(Constantes.TIPO_MEDIDA_RED_NEURONAL)) && linea == 0)
                 {
                     sql = MgrEnumConsultaGeneral.MgrFuenteDatos1821767ConCategoriaCombo(sujetoRiesgo);
                 } //Si el tipo de medida es criterio experto o método de excepción y se trata del filtro general:
                 else if ((tipoMedida.Equals(Constantes.TIPO_MEDIDA_CRITERIO_EXPERTO) || tipoMedida.Equals(Constantes.TIPO_MEDIDA_METODO_EXCEPCION)) && linea == 0)
                 {
                     sql = MgrEnumConsultaGeneral.MgrFuenteDatos1719ConCategoriaCombo(sujetoRiesgo);
                 }
                 else
                 {
                     sql = MgrEnumConsultaGeneral.MgrFuenteDatosLineaDiferenteCeroConCategoriaCombo(sujetoRiesgo);
                 }
             }
         }
         if (ConstanteEnum.OPERADORES.Equals(elemento))
         {
             sql = MgrEnumConsultaGeneral.MgrOperadorMatematicoComboFC(elemento);
         }
         if (ConstanteEnum.FUNCIONES.Equals(elemento))
         {
             sql = MgrEnumConsultaGeneral.MgrFuncionCombo(elemento);
         }
         Row     objRow  = new Row();
         DataSet dataSet = MGR_Common.OracleHelper.Query(conn, sql, System.Data.CommandType.Text, null);
         objRow.Add("valor", dataSet);
         List <Row> obj = new List <Row>();
         obj.Add(objRow);
         return(obj);
     }
     catch (Exception e)
     {
         // throw new MgrServiceException(e.getErrorCode(), "Error al consultar los elementos");
         return(null);
     }
 }