This commit is contained in:
2022-07-11 21:32:12 +00:00
parent c49b5acd53
commit 322721e838
2 changed files with 2 additions and 7 deletions

View File

@@ -6646,7 +6646,7 @@ namespace AyaNova.Biz
//cache it
var unitInfo = await ct.Unit.AsNoTracking()
.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, x.Metered, x.LastMeterViz })
.Select(x => new { x.Serial, x.Description, x.UnitModelId, x.Address, x.City, x.Region, x.Country, x.Latitude, x.Longitude, x.Metered})
.FirstOrDefaultAsync();
vc.Add(unitInfo.Serial, "unitserial", o.UnitId);
vc.Add(unitInfo.Description, "unitdesc", o.UnitId);
@@ -6657,7 +6657,6 @@ namespace AyaNova.Biz
vc.Add(unitInfo.Latitude.ToString(), "unitlat", o.UnitId);
vc.Add(unitInfo.Longitude.ToString(), "unitlong", o.UnitId);
vc.Add(unitInfo.Metered.ToString(), "unitmetered", o.UnitId);
vc.Add(unitInfo.LastMeterViz.ToString(), "unitlastmeter", o.UnitId);
if (unitInfo.UnitModelId != null)
{
@@ -6705,7 +6704,6 @@ namespace AyaNova.Biz
o.UnitViz = vc.Get("unitserial", o.UnitId);
o.UnitDescriptionViz = vc.Get("unitdesc", o.UnitId);
o.UnitMeteredViz = vc.GetAsBool("unitmetered", o.UnitId);
o.UnitLastMeterViz=vc.Get("unitlastmeter",o.UnitId);
if (populateForReporting)
{
o.AddressViz = vc.Get("unitaddr", o.UnitId);

View File

@@ -35,9 +35,6 @@ namespace AyaNova.Models
[NotMapped]
public bool UnitMeteredViz { get; set; }
[NotMapped]
public string UnitLastMeterViz { get; set; }//for qbi
//PHYSICAL ADDRESS
[NotMapped]
public string AddressViz { get; set; }