|
|
|
|
@@ -9,7 +9,7 @@ namespace AyaNova.DataList
|
|
|
|
|
public NotifySubscriptionDataList()
|
|
|
|
|
{
|
|
|
|
|
DefaultListObjectType = AyaType.NotifySubscription;
|
|
|
|
|
SQLFrom = "from auser";
|
|
|
|
|
SQLFrom = "from anotifysubscription";
|
|
|
|
|
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
|
|
|
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
|
|
|
|
|
|
|
|
|
@@ -17,122 +17,81 @@ namespace AyaNova.DataList
|
|
|
|
|
dynamic dlistView = new JArray();
|
|
|
|
|
|
|
|
|
|
dynamic cm = new JObject();
|
|
|
|
|
cm.fld = "username";
|
|
|
|
|
cm.fld = "ayatype";
|
|
|
|
|
dlistView.Add(cm);
|
|
|
|
|
|
|
|
|
|
cm = new JObject();
|
|
|
|
|
cm.fld = "useremployeenumber";
|
|
|
|
|
cm.fld = "eventtype";
|
|
|
|
|
dlistView.Add(cm);
|
|
|
|
|
|
|
|
|
|
cm = new JObject();
|
|
|
|
|
cm.fld = "usertype";
|
|
|
|
|
cm.fld = "deliverymethod";
|
|
|
|
|
dlistView.Add(cm);
|
|
|
|
|
|
|
|
|
|
cm = new JObject();
|
|
|
|
|
cm.fld = "useractive";
|
|
|
|
|
dlistView.Add(cm);
|
|
|
|
|
|
|
|
|
|
cm = new JObject();
|
|
|
|
|
cm.fld = "userlastlogin";
|
|
|
|
|
cm.fld = "deliveryaddress";
|
|
|
|
|
dlistView.Add(cm);
|
|
|
|
|
|
|
|
|
|
cm = new JObject();
|
|
|
|
|
cm.fld = "userroles";
|
|
|
|
|
cm.fld = "intags";
|
|
|
|
|
dlistView.Add(cm);
|
|
|
|
|
|
|
|
|
|
cm = new JObject();
|
|
|
|
|
cm.fld = "outtags";
|
|
|
|
|
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 NotifySubscription) table need to be specified completely
|
|
|
|
|
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
|
|
|
|
//DPRECATED FieldDefinitions.Add(new AyaDataListFieldDefinition { FieldKey = "df", AyaObjectType = (int)AyaType.NotifySubscription, SqlIdColumnName = "auser.id" });
|
|
|
|
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
|
|
|
{
|
|
|
|
|
TKey = "NotifySubscription",
|
|
|
|
|
FieldKey = "username",
|
|
|
|
|
AyaObjectType = (int)AyaType.NotifySubscription,
|
|
|
|
|
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",
|
|
|
|
|
TKey = "AyaType",
|
|
|
|
|
FieldKey = "ayatype",
|
|
|
|
|
UiFieldDataType = (int)UiFieldDataType.Enum,
|
|
|
|
|
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AuthorizationRoles).ToString()),
|
|
|
|
|
SqlValueColumnName = "auser.roles"
|
|
|
|
|
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaType).ToString())
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
|
|
|
{
|
|
|
|
|
TKey = "LastLogin",
|
|
|
|
|
FieldKey = "userlastlogin",
|
|
|
|
|
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
|
|
|
|
SqlValueColumnName = "auser.lastlogin"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
|
|
|
{
|
|
|
|
|
TKey = "NotifySubscriptionType",
|
|
|
|
|
FieldKey = "usertype",
|
|
|
|
|
TKey = "NotifyEventType",
|
|
|
|
|
FieldKey = "eventtype",
|
|
|
|
|
UiFieldDataType = (int)UiFieldDataType.Enum,
|
|
|
|
|
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(NotifySubscriptionType).ToString()),
|
|
|
|
|
SqlValueColumnName = "auser.usertype"
|
|
|
|
|
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(NotifyEventType).ToString())
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
|
|
|
{
|
|
|
|
|
TKey = "NotifySubscriptionEmployeeNumber",
|
|
|
|
|
FieldKey = "useremployeenumber",
|
|
|
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
|
|
|
SqlValueColumnName = "auser.employeenumber"
|
|
|
|
|
TKey = "NotifyDeliveryMethod",
|
|
|
|
|
FieldKey = "deliverymethod",
|
|
|
|
|
UiFieldDataType = (int)UiFieldDataType.Enum,
|
|
|
|
|
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(NotifyDeliveryMethod).ToString())
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
|
|
|
{
|
|
|
|
|
TKey = "NotifySubscriptionNotes",
|
|
|
|
|
FieldKey = "usernotes",
|
|
|
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
|
|
|
SqlValueColumnName = "auser.notes"
|
|
|
|
|
TKey = "NotifyDeliveryAddress",
|
|
|
|
|
FieldKey = "deliveryaddress",
|
|
|
|
|
UiFieldDataType = (int)UiFieldDataType.Text
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
|
|
|
{
|
|
|
|
|
TKey = "InTags",
|
|
|
|
|
FieldKey = "intags",
|
|
|
|
|
UiFieldDataType = (int)UiFieldDataType.Tags
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
|
|
|
{
|
|
|
|
|
TKey = "OutTags",
|
|
|
|
|
FieldKey = "outtags",
|
|
|
|
|
UiFieldDataType = (int)UiFieldDataType.Tags
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// //-------------------------
|
|
|
|
|
//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
|