Beispiel #1
0
        /// <summary>
        /// Busca las coincidencias en la lista proporcionada
        /// </summary>
        /// <param name="pListQuery">Lista de Query donde se buscará</param>
        /// <param name="NameInclude">Busqueda por nombre de tabla incluida</param>
        /// <param name="IdQuery">Id del query dentro de la lista</param>
        /// <returns>Lista de Querys coincidentes</returns>
        public static List <Query> FindAll(Query[] pListQuery, string NameInclude = null, int?IdQuery = null)
        {
            SearchNameInclude.Clear();
            SearchIdQuery.Clear();
            List <Query> Query     = new List <Common.Query>();
            var          ListQuery = pListQuery.ToList();

            try
            {
                if (!string.IsNullOrEmpty(NameInclude))
                {
                    Query = FindRecursive(ListQuery, NameInclude);
                }
                else if (IdQuery.HasValue)
                {
                    Query = FindRecursive(ListQuery, IdQuery.Value);
                }
                else
                {
                    Query = new List <Common.Query>();
                }
            }
            catch (Exception)
            {
                // Exceptios
            }
            return(Query);
        }
Beispiel #2
0
        /// <summary>
        /// Busca un Query en la lista proporcionada
        /// </summary>
        /// <param name="pListQuery">Lista de Query donde se buscará</param>
        /// <param name="NameInclude">Busqueda por nombre de tabla incluida</param>
        /// <param name="IdQuery">Id del query dentro de la lista</param>
        /// <returns>Lista de Querys coincidentes</returns>
        public static Query FindFirst(Query[] pListQuery, int IdQuery)
        {
            SearchNameInclude.Clear();
            SearchIdQuery.Clear();
            List <Query> Query     = new List <Common.Query>();
            var          ListQuery = pListQuery.ToList();

            try
            {
                Query = FindRecursive(ListQuery, IdQuery);
            }
            catch (Exception)
            {
                // Exceptios
            }
            return(Query.First());
        }
Beispiel #3
0
        /// <summary>
        /// Busca un Query en la lista proporcionada
        /// </summary>
        /// <param name="pListQuery">Lista de Query donde se buscará</param>
        /// <param name="IdQuery">Id del query dentro de la lista</param>
        /// <returns>Lista de Querys coincidentes</returns>
        public static Query FindFirst(Query[] pListQuery, string NameInclude)
        {
            SearchNameInclude.Clear();
            SearchIdQuery.Clear();
            List <Query> Query     = new List <Common.Query>();
            var          ListQuery = pListQuery.ToList();

            try
            {
                if (!string.IsNullOrEmpty(NameInclude))
                {
                    Query = FindRecursive(ListQuery, NameInclude);
                }
                else
                {
                    Query = new List <Common.Query>();
                }
            }
            catch (Exception)
            {
                // Exceptios
            }
            return(Query.First());
        }