/// <summary>
        /// Trae los parametros por medio de un criterio
        /// </summary>
        /// <returns>un data table de clientes</returns>
        public DataTable GetManyParametro(String tipoParametro)
        {
            DataTable dtParametro;

            try
            {
                string conexionString = Conexion.ConexionGmaps();
                var    storeProcedure = new StoreProcedure("[dbo].[SP_PARAMETRO_GET_MANY_BY_TIPO]");
                storeProcedure.AddParameter("@TIPO_PARAMETRO_NV", tipoParametro, DirectionValues.Input);
                dtParametro = storeProcedure.MakeQuery(conexionString);
                if (storeProcedure.ErrorMessage != String.Empty)
                {
                    throw new Exception("Procedimiento Almacenado :[dbo].[SP_PARAMETRO_GET_ALL] Descripcion:" + storeProcedure.ErrorMessage.Trim());
                }
            }
            catch (Exception ex)
            {
                TextLogger.LogError(LogManager.GetCurrentClassLogger(), ex, "Error En el metodo: getManyParametro");
                throw new Exception("Procedimiento Almacenado :[dbo].[SP_PARAMETRO_GET_ALL]" + ex);
            }
            return(dtParametro);
        }
Beispiel #2
0
        /// <summary>
        /// Trae los puntos por medio de un criterio
        /// </summary>
        /// <returns>un data table de clientes</returns>
        public DataTable GetManyPuntoByTipoId(int tipoPuntoId, int departamentoId)
        {
            DataTable dtPuntos;

            try
            {
                string conexionString = Conexion.ConexionGmaps();
                var    storeProcedure = new StoreProcedure("[dbo].[SP_PUNTO_GET_MANY_BY_TIPO]");
                storeProcedure.AddParameter("@TIPO_PUNTO_ID_IN", tipoPuntoId, DirectionValues.Input);
                storeProcedure.AddParameter("@DEPARTAMENTO_ID_IN", departamentoId, DirectionValues.Input);
                dtPuntos = storeProcedure.MakeQuery(conexionString);
                if (storeProcedure.ErrorMessage != String.Empty)
                {
                    throw new Exception("Procedimiento Almacenado :[dbo].[SP_PUNTO_GET_MANY_BY_TIPO] Descripcion:" + storeProcedure.ErrorMessage.Trim());
                }
            }
            catch (Exception ex)
            {
                TextLogger.LogError(LogManager.GetCurrentClassLogger(), ex, "Error En el metodo: getManyPuntoByTipoId");
                throw new Exception("Procedimiento Almacenado :[dbo].[SP_PUNTO_GET_MANY_BY_TIPO]" + ex);
            }
            return(dtPuntos);
        }