This commit is contained in:
@@ -325,6 +325,7 @@ namespace AyaNova.Biz
|
|||||||
var orderedList = from id in batch join z in batchResults on id equals z.Id select z;
|
var orderedList = from id in batch join z in batchResults on id equals z.Id select z;
|
||||||
foreach (HeadOffice w in orderedList)
|
foreach (HeadOffice w in orderedList)
|
||||||
{
|
{
|
||||||
|
await PopulateVizFields(w);
|
||||||
var jo = JObject.FromObject(w);
|
var jo = JObject.FromObject(w);
|
||||||
if (!JsonUtil.JTokenIsNullOrEmpty(jo["CustomFields"]))
|
if (!JsonUtil.JTokenIsNullOrEmpty(jo["CustomFields"]))
|
||||||
jo["CustomFields"] = JObject.Parse((string)jo["CustomFields"]);
|
jo["CustomFields"] = JObject.Parse((string)jo["CustomFields"]);
|
||||||
@@ -334,12 +335,17 @@ namespace AyaNova.Biz
|
|||||||
return ReportData;
|
return ReportData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//populate viz fields from provided object
|
||||||
|
private async Task PopulateVizFields(HeadOffice o)
|
||||||
|
{
|
||||||
|
if (o.ContractId != null)
|
||||||
|
o.ContractViz = await ct.Contract.AsNoTracking().Where(x => x.Id == o.ContractId).Select(x => x.Name).FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// IMPORT EXPORT
|
// IMPORT EXPORT
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
public async Task<JArray> GetExportData(long[] idList)
|
public async Task<JArray> GetExportData(long[] idList)
|
||||||
{
|
{
|
||||||
//for now just re-use the report data code
|
//for now just re-use the report data code
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ namespace AyaNova.Models
|
|||||||
public string AccountNumber { get; set; }
|
public string AccountNumber { get; set; }
|
||||||
public bool UsesBanking { get; set; }
|
public bool UsesBanking { get; set; }
|
||||||
public long? ContractId { get; set; }
|
public long? ContractId { get; set; }
|
||||||
|
[NotMapped]
|
||||||
|
public string ContractViz { get; set; }
|
||||||
public DateTime? ContractExpires { get; set; }
|
public DateTime? ContractExpires { get; set; }
|
||||||
public string Phone1 { get; set; }
|
public string Phone1 { get; set; }
|
||||||
public string Phone2 { get; set; }
|
public string Phone2 { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user