This commit is contained in:
2021-01-27 22:15:28 +00:00
parent 071339d251
commit 92cc3ebbd1
6 changed files with 149 additions and 137 deletions

View File

@@ -1,5 +1,4 @@
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using AyaNova.Biz;
namespace AyaNova.DataList
{
@@ -17,33 +16,36 @@ 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();
dynamic cm = null;
// //######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############
// //Default ListView
// dynamic dlistView = new JArray();
// dynamic cm = null;
cm = new JObject();
cm.fld = "PartPartNumber";
cm.sort = "+";
dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "PartPartNumber";
// cm.sort = "+";
// dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartName";
dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "PartName";
// dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartManufacturerID";
dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "PartManufacturerID";
// dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartWholesalerID";
dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "PartWholesalerID";
// dlistView.Add(cm);
cm = new JObject();
cm.fld = "Tags";
dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "Tags";
// dlistView.Add(cm);
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
DefaultColumns = new List<string>() { "PartPartNumber", "PartName", "PartManufacturerID", "PartWholesalerID", "Tags" };
DefaultSortBy = new Dictionary<string, string>() { { "PartPartNumber", "+" } };
//NOTE: Due to the join, all the sql id and name fields that can conflict with the joined table need to be specified completely
@@ -109,7 +111,7 @@ namespace AyaNova.DataList
SqlValueColumnName = "apart.retail"
});
FieldDefinitions.Add(new AyaDataListFieldDefinition
{
FieldKey = "PartManufacturerID",