/// <summary>
            /// The get page.
            /// </summary>
            /// <param name="pageInfo">
            /// The page info.
            /// </param>
            /// <param name="sorting">
            /// The sorting.
            /// </param>
            /// <param name="filters">
            /// The filters.
            /// </param>
            /// <returns>
            /// </returns>
            public IEnumerable <DynamicEntity> GetPage(
                PageCriteria pageInfo, IList <SortCriteria> sorting, IList <GridFilter> filters)
            {
                try
                {
                    IEnumerable <BusinessEntity> results = Instance.GetEntities(
                        this.entityName,
                        pageInfo.ToPagingInfo(),
                        filters.ToFilterExpression(this.supportState),
                        sorting.ToOrderExpressionArray());
                    return(results.Cast <DynamicEntity>().ToList());
                }
                catch (SoapException ex)
                {
                    Log.Warn("Crm service:" + ex.GetFormatedMessage(), this);
                }

                return(new List <DynamicEntity>());
            }
Пример #2
0
 /// <summary>
 /// Gets the page.
 /// </summary>
 /// <param name="page">The page.</param>
 /// <param name="sort">The sort.</param>
 /// <param name="filter">The filter.</param>
 public IEnumerable <ICrmEntity> GetPage(PageCriteria page, IList <SortCriteria> sort, IList <GridFilter> filter)
 {
     return(this.EntityRepository.GetEntities(this.logicalName, page.ToPagingInfo(),
                                              sort.ToOrderExpressionArray(), GetFiltersDictionary(filter), this.onlyActive));
 }