This commit is contained in:
@@ -3,17 +3,15 @@ using AyaNova.Biz;
|
||||
namespace AyaNova.DataList
|
||||
{
|
||||
internal static class DataListFactory
|
||||
{
|
||||
internal const string TEST_WIDGET_USER_EMAIL_ADDRESS_LIST_KEY = "TEST_WIDGET_USER_EMAIL_ADDRESS_LIST";//for development testing, not a real thing going forward
|
||||
|
||||
{
|
||||
internal static IAyaDataList GetAyaDataList(string ListKey)
|
||||
{
|
||||
switch (ListKey)
|
||||
{
|
||||
case TEST_WIDGET_USER_EMAIL_ADDRESS_LIST_KEY:
|
||||
case nameof(TestWidgetUserEmail):
|
||||
return new TestWidgetUserEmail();
|
||||
default:
|
||||
throw new System.ArgumentOutOfRangeException($"DataListFactory: Unknown key \"{ListKey}\"");
|
||||
throw new System.ArgumentOutOfRangeException($"DataListFactory: Unknown list \"{ListKey}\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace AyaNova.DataList
|
||||
internal class TestWidgetUserEmail : IAyaDataList
|
||||
{
|
||||
|
||||
public string ListKey => DataListFactory.TEST_WIDGET_USER_EMAIL_ADDRESS_LIST_KEY;
|
||||
public string ListKey => nameof(TestWidgetUserEmail);
|
||||
|
||||
public string SQLFrom => "throw new System.NotImplementedException()";
|
||||
|
||||
@@ -13,40 +13,41 @@ namespace AyaNova.DataList
|
||||
{
|
||||
get
|
||||
{
|
||||
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
|
||||
});
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user