This commit is contained in:
2021-02-08 21:37:16 +00:00
parent 658b345378
commit 27a232c888
10 changed files with 15 additions and 273 deletions

View File

@@ -10,39 +10,8 @@ namespace AyaNova.DataList
SQLFrom = "from ataxcode";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
//######## DEFAULT VIEW ############
// //Default ListView
// dynamic dlistView = new JArray();
// 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 = "TaxCodeTaxB";
// dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "TaxCodeTaxOnTax";
// dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "Active";
// dlistView.Add(cm);
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
DefaultColumns = new List<string>() { "Name", "TaxCodeTaxA", "TaxCodeTaxB", "TaxCodeTaxOnTax", "Active" };
DefaultSortBy = new Dictionary<string, string>() { { "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
FieldDefinitions = new List<DataListFieldDefinition>();
FieldDefinitions.Add(new DataListFieldDefinition
@@ -80,9 +49,6 @@ namespace AyaNova.DataList
SqlValueColumnName = "ataxcode.tags"
});
//------------
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "TaxCodeTaxA",
@@ -107,8 +73,6 @@ namespace AyaNova.DataList
SqlValueColumnName = "ataxcode.taxontax"
});
//-----------
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom1", FieldKey = "TaxCodecustom1", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom2", FieldKey = "TaxCodecustom2", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "TaxCodeCustom3", FieldKey = "TaxCodecustom3", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "ataxcode.customfields" });