This commit is contained in:
2020-01-24 21:47:07 +00:00
parent 6aa7f41073
commit f196c43491

View File

@@ -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;