This commit is contained in:
@@ -2,7 +2,7 @@ using System.Collections.Generic;
|
||||
using AyaNova.Biz;
|
||||
namespace AyaNova.DataList
|
||||
{
|
||||
internal class TestWidgetUserEmailDataList : IAyaDataList
|
||||
internal class TestWidgetUserEmailDataList : AyaDataList
|
||||
{
|
||||
/*
|
||||
Select awidget.id, awidget.name, auser.name, auser.id, auseroptions.emailaddress
|
||||
@@ -11,55 +11,49 @@ namespace AyaNova.DataList
|
||||
left outer join auseroptions on (auser.id=auseroptions.userid)
|
||||
order by auseroptions.emailaddress desc
|
||||
*/
|
||||
public string ListKey => nameof(TestWidgetUserEmailDataList);
|
||||
|
||||
public string SQLFrom => "from awidget left outer join auser on (awidget.userid=auser.id) left outer join auseroptions on (auser.id=auseroptions.userid)";
|
||||
|
||||
public List<AyaDataListFieldDefinition> FieldDefinitions
|
||||
public TestWidgetUserEmailDataList()
|
||||
{
|
||||
get
|
||||
ListKey = nameof(TestWidgetUserEmailDataList);
|
||||
SQLFrom = "from awidget left outer join auser on (awidget.userid=auser.id) left outer join auseroptions on (auser.id=auseroptions.userid)";
|
||||
AllowedRoles = AuthorizationRoles.AllInternalStaff;//anyone but clients and subcontractors (just for test)
|
||||
DefaultListObjectType = AyaType.Widget;
|
||||
|
||||
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { FieldKey = "df", AyaObjectType = (int)AyaType.Widget, SqlIdColumnName = "awidget.id" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
List<AyaDataListFieldDefinition> l = new List<AyaDataListFieldDefinition>();
|
||||
l.Add(new AyaDataListFieldDefinition { FieldKey = "df", AyaObjectType = (int)AyaType.Widget, SqlIdColumnName = "awidget.id" });
|
||||
l.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
FieldKey = "widgetname",
|
||||
LtKey = "WidgetName",
|
||||
UiFieldDataType = (int)AyaUiFieldDataType.Text,
|
||||
AyaObjectType = (int)AyaType.Widget,
|
||||
SqlIdColumnName = "awidget.id",
|
||||
SqlValueColumnName = "awidget.name"
|
||||
});
|
||||
l.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
FieldKey = "username",
|
||||
LtKey = "User",
|
||||
UiFieldDataType = (int)AyaUiFieldDataType.Text,
|
||||
AyaObjectType = (int)AyaType.User,
|
||||
SqlIdColumnName = "auser.id",
|
||||
SqlValueColumnName = "auser.name"
|
||||
});
|
||||
l.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
LtKey = "UserEmailAddress",
|
||||
FieldKey = "emailaddress",
|
||||
SqlValueColumnName = "auseroptions.emailaddress",
|
||||
UiFieldDataType = (int)AyaUiFieldDataType.EmailAddress
|
||||
});
|
||||
l.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
LtKey = "Active",
|
||||
FieldKey = "widgetactive",
|
||||
SqlValueColumnName = "awidget.active",
|
||||
UiFieldDataType = (int)AyaUiFieldDataType.Bool
|
||||
});
|
||||
return l;
|
||||
}
|
||||
FieldKey = "widgetname",
|
||||
LtKey = "WidgetName",
|
||||
UiFieldDataType = (int)AyaUiFieldDataType.Text,
|
||||
AyaObjectType = (int)AyaType.Widget,
|
||||
SqlIdColumnName = "awidget.id",
|
||||
SqlValueColumnName = "awidget.name"
|
||||
});
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
FieldKey = "username",
|
||||
LtKey = "User",
|
||||
UiFieldDataType = (int)AyaUiFieldDataType.Text,
|
||||
AyaObjectType = (int)AyaType.User,
|
||||
SqlIdColumnName = "auser.id",
|
||||
SqlValueColumnName = "auser.name"
|
||||
});
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
LtKey = "UserEmailAddress",
|
||||
FieldKey = "emailaddress",
|
||||
SqlValueColumnName = "auseroptions.emailaddress",
|
||||
UiFieldDataType = (int)AyaUiFieldDataType.EmailAddress
|
||||
});
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
LtKey = "Active",
|
||||
FieldKey = "widgetactive",
|
||||
SqlValueColumnName = "awidget.active",
|
||||
UiFieldDataType = (int)AyaUiFieldDataType.Bool
|
||||
});
|
||||
}
|
||||
|
||||
public AuthorizationRoles AllowedRoles => AuthorizationRoles.AllInternalStaff;//anyone but clients and subcontractors (just for test)
|
||||
public AyaType DefaultListObjectType => AyaType.Widget;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}//eoc
|
||||
}//eons
|
||||
Reference in New Issue
Block a user