This commit is contained in:
2020-01-13 23:28:00 +00:00
parent ac536b3434
commit f01bc874f3

View File

@@ -319,23 +319,35 @@ namespace AyaNova.Biz
#pragma warning disable EF1000
//GET THE FULL LIST OF ITEMS
var items = await ct.Widget
.FromSqlRaw(q)
.AsNoTracking()
.Skip(pagingOptions.Offset.Value)
.Take(pagingOptions.Limit.Value)
.ToArrayAsync();
//GET THE RECORD COUNT
var totalRecordCount = await ct.Widget
.FromSqlRaw(q)
.AsNoTracking()
.CountAsync();
#pragma warning restore EF1000
//BUILD THE PAGING LINKS PORTION
var pageLinks = new PaginationLinkBuilder(Url, routeName, null, pagingOptions, totalRecordCount).PagingLinksObject();
//TODO: BUILD THE RETURN BASED ON TEMPLATE, ListOpti
//BUILD THE RETURN BASED ON TEMPLATE and MINI CONDITIONAL FORMAT
//TODO: Get template
//TODO: BUILD THE RETURN LIST OF FIELDS / TYPES AND ORDER FROM TEMPLATE AND MINI CONDITIONAL
//TODO: BUILD THE RETURN LIST OF DATA ITEMS
//If mini format all desired columns in order into the single mini return display (and set the only other return field which is ID)
//If wide then format the fields in oder chosen (grid sort and filter template has already done that part above)
//TODO: Genericize the above block of building return when it's working as this code needs to be central and optimized as much as possible
//New return code
dynamic ret = new JObject();