This commit is contained in:
@@ -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
|
||||||
{
|
{
|
||||||
@@ -12,23 +11,26 @@ 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 = new JObject();
|
// dynamic cm = new JObject();
|
||||||
cm.fld = "headofficename";
|
// cm.fld = "headofficename";
|
||||||
cm.sort = "+";
|
// cm.sort = "+";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "headofficephone1";
|
// cm.fld = "headofficephone1";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "headofficeemail";
|
// cm.fld = "headofficeemail";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
||||||
|
|
||||||
|
DefaultColumns = new List<string>() { "headofficename", "headofficephone1", "headofficeemail" };
|
||||||
|
DefaultSortBy = new Dictionary<string, string>() { { "headofficename", "+" } };
|
||||||
|
|
||||||
|
|
||||||
//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
|
||||||
|
|||||||
@@ -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
|
||||||
{
|
{
|
||||||
@@ -13,50 +12,41 @@ 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 = "name";
|
// cm.fld = "name";
|
||||||
cm.sort = "+";
|
// cm.sort = "+";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "employeenumber";
|
// cm.fld = "employeenumber";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "active";
|
// cm.fld = "active";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "usertype";
|
// cm.fld = "usertype";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "lastlogin";
|
// cm.fld = "lastlogin";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
|
|
||||||
cm = new JObject();
|
// cm = new JObject();
|
||||||
cm.fld = "roles";
|
// cm.fld = "roles";
|
||||||
dlistView.Add(cm);
|
// dlistView.Add(cm);
|
||||||
|
|
||||||
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
||||||
|
|
||||||
/*
|
DefaultColumns = new List<string>() { "name", "employeenumber", "active", "usertype", "lastlogin", "roles" };
|
||||||
Id = z.Id,
|
DefaultSortBy = new Dictionary<string, string>() { { "name", "+" } };
|
||||||
Active = z.Active,
|
|
||||||
Name = z.Name,
|
|
||||||
Roles = z.Roles,
|
|
||||||
UserType = z.UserType,
|
|
||||||
EmployeeNumber = z.EmployeeNumber,
|
|
||||||
LastLogin = z.LastLogin
|
|
||||||
*/
|
|
||||||
|
|
||||||
//NOTE: Due to the join, all the sql id and name fields that can conflict with the joined (in this case User) table need to be specified completely
|
|
||||||
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
||||||
//DPRECATED FieldDefinitions.Add(new AyaDataListFieldDefinition { FieldKey = "df", AyaObjectType = (int)AyaType.User, SqlIdColumnName = "auser.id" });
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "User",
|
TKey = "User",
|
||||||
|
|||||||
Reference in New Issue
Block a user