This commit is contained in:
2022-07-08 18:53:50 +00:00
parent bb231437d0
commit b1fc5223e2

View File

@@ -341,7 +341,7 @@ namespace AyaNova.Biz
{ {
//if a specific status is requested then it doesn't matter if it's locked or not but if a specific status is not requested then any locked status is acceptable //if a specific status is requested then it doesn't matter if it's locked or not but if a specific status is not requested then any locked status is acceptable
string statusFragment=workOrderStatusId==0?"and aworkorderstatus.locked=true":$"and aworkorder.laststatusid={workOrderStatusId}"; string statusFragment = workOrderStatusId == 0 ? "and aworkorderstatus.locked=true" : $"and aworkorder.laststatusid={workOrderStatusId}";
var ret = new List<WorkOrderAccountingListItem>(); var ret = new List<WorkOrderAccountingListItem>();
using (var command = ct.Database.GetDbConnection().CreateCommand()) using (var command = ct.Database.GetDbConnection().CreateCommand())
@@ -364,16 +364,24 @@ namespace AyaNova.Biz
{ {
if (await dr.ReadAsync()) if (await dr.ReadAsync())
{ {
// o.LastWorkOrderViz = dr.GetInt64(0);
// o.LastServiceDateViz = dr.GetDateTime(1); var i = new WorkOrderAccountingListItem();
i.Id = dr.GetInt64(0);
i.CustomerId = dr.GetInt64(1);
i.Serial = dr.GetInt64(2);
if (!dr.IsDBNull(3))
i.ServiceDate = dr.GetDateTime(3);
i.CustomerName=dr.GetString(4);
i.ProjectName=dr.GetString(5);
i.WorkorderStatusName=dr.GetString(6);
i.Color=dr.GetString(7);
ret.Add(i);
} }
} }
await ct.Database.CloseConnectionAsync(); await ct.Database.CloseConnectionAsync();
} }
return ret; return ret;
} }