This commit is contained in:
2021-01-02 00:30:15 +00:00
parent 8d0e9fe8c9
commit 74db405e62
17 changed files with 29 additions and 27 deletions

View File

@@ -8,7 +8,7 @@ namespace AyaNova.DataList
public CustomerDataList()
{
DefaultListObjectType = AyaType.Customer;
SQLFrom = "from acustomer left outer join aheadoffice on (acustomer.headofficeid=aheadoffice.id) left outer join acontract on (acustomer.contractid=acontract.id)";
SQLFrom = "from acustomer left join aheadoffice on (acustomer.headofficeid=aheadoffice.id) left join acontract on (acustomer.contractid=acontract.id)";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;

View File

@@ -8,7 +8,7 @@ namespace AyaNova.DataList
public CustomerNoteDataList()
{
DefaultListObjectType = AyaType.CustomerNote;
SQLFrom = "from acustomernote left outer join auser on (acustomernote.userid=auser.id)";
SQLFrom = "from acustomernote left join auser on (acustomernote.userid=auser.id)";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;

View File

@@ -8,7 +8,7 @@ namespace AyaNova.DataList
Select aevent.id, aevent.created, aevent.ayid, aevent.ayatype, aevent.ayevent,
aevent.textra, auser.name, auser.id
from aevent
left outer join auser on (aevent.userid=auser.id)
left join auser on (aevent.userid=auser.id)
*/
@@ -16,7 +16,7 @@ namespace AyaNova.DataList
{
//NOTE: used this type because it's full BizFull and read only BizLimited only which is appropriate and there is no event type
DefaultListObjectType = AyaType.Global;
SQLFrom = "from aevent left outer join auser on (aevent.userid=auser.id)";
SQLFrom = "from aevent left join auser on (aevent.userid=auser.id)";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;

View File

@@ -8,7 +8,7 @@ namespace AyaNova.DataList
public HeadOfficeDataList()
{
DefaultListObjectType = AyaType.HeadOffice;
SQLFrom = "from aheadoffice left outer join acontract on (aheadoffice.contractid=acontract.id)";
SQLFrom = "from aheadoffice left join acontract on (aheadoffice.contractid=acontract.id)";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;

View File

@@ -9,7 +9,7 @@ namespace AyaNova.DataList
public InsideUserDataList()
{
DefaultListObjectType = AyaType.User;
SQLFrom = "from auser left outer join avendor on (auser.vendorid=avendor.id)";
SQLFrom = "from auser left join avendor on (auser.vendorid=avendor.id)";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;

View File

@@ -10,7 +10,7 @@ namespace AyaNova.DataList
{
DefaultListObjectType = AyaType.Memo;
SQLFrom = "from amemo left outer join auser on (amemo.fromid=auser.id)";
SQLFrom = "from amemo left join auser on (amemo.fromid=auser.id)";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;

View File

@@ -9,7 +9,7 @@ namespace AyaNova.DataList
public OutsideUserDataList()
{
DefaultListObjectType = AyaType.User;
SQLFrom = "from auser left outer join aheadoffice on (auser.headofficeid=aheadoffice.id) left outer join acustomer on (auser.customerid=acustomer.id)";
SQLFrom = "from auser left join aheadoffice on (auser.headofficeid=aheadoffice.id) left join acustomer on (auser.customerid=acustomer.id)";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;

View File

@@ -8,7 +8,7 @@ namespace AyaNova.DataList
public ProjectDataList()
{
DefaultListObjectType = AyaType.Project;
SQLFrom = "from aproject left outer join auser on (aproject.projectoverseerid=auser.id)";
SQLFrom = "from aproject left join auser on (aproject.projectoverseerid=auser.id)";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;

View File

@@ -10,7 +10,7 @@ namespace AyaNova.DataList
{
DefaultListObjectType = AyaType.Review;
SQLFrom = "from areview left outer join auser uassto on (areview.userid=uassto.id) left outer join auser uassby on (areview.assignedbyuserid=uassby.id)";
SQLFrom = "from areview left join auser uassto on (areview.userid=uassto.id) left join auser uassby on (areview.assignedbyuserid=uassby.id)";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;

View File

@@ -8,7 +8,7 @@ namespace AyaNova.DataList
public TestWidgetDataList()
{
DefaultListObjectType = AyaType.Widget;
SQLFrom = "from awidget left outer join auser on (awidget.userid=auser.id)";
SQLFrom = "from awidget left join auser on (awidget.userid=auser.id)";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;

View File

@@ -8,12 +8,14 @@ namespace AyaNova.DataList
public UnitDataList()
{
DefaultListObjectType = AyaType.Unit;
//Self join prototype
//Be sure to alias *all* the tables to avoid issues
SQLFrom = "from aunit as amainunit "
+ "left outer join acustomer on (amainunit.customerid=acustomer.id) "
+ "left outer join aunit as aparentunit on (amainunit.parentunitid=aparentunit.id and amainunit.parentunitid is not null) "
+ "left outer join aunitmodel on (amainunit.unitmodelid=aunitmodel.id and amainunit.unitmodelid is not null) "
+ "left outer join avendor on (amainunit.purchasedfromvendorid=avendor.id and amainunit.purchasedfromvendorid is not null) "
+ "left outer join aunit as areplacedbyunit on (amainunit.replacedbyunitid=areplacedbyunit.id and amainunit.replacedbyunitid is not null) ";
+ "left join acustomer on (amainunit.customerid=acustomer.id) "
+ "left join aunit as aparentunit on (amainunit.parentunitid=aparentunit.id) "
+ "left join aunitmodel on (amainunit.unitmodelid=aunitmodel.id) "
+ "left join avendor on (amainunit.purchasedfromvendorid=avendor.id) "
+ "left join aunit as areplacedbyunit on (amainunit.replacedbyunitid=areplacedbyunit.id) ";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;

View File

@@ -8,7 +8,7 @@ namespace AyaNova.DataList
public UnitModelDataList()
{
DefaultListObjectType = AyaType.UnitModel;
SQLFrom = "from aunitmodel left outer join avendor on (aunitmodel.vendorid=avendor.id)";
SQLFrom = "from aunitmodel left join avendor on (aunitmodel.vendorid=avendor.id)";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;