This commit is contained in:
2021-01-27 22:49:31 +00:00
parent 9ea9bc9b89
commit 829f225c21
6 changed files with 128 additions and 136 deletions

View File

@@ -1,5 +1,4 @@
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using AyaNova.Biz;
namespace AyaNova.DataList
{
@@ -12,33 +11,34 @@ namespace AyaNova.DataList
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
//######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############
//Default ListView
dynamic dlistView = new JArray();
// //######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############
// //Default ListView
// dynamic dlistView = new JArray();
dynamic cm = new JObject();
cm.fld = "UnitModelModelNumber";
cm.sort = "+";
dlistView.Add(cm);
// dynamic cm = new JObject();
// cm.fld = "UnitModelModelNumber";
// cm.sort = "+";
// dlistView.Add(cm);
cm = new JObject();
cm.fld = "Name";
dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "Name";
// dlistView.Add(cm);
cm = new JObject();
cm.fld = "UnitModelVendorID";
dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "UnitModelVendorID";
// dlistView.Add(cm);
cm = new JObject();
cm.fld = "Active";
dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "Active";
// dlistView.Add(cm);
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
DefaultColumns = new List<string>() { "UnitModelModelNumber", "Name", "UnitModelVendorID", "Active" };
DefaultSortBy = new Dictionary<string, string>() { { "UnitModelModelNumber", "+" } };
//NOTE: Due to the join, all the sql id and name fields that can conflict with the joined table need to be specified completely
FieldDefinitions = new List<AyaDataListFieldDefinition>();
FieldDefinitions.Add(new AyaDataListFieldDefinition
{
TKey = "UnitModelModelNumber",