This commit is contained in:
@@ -8,8 +8,8 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
switch (ListKey)
|
switch (ListKey)
|
||||||
{
|
{
|
||||||
case nameof(TestWidgetUserEmail):
|
case nameof(TestWidgetUserEmailDataList):
|
||||||
return new TestWidgetUserEmail();
|
return new TestWidgetUserEmailDataList();
|
||||||
default:
|
default:
|
||||||
throw new System.ArgumentOutOfRangeException($"DataListFactory: Unknown list \"{ListKey}\"");
|
throw new System.ArgumentOutOfRangeException($"DataListFactory: Unknown list \"{ListKey}\"");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ namespace AyaNova.DataList
|
|||||||
List<AyaDataListFieldDefinition> FieldDefinitions { get; }
|
List<AyaDataListFieldDefinition> FieldDefinitions { get; }
|
||||||
|
|
||||||
//allowed roles to access this list
|
//allowed roles to access this list
|
||||||
public AuthorizationRoles AllowedRoles { get; }
|
AuthorizationRoles AllowedRoles { get; }
|
||||||
|
|
||||||
|
//Default object type to open for rows of this list (use no object if no)
|
||||||
|
AyaType DefaultListObjectType { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,18 @@ using System.Collections.Generic;
|
|||||||
using AyaNova.Biz;
|
using AyaNova.Biz;
|
||||||
namespace AyaNova.DataList
|
namespace AyaNova.DataList
|
||||||
{
|
{
|
||||||
internal class TestWidgetUserEmail : IAyaDataList
|
internal class TestWidgetUserEmailDataList : IAyaDataList
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
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 string ListKey => nameof(TestWidgetUserEmailDataList);
|
||||||
|
|
||||||
public string ListKey => nameof(TestWidgetUserEmail);
|
public string SQLFrom => "from awidget left outer join auser on (awidget.userid=auser.id) left outer join auseroptions on (auser.id=auseroptions.userid)";
|
||||||
|
|
||||||
public string SQLFrom => "throw new System.NotImplementedException()";
|
|
||||||
|
|
||||||
public List<AyaDataListFieldDefinition> FieldDefinitions
|
public List<AyaDataListFieldDefinition> FieldDefinitions
|
||||||
{
|
{
|
||||||
@@ -52,6 +58,8 @@ namespace AyaNova.DataList
|
|||||||
}
|
}
|
||||||
|
|
||||||
public AuthorizationRoles AllowedRoles => AuthorizationRoles.AllInternalStaff;//anyone but clients and subcontractors (just for test)
|
public AuthorizationRoles AllowedRoles => AuthorizationRoles.AllInternalStaff;//anyone but clients and subcontractors (just for test)
|
||||||
|
public AyaType DefaultListObjectType => AyaType.Widget;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user