This commit is contained in:
45
util.cs
45
util.cs
@@ -586,28 +586,49 @@ namespace raven_integration
|
||||
return dCustomField.ToString();
|
||||
}
|
||||
|
||||
//// [{fld:"COLUMN UNIQUE KEY ID",sort:"-" or "+",filter:{any:true/false,items:[{FILTER OBJECT SEE BELOW}]} }, {key:"second column unique key"},{...etc...}]
|
||||
public static object BuildSimpleFilterDataListViewColumn(string fieldKey, string filterOp, object filterValue, string sort = null)
|
||||
{
|
||||
dynamic d = new JObject();
|
||||
d.fld = fieldKey;
|
||||
if (sort != null)
|
||||
d.sort = sort;
|
||||
|
||||
public static string BuildDataListRequest(dynamic dFilter = null, dynamic dSort = null, int limit = 999, int offset = 0, bool mini = false, string dataListKey = "TestWidgetDataList")
|
||||
dynamic filter = new JObject();
|
||||
dynamic items = new JArray();
|
||||
dynamic fitem = new JObject();
|
||||
fitem.op = filterOp;
|
||||
fitem.value = filterValue;
|
||||
items.Add(fitem);
|
||||
filter.items = items;
|
||||
d.filter = filter;
|
||||
return d;
|
||||
|
||||
}
|
||||
//t(dfilter, dsortarray, 999, 0, false, "UserDataList"));
|
||||
public static string BuildDataListRequest(object p = null, object o = null, int limit = 999, int offset = 0, bool bWhatever=false, string dataListKey = "TestWidgetDataList")
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public static string BuildDataListRequestEx(dynamic dListView = null, int limit = 999, int offset = 0, string dataListKey = "TestWidgetDataList")
|
||||
{
|
||||
/*
|
||||
{
|
||||
"offset": 0,
|
||||
"limit": 5,
|
||||
"mini": false,
|
||||
"dataListKey": "TestWidgetDataList",
|
||||
"filterJson": "",
|
||||
"sortJson": ""
|
||||
"offset": 0,
|
||||
"limit": 3,
|
||||
"dataListKey": "TestWidgetDataList",
|
||||
"listView": ""
|
||||
}
|
||||
*/
|
||||
dynamic d = new JObject();
|
||||
d.offset = offset;
|
||||
d.limit = limit;
|
||||
d.mini = mini;
|
||||
|
||||
d.dataListKey = dataListKey;
|
||||
if (dFilter != null)
|
||||
d.filterJson = dFilter.ToString();
|
||||
if (dSort != null)
|
||||
d.sortJson = dSort.ToString();
|
||||
if (dListView != null)
|
||||
d.dListView = dListView.ToString();
|
||||
|
||||
return d.ToString();
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user