This commit is contained in:
@@ -18,6 +18,7 @@ namespace AyaNova.DataList
|
|||||||
|
|
||||||
dynamic cm = new JObject();
|
dynamic cm = new JObject();
|
||||||
cm.fld = "displayfilename";
|
cm.fld = "displayfilename";
|
||||||
|
cm.sort = "+";
|
||||||
dlistView.Add(cm);
|
dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
cm = new JObject();
|
||||||
|
|||||||
@@ -1,123 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using AyaNova.Biz;
|
|
||||||
namespace AyaNova.DataList
|
|
||||||
{
|
|
||||||
internal class DEPRECATED_TestUserDataList : AyaDataList
|
|
||||||
{
|
|
||||||
|
|
||||||
public DEPRECATED_TestUserDataList()
|
|
||||||
{
|
|
||||||
DefaultListObjectType = AyaType.User;
|
|
||||||
SQLFrom = "from auser";
|
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
|
||||||
|
|
||||||
//Default ListView
|
|
||||||
dynamic dlistView = new JArray();
|
|
||||||
|
|
||||||
dynamic cm = new JObject();
|
|
||||||
cm.fld = "username";
|
|
||||||
dlistView.Add(cm);
|
|
||||||
|
|
||||||
cm = new JObject();
|
|
||||||
cm.fld = "useremployeenumber";
|
|
||||||
dlistView.Add(cm);
|
|
||||||
|
|
||||||
cm = new JObject();
|
|
||||||
cm.fld = "useractive";
|
|
||||||
dlistView.Add(cm);
|
|
||||||
|
|
||||||
cm = new JObject();
|
|
||||||
cm.fld = "usernotes";
|
|
||||||
dlistView.Add(cm);
|
|
||||||
|
|
||||||
cm = new JObject();
|
|
||||||
cm.fld = "userroles";
|
|
||||||
dlistView.Add(cm);
|
|
||||||
|
|
||||||
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 (in this case User) table need to be specified completely
|
|
||||||
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
|
||||||
//DPRECATED FieldDefinitions.Add(new AyaDataListFieldDefinition { FieldKey = "df", AyaObjectType = (int)AyaType.User, SqlIdColumnName = "auser.id" });
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
{
|
|
||||||
TKey = "User",
|
|
||||||
FieldKey = "username",
|
|
||||||
AyaObjectType = (int)AyaType.User,
|
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
||||||
SqlIdColumnName = "auser.id",
|
|
||||||
SqlValueColumnName = "auser.name",
|
|
||||||
IsRowId=true
|
|
||||||
});
|
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
{
|
|
||||||
TKey = "Active",
|
|
||||||
FieldKey = "useractive",
|
|
||||||
UiFieldDataType = (int)UiFieldDataType.Bool,
|
|
||||||
SqlValueColumnName = "auser.active"
|
|
||||||
});
|
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
{
|
|
||||||
TKey = "AuthorizationRoles",
|
|
||||||
FieldKey = "userroles",
|
|
||||||
UiFieldDataType = (int)UiFieldDataType.Enum,
|
|
||||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AuthorizationRoles).ToString()),
|
|
||||||
SqlValueColumnName = "auser.roles"
|
|
||||||
});
|
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
{
|
|
||||||
TKey = "UserType",
|
|
||||||
FieldKey = "usertype",
|
|
||||||
UiFieldDataType = (int)UiFieldDataType.Enum,
|
|
||||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(UserType).ToString()),
|
|
||||||
SqlValueColumnName = "auser.usertype"
|
|
||||||
});
|
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
{
|
|
||||||
TKey = "UserEmployeeNumber",
|
|
||||||
FieldKey = "useremployeenumber",
|
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
||||||
SqlValueColumnName = "auser.employeenumber"
|
|
||||||
});
|
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
{
|
|
||||||
TKey = "UserNotes",
|
|
||||||
FieldKey = "usernotes",
|
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
||||||
SqlValueColumnName = "auser.notes"
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// //-------------------------
|
|
||||||
//NOT SURE ABOUT CUSTOM FIELDS
|
|
||||||
//NEED TO COME BACK TO THIS ONCE CLIENT IS CONSUMING THESE LISTS
|
|
||||||
//WIDGETLIST has custom fields so good test before doing here
|
|
||||||
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom1", FieldKey = "widgetcustom1", IsCustomField = true });
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom2", FieldKey = "widgetcustom2", IsCustomField = true });
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom3", FieldKey = "widgetcustom3", IsCustomField = true });
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom4", FieldKey = "widgetcustom4", IsCustomField = true });
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom5", FieldKey = "widgetcustom5", IsCustomField = true });
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom6", FieldKey = "widgetcustom6", IsCustomField = true });
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom7", FieldKey = "widgetcustom7", IsCustomField = true });
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom8", FieldKey = "widgetcustom8", IsCustomField = true });
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom9", FieldKey = "widgetcustom9", IsCustomField = true });
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom10", FieldKey = "widgetcustom10", IsCustomField = true });
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom11", FieldKey = "widgetcustom11", IsCustomField = true });
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom12", FieldKey = "widgetcustom12", IsCustomField = true });
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom13", FieldKey = "widgetcustom13", IsCustomField = true });
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom14", FieldKey = "widgetcustom14", IsCustomField = true });
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom15", FieldKey = "widgetcustom15", IsCustomField = true });
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom16", FieldKey = "widgetcustom16", IsCustomField = true });
|
|
||||||
}
|
|
||||||
}//eoc
|
|
||||||
}//eons
|
|
||||||
@@ -1,120 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//DEPRECATED: due to not working properly, can't easily set to only show current logged in user's subscriptions so it was showing all
|
|
||||||
//which might be useful for a management type of situation but for a single user it's shit
|
|
||||||
|
|
||||||
// using System.Collections.Generic;
|
|
||||||
// using Newtonsoft.Json.Linq;
|
|
||||||
// using AyaNova.Biz;
|
|
||||||
// namespace AyaNova.DataList
|
|
||||||
// {
|
|
||||||
// internal class NotifySubscriptionDataList : AyaDataList
|
|
||||||
// {
|
|
||||||
|
|
||||||
// public NotifySubscriptionDataList()
|
|
||||||
// {
|
|
||||||
// DefaultListObjectType = AyaType.NotifySubscription;
|
|
||||||
// SQLFrom = "from anotifysubscription";
|
|
||||||
// var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
|
||||||
// AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
|
||||||
|
|
||||||
// //Default ListView
|
|
||||||
// dynamic dlistView = new JArray();
|
|
||||||
|
|
||||||
// dynamic cm = new JObject();
|
|
||||||
// cm.fld = "id";
|
|
||||||
// dlistView.Add(cm);
|
|
||||||
|
|
||||||
// cm = new JObject();
|
|
||||||
// cm.fld = "ayatype";
|
|
||||||
// dlistView.Add(cm);
|
|
||||||
|
|
||||||
// cm = new JObject();
|
|
||||||
// cm.fld = "eventtype";
|
|
||||||
// dlistView.Add(cm);
|
|
||||||
|
|
||||||
// cm = new JObject();
|
|
||||||
// cm.fld = "deliverymethod";
|
|
||||||
// dlistView.Add(cm);
|
|
||||||
|
|
||||||
// cm = new JObject();
|
|
||||||
// cm.fld = "deliveryaddress";
|
|
||||||
// dlistView.Add(cm);
|
|
||||||
|
|
||||||
// cm = new JObject();
|
|
||||||
// cm.fld = "tags";
|
|
||||||
// dlistView.Add(cm);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
|
||||||
// FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
|
||||||
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
// {
|
|
||||||
// TKey = "ID",
|
|
||||||
// FieldKey = "id",
|
|
||||||
// UiFieldDataType = (int)UiFieldDataType.Integer,
|
|
||||||
// SqlIdColumnName = "anotifysubscription.id",
|
|
||||||
// SqlValueColumnName = "anotifysubscription.id",
|
|
||||||
// AyaObjectType = (int)AyaType.NotifySubscription,
|
|
||||||
// IsRowId = true
|
|
||||||
// });
|
|
||||||
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
// {
|
|
||||||
// TKey = "AyaType",
|
|
||||||
// FieldKey = "ayatype",
|
|
||||||
// UiFieldDataType = (int)UiFieldDataType.Enum,
|
|
||||||
// EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaType).ToString())
|
|
||||||
// });
|
|
||||||
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
// {
|
|
||||||
// TKey = "NotifyEventType",
|
|
||||||
// FieldKey = "eventtype",
|
|
||||||
// UiFieldDataType = (int)UiFieldDataType.Enum,
|
|
||||||
// EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(NotifyEventType).ToString())
|
|
||||||
// });
|
|
||||||
|
|
||||||
// // FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
// // {
|
|
||||||
// // TKey = "FileAttachment",
|
|
||||||
// // FieldKey = "displayfilename",
|
|
||||||
// // AyaObjectType = (int)AyaType.FileAttachment,
|
|
||||||
// // UiFieldDataType = (int)UiFieldDataType.Text,
|
|
||||||
// // SqlIdColumnName = "afileattachment.id",
|
|
||||||
// // SqlValueColumnName = "afileattachment.displayfilename",
|
|
||||||
// // IsRowId = true
|
|
||||||
// // });
|
|
||||||
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
// {
|
|
||||||
// TKey = "NotifyDeliveryMethod",
|
|
||||||
// FieldKey = "deliverymethod",
|
|
||||||
// UiFieldDataType = (int)UiFieldDataType.Enum,
|
|
||||||
// EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(NotifyDeliveryMethod).ToString())
|
|
||||||
// });
|
|
||||||
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
// {
|
|
||||||
// TKey = "NotifyDeliveryAddress",
|
|
||||||
// FieldKey = "deliveryaddress",
|
|
||||||
// UiFieldDataType = (int)UiFieldDataType.Text
|
|
||||||
// });
|
|
||||||
|
|
||||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
// {
|
|
||||||
// TKey = "InTags",
|
|
||||||
// FieldKey = "tags",
|
|
||||||
// UiFieldDataType = (int)UiFieldDataType.Tags
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// }
|
|
||||||
// }//eoc
|
|
||||||
// }//eons
|
|
||||||
@@ -18,6 +18,7 @@ namespace AyaNova.DataList
|
|||||||
|
|
||||||
dynamic cm = new JObject();
|
dynamic cm = new JObject();
|
||||||
cm.fld = "name";
|
cm.fld = "name";
|
||||||
|
cm.sort = "+";
|
||||||
dlistView.Add(cm);
|
dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
cm = new JObject();
|
||||||
|
|||||||
@@ -1,85 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using AyaNova.Biz;
|
|
||||||
namespace AyaNova.DataList
|
|
||||||
{
|
|
||||||
internal class TestWidgetUserEmailDataList : AyaDataList
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
Select awidget.id, awidget.name, auser.name, auser.id, auseroptions.emailaddress
|
|
||||||
from awidget
|
|
||||||
left outer join auser on (awidget.userid=auser.id)
|
|
||||||
left outer join auseroptions on (auser.id=auseroptions.userid)
|
|
||||||
order by auseroptions.emailaddress desc
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
public TestWidgetUserEmailDataList()
|
|
||||||
{
|
|
||||||
DefaultListObjectType = AyaType.Widget;
|
|
||||||
SQLFrom = "from awidget left outer join auser on (awidget.userid=auser.id) left outer join auseroptions on (auser.id=auseroptions.userid)";
|
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
|
||||||
|
|
||||||
//Default ListView
|
|
||||||
dynamic dlistView = new JArray();
|
|
||||||
|
|
||||||
dynamic cm = new JObject();
|
|
||||||
cm.fld = "widgetname";
|
|
||||||
dlistView.Add(cm);
|
|
||||||
|
|
||||||
cm = new JObject();
|
|
||||||
cm.fld = "username";
|
|
||||||
dlistView.Add(cm);
|
|
||||||
|
|
||||||
cm = new JObject();
|
|
||||||
cm.fld = "emailaddress";
|
|
||||||
dlistView.Add(cm);
|
|
||||||
|
|
||||||
cm = new JObject();
|
|
||||||
cm.fld = "widgetactive";
|
|
||||||
dlistView.Add(cm);
|
|
||||||
|
|
||||||
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
|
||||||
|
|
||||||
|
|
||||||
//NOTE: First field after df is used as the title above the narrow grid view so it should be the name of the item to be shown that is most identifiable
|
|
||||||
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
|
||||||
//DEPRECATED FieldDefinitions.Add(new AyaDataListFieldDefinition { FieldKey = "df", AyaObjectType = (int)AyaType.Widget, SqlIdColumnName = "awidget.id" });
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
{
|
|
||||||
FieldKey = "widgetname",
|
|
||||||
TKey = "WidgetName",
|
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
||||||
AyaObjectType = (int)AyaType.Widget,
|
|
||||||
SqlIdColumnName = "awidget.id",
|
|
||||||
SqlValueColumnName = "awidget.name",
|
|
||||||
IsRowId = true
|
|
||||||
});
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
{
|
|
||||||
FieldKey = "username",
|
|
||||||
TKey = "User",
|
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
||||||
AyaObjectType = (int)AyaType.User,
|
|
||||||
SqlIdColumnName = "auser.id",
|
|
||||||
SqlValueColumnName = "auser.name"
|
|
||||||
});
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
{
|
|
||||||
TKey = "UserEmailAddress",
|
|
||||||
FieldKey = "emailaddress",
|
|
||||||
SqlValueColumnName = "auseroptions.emailaddress",
|
|
||||||
UiFieldDataType = (int)UiFieldDataType.EmailAddress
|
|
||||||
});
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
{
|
|
||||||
TKey = "Active",
|
|
||||||
FieldKey = "widgetactive",
|
|
||||||
SqlValueColumnName = "awidget.active",
|
|
||||||
UiFieldDataType = (int)UiFieldDataType.Bool
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
}//eoc
|
|
||||||
}//eons
|
|
||||||
@@ -18,6 +18,7 @@ namespace AyaNova.DataList
|
|||||||
|
|
||||||
dynamic cm = new JObject();
|
dynamic cm = new JObject();
|
||||||
cm.fld = "name";
|
cm.fld = "name";
|
||||||
|
cm.sort = "+";
|
||||||
dlistView.Add(cm);
|
dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
cm = new JObject();
|
||||||
|
|||||||
Reference in New Issue
Block a user