Example #1
0
        private bool ApplyItems(bool append)
        {
            var items = _itemPaginationService.Fetch();

            if (items.Count == 0)
            {
                Browser.AddItems(new List <List <JsonItem> >(0));
                return(false);
            }

            _itemStatService.ApplyStats(items);

            var convertedItems = ItemHtmlWriter.ToJsonSerializable(items);

            if (append)
            {
                Browser.AddItems(convertedItems);
            }
            else
            {
                Browser.SetItems(convertedItems, _itemPaginationService.NumItems);
            }

            // UpdateCollectionItems();
            return(true);
        }
Example #2
0
        private bool ApplyItems()
        {
            var items = _itemPaginatorService.Fetch();

            if (items.Count == 0)
            {
                JsBind.ItemSourceExhausted = true;
                return(false);
            }

            _itemStatService.ApplyStats(items);

            var convertedItems = ItemHtmlWriter.ToJsonSerializeable(items);

            JsBind.UpdateItems(convertedItems);
            return(true);
        }