This commit is contained in:
@@ -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 })
|
||||
.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 })
|
||||
.FirstOrDefaultAsync();
|
||||
vc.Add(unitInfo.Serial, "unitserial", o.UnitId);
|
||||
vc.Add(unitInfo.Description, "unitdesc", o.UnitId);
|
||||
@@ -6657,6 +6657,7 @@ 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)
|
||||
{
|
||||
@@ -6704,6 +6705,7 @@ 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);
|
||||
|
||||
@@ -29,12 +29,15 @@ namespace AyaNova.Models
|
||||
public string UnitModelNameViz { get; set; }
|
||||
[NotMapped]
|
||||
public string UnitModelVendorViz { get; set; }
|
||||
|
||||
|
||||
[NotMapped]
|
||||
public string UnitDescriptionViz { get; set; }
|
||||
[NotMapped]
|
||||
public bool UnitMeteredViz { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string UnitLastMeterViz { get; set; }//for qbi
|
||||
|
||||
//PHYSICAL ADDRESS
|
||||
[NotMapped]
|
||||
public string AddressViz { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user