This commit is contained in:
2021-08-23 20:22:57 +00:00
parent 852d2ee21d
commit 042e3efb8e
2 changed files with 4 additions and 1 deletions

View File

@@ -5847,10 +5847,11 @@ namespace AyaNova.Biz
{ {
var unitInfo = await ct.Unit.AsNoTracking() var unitInfo = await ct.Unit.AsNoTracking()
.Where(x => x.Id == o.UnitId) .Where(x => x.Id == o.UnitId)
.Select(x => new { x.Serial, x.Description, x.UnitModelId, x.Address, x.City, x.Region, x.Country, x.Latitude, x.Longitude }) .Select(x => new { x.Serial, x.Description, x.UnitModelId, x.Address, x.City, x.Region, x.Country, x.Latitude, x.Longitude, x.Metered })
.FirstOrDefaultAsync(); .FirstOrDefaultAsync();
o.UnitViz = unitInfo.Serial; o.UnitViz = unitInfo.Serial;
o.UnitDescriptionViz = unitInfo.Description; o.UnitDescriptionViz = unitInfo.Description;
o.UnitMeteredViz=unitInfo.Metered;
if (populateForReporting) if (populateForReporting)
{ {
o.AddressViz = unitInfo.Address; o.AddressViz = unitInfo.Address;

View File

@@ -33,6 +33,8 @@ namespace AyaNova.Models
public string UnitModelModelNumberViz { get; set; } public string UnitModelModelNumberViz { get; set; }
[NotMapped] [NotMapped]
public string UnitDescriptionViz { get; set; } public string UnitDescriptionViz { get; set; }
[NotMapped]
public bool UnitMeteredViz { get; set; }
//PHYSICAL ADDRESS //PHYSICAL ADDRESS
[NotMapped] [NotMapped]