From f196c4349182c6e07ff481da48857581e5ef39a1 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 24 Jan 2020 21:47:07 +0000 Subject: [PATCH] --- server/AyaNova/DataList/DataListFetcher.cs | 31 ++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/server/AyaNova/DataList/DataListFetcher.cs b/server/AyaNova/DataList/DataListFetcher.cs index 5fc9a76e..a3942c19 100644 --- a/server/AyaNova/DataList/DataListFetcher.cs +++ b/server/AyaNova/DataList/DataListFetcher.cs @@ -179,9 +179,36 @@ namespace AyaNova.DataList //BUILD THE PAGING LINKS PORTION //var pageLinks = new PaginationLinkBuilder(Url, routeName, null, listOptions, totalRecordCount).PagingLinksObject(); - //http://localhost:7575/api/v8/DataList/List?Mini=true&DataListKey=TestWidgetDataList + //http://localhost:7575/api/v8/DataList/List?Offset=2&Limit=3&DataFilterId=2&Mini=true&DataListKey=TestWidgetDataList - var pageLinks = new PaginationLinkBuilder(Url, routeName, new { DataListKey = DataListKey, Mini = listOptions.Mini }, listOptions, totalRecordCount).PagingLinksObject(); + object routeValues = null; + //no data filter? + if (listOptions.DataFilterId == 0) + { + if (listOptions.Mini) + { + routeValues = new { DataListKey = DataListKey, Mini = listOptions.Mini }; + } + else + { + routeValues = new { DataListKey = DataListKey }; + } + } + else + { + if (listOptions.Mini) + { + routeValues = new { DataListKey = DataListKey, DataFilterId = listOptions.DataFilterId, Mini = listOptions.Mini }; + } + else + { + routeValues = new { DataListKey = DataListKey, DataFilterId = listOptions.DataFilterId }; + } + } + + + + var pageLinks = new PaginationLinkBuilder(Url, routeName, routeValues, listOptions, totalRecordCount).PagingLinksObject(); //BUILD THE COLUMNS RETURN PROPERTY JSON FRAGMENT Newtonsoft.Json.Linq.JArray ColumnsJSON = null;