This commit is contained in:
2021-07-20 20:10:03 +00:00
parent 87b7eee335
commit 2968779ea6
2 changed files with 5 additions and 4 deletions

View File

@@ -246,12 +246,13 @@ namespace AyaNova.DataList
SqlValueColumnName = "aworkorder.longitude"
});
FieldDefinitions.Add(new DataListFieldDefinition
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "WorkOrderAge",
FieldKey = "WorkOrderAge",
UiFieldDataType = (int)UiFieldDataType.TimeSpan,
SqlColumnExpression="AGE(timezone('UTC', now()), aworkorder.createddate) as expwoage",
UiFieldDataType = (int)UiFieldDataType.TimeSpan,
IsFilterable = false,
SqlColumnExpression = "AGE(timezone('UTC', now()), aworkorder.createddate) as expwoage",
SqlValueColumnName = "expwoage"
});

View File

@@ -2533,7 +2533,7 @@ namespace AyaNova.Util
var tempHour = Fake.Random.Int(9, 17);//9am to 5 pm (except some times may be in different dst state so this will be out by an hour for example depending on time of year and time zone in question)
var woDate = DesiredTimeInUtc(new DateTime(tempDate.Year, tempDate.Month, tempDate.Day, tempHour, 0, 0));
o.CreatedDate = woDate > DateTime.UtcNow ? DateTime.UtcNow : woDate;//no created dates in future but want a range of past dates to show off age of wo
o.CompleteByDate = woDate.AddDays(5);
// o.CustomerContactName = "contact name here";
o.CustomerId = Fake.Random.Long(1, TotalSeededCustomers);