diff --git a/server/AyaNova/DataList/ServiceBankDataList.cs b/server/AyaNova/DataList/ServiceBankDataList.cs index 0c70789b..b902b9aa 100644 --- a/server/AyaNova/DataList/ServiceBankDataList.cs +++ b/server/AyaNova/DataList/ServiceBankDataList.cs @@ -15,49 +15,56 @@ namespace AyaNova.DataList 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 = "ServiceBankCreated"; - cm.sort = "-"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "ServiceBankCreated"; + // cm.sort = "-"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "Object"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "Object"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "ServiceBankCurrency"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "ServiceBankCurrency"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "ServiceBankCurrencyBalance"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "ServiceBankCurrencyBalance"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "ServiceBankIncidents"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "ServiceBankIncidents"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "ServiceBankIncidentsBalance"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "ServiceBankIncidentsBalance"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "ServiceBankHours"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "ServiceBankHours"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "ServiceBankHoursBalance"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "ServiceBankHoursBalance"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "ServiceBankDescription"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "ServiceBankDescription"; + // dlistView.Add(cm); + + // DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None); + + DefaultColumns = new List() { + "ServiceBankCreated", "Object", "ServiceBankCurrency", "ServiceBankCurrencyBalance", "ServiceBankIncidents", + "ServiceBankIncidentsBalance", "ServiceBankHours", "ServiceBankHoursBalance", "ServiceBankDescription" + }; + DefaultSortBy = new Dictionary() { { "ServiceBankCreated", "-" } }; - DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None); //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(); @@ -167,14 +174,7 @@ namespace AyaNova.DataList SqlValueColumnName = "aservicebank.objectid", IsMeta = true }); - } - - - - - - }//eoc }//eons \ No newline at end of file diff --git a/server/AyaNova/DataList/ServiceRateDataList.cs b/server/AyaNova/DataList/ServiceRateDataList.cs index 9b65b3df..347f0899 100644 --- a/server/AyaNova/DataList/ServiceRateDataList.cs +++ b/server/AyaNova/DataList/ServiceRateDataList.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using Newtonsoft.Json.Linq; using AyaNova.Biz; namespace AyaNova.DataList { @@ -12,35 +11,37 @@ 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 = "Name"; - cm.sort = "+"; - dlistView.Add(cm); + // dynamic cm = new JObject(); + // cm.fld = "Name"; + // cm.sort = "+"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "Cost"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "Cost"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "RateCharge"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "RateCharge"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "RateUnitChargeDescriptionID"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "RateUnitChargeDescriptionID"; + // 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); - //NOTE: Due to the join, all the sql id and name fields that can conflict with the joined table need to be specified completely + DefaultColumns = new List() { "Name", "Cost", "RateCharge", "RateUnitChargeDescriptionID", "Active" }; + DefaultSortBy = new Dictionary() { { "Name", "+" } }; + FieldDefinitions = new List(); FieldDefinitions.Add(new AyaDataListFieldDefinition diff --git a/server/AyaNova/DataList/TaxCodeDataList.cs b/server/AyaNova/DataList/TaxCodeDataList.cs index f742c424..424e3cd8 100644 --- a/server/AyaNova/DataList/TaxCodeDataList.cs +++ b/server/AyaNova/DataList/TaxCodeDataList.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using Newtonsoft.Json.Linq; using AyaNova.Biz; namespace AyaNova.DataList { @@ -12,32 +11,35 @@ 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 = "Name"; - cm.sort = "+"; - dlistView.Add(cm); + // dynamic cm = new JObject(); + // cm.fld = "Name"; + // cm.sort = "+"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "TaxCodeTaxA"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "TaxCodeTaxA"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "TaxCodeTaxB"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "TaxCodeTaxB"; + // dlistView.Add(cm); - cm = new JObject(); - cm.fld = "TaxCodeTaxOnTax"; - dlistView.Add(cm); + // cm = new JObject(); + // cm.fld = "TaxCodeTaxOnTax"; + // 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() { "Name", "TaxCodeTaxA", "TaxCodeTaxB", "TaxCodeTaxOnTax", "Active" }; + DefaultSortBy = new Dictionary() { { "Name", "+" } }; //NOTE: Due to the join, all the sql id and name fields that can conflict with the joined table need to be specified completely