This commit is contained in:
2021-01-27 20:23:47 +00:00
parent ecfb5dcea5
commit 77cb0ef98a
3 changed files with 48 additions and 46 deletions

View File

@@ -1,5 +1,4 @@
using System.Collections.Generic; using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using AyaNova.Biz; using AyaNova.Biz;
using AyaNova.Models; using AyaNova.Models;

View File

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

View File

@@ -1,5 +1,4 @@
using System.Collections.Generic; using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using AyaNova.Biz; using AyaNova.Biz;
namespace AyaNova.DataList namespace AyaNova.DataList
{ {
@@ -20,36 +19,39 @@ namespace AyaNova.DataList
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType); var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change; AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
//Default ListView // //Default ListView
dynamic dlistView = new JArray(); // dynamic dlistView = new JArray();
dynamic cm = new JObject(); // dynamic cm = new JObject();
cm.fld = "eventcreated"; // cm.fld = "eventcreated";
cm.sort = "-"; // cm.sort = "-";
dlistView.Add(cm); // dlistView.Add(cm);
cm = new JObject(); // cm = new JObject();
cm.fld = "event"; // cm.fld = "event";
dlistView.Add(cm); // dlistView.Add(cm);
cm = new JObject(); // cm = new JObject();
cm.fld = "object"; // cm.fld = "object";
dlistView.Add(cm); // dlistView.Add(cm);
cm = new JObject(); // cm = new JObject();
cm.fld = "AyaType"; // cm.fld = "AyaType";
dlistView.Add(cm); // dlistView.Add(cm);
cm = new JObject(); // cm = new JObject();
cm.fld = "username"; // cm.fld = "username";
dlistView.Add(cm); // dlistView.Add(cm);
cm = new JObject(); // cm = new JObject();
cm.fld = "textra"; // cm.fld = "textra";
dlistView.Add(cm); // dlistView.Add(cm);
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None); // DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
DefaultColumns = new List<string>() { "eventcreated", "event", "object", "AyaType", "username", "textra" };
DefaultSortBy = new Dictionary<string, string>() { { "eventcreated", "-" } };
FieldDefinitions = new List<AyaDataListFieldDefinition>(); FieldDefinitions = new List<AyaDataListFieldDefinition>();