This commit is contained in:
2021-06-17 15:54:26 +00:00
parent cc91925118
commit 0415565d17
2 changed files with 14 additions and 3 deletions

View File

@@ -8,8 +8,9 @@ namespace AyaNova.DataList
{
DefaultListAType = AyaType.WorkOrder;
SQLFrom = "from aworkorder "
+ "left join acustomer on (aworkorder.customerid=acustomer.id)"
+ "left join aproject on (aworkorder.projectid=aproject.id)"
+ "left join acustomer on (aworkorder.customerid=acustomer.id) "
+ "left join aheadoffice on (acustomer.headofficeid=aheadoffice.id) "
+ "left join aproject on (aworkorder.projectid=aproject.id) "
+ "left join acontract on (aworkorder.contractid=acontract.id)";
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
@@ -38,6 +39,16 @@ namespace AyaNova.DataList
SqlValueColumnName = "acustomer.name"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "HeadOffice",
FieldKey = "workorderheadoffice",
UiFieldDataType = (int)UiFieldDataType.Text,
AType = (int)AyaType.HeadOffice,
SqlIdColumnName = "aheadoffice.id",
SqlValueColumnName = "aheadoffice.name"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "WorkOrderSummary",

View File

@@ -2521,7 +2521,7 @@ namespace AyaNova.Util
o.CompleteByDate = woDate.AddDays(5);
o.CustomerContactName = "contact name here";
// o.CustomerContactName = "contact name here";
o.CustomerId = Fake.Random.Long(1, TotalSeededCustomers);
using (AyContext ct = ServiceProviderProvider.DBContext)