From a6a2e0917cf2ff3ae9d08c7eee669d6bd517d8d3 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 27 Jan 2021 20:45:35 +0000 Subject: [PATCH] --- server/AyaNova/DataList/LoanUnitDataList.cs | 38 ++++++++++----------- server/AyaNova/DataList/MemoDataList.cs | 35 ++++++++++--------- 2 files changed, 38 insertions(+), 35 deletions(-) diff --git a/server/AyaNova/DataList/LoanUnitDataList.cs b/server/AyaNova/DataList/LoanUnitDataList.cs index 8049880f..7bb4f28e 100644 --- a/server/AyaNova/DataList/LoanUnitDataList.cs +++ b/server/AyaNova/DataList/LoanUnitDataList.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using Newtonsoft.Json.Linq; using AyaNova.Biz; namespace AyaNova.DataList { @@ -18,30 +17,31 @@ 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 = "LoanUnitName"; - cm.sort = "+"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "LoanUnitName"; + // cm.sort = "+"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "LoanUnitSerial"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "LoanUnitSerial"; + // 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() { "LoanUnitName", "LoanUnitSerial", "Tags" }; + DefaultSortBy = new Dictionary() { { "LoanUnitName", "+" } }; - //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(); - FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "LoanUnitName", @@ -182,6 +182,6 @@ namespace AyaNova.DataList FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "LoanUnitCustom16", FieldKey = "loanunitcustom16", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aloanunit.customfields" }); } - + }//eoc }//eons \ No newline at end of file diff --git a/server/AyaNova/DataList/MemoDataList.cs b/server/AyaNova/DataList/MemoDataList.cs index 3cf02374..d70a67b9 100644 --- a/server/AyaNova/DataList/MemoDataList.cs +++ b/server/AyaNova/DataList/MemoDataList.cs @@ -15,28 +15,31 @@ namespace AyaNova.DataList 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 = "MemoSubject"; - dlistView.Add(cm); + // dynamic cm = new JObject(); + // cm.fld = "MemoSubject"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "MemoFromID"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "MemoFromID"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "MemoSent"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "MemoSent"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "MemoViewed"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "MemoViewed"; + // dlistView.Add(cm); - DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None); + // DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None); + + DefaultColumns = new List() { "MemoSubject", "MemoFromID", "MemoSent", "MemoViewed" }; + DefaultSortBy = new Dictionary() { { "MemoSent", "-" } };//added but wasnt' in original //NOTE: Due to the join, all the sql id and name fields that can conflict with the joined table need to be specified completely