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;
|
||||
foreach (HeadOffice w in orderedList)
|
||||
{
|
||||
await PopulateVizFields(w);
|
||||
var jo = JObject.FromObject(w);
|
||||
if (!JsonUtil.JTokenIsNullOrEmpty(jo["CustomFields"]))
|
||||
jo["CustomFields"] = JObject.Parse((string)jo["CustomFields"]);
|
||||
@@ -334,12 +335,17 @@ namespace AyaNova.Biz
|
||||
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
|
||||
//
|
||||
|
||||
|
||||
public async Task<JArray> GetExportData(long[] idList)
|
||||
{
|
||||
//for now just re-use the report data code
|
||||
|
||||
@@ -29,12 +29,14 @@ namespace AyaNova.Models
|
||||
public string AccountNumber { get; set; }
|
||||
public bool UsesBanking { get; set; }
|
||||
public long? ContractId { get; set; }
|
||||
[NotMapped]
|
||||
public string ContractViz { get; set; }
|
||||
public DateTime? ContractExpires { get; set; }
|
||||
public string Phone1 { get; set; }
|
||||
public string Phone2 { get; set; }
|
||||
public string Phone3 { get; set; }
|
||||
public string Phone4 { get; set; }
|
||||
public string Phone5 { get; set; }
|
||||
public string Phone1 { get; set; }
|
||||
public string Phone2 { get; set; }
|
||||
public string Phone3 { get; set; }
|
||||
public string Phone4 { get; set; }
|
||||
public string Phone5 { get; set; }
|
||||
public string EmailAddress { get; set; }
|
||||
|
||||
//POSTAL ADDRESS
|
||||
|
||||
Reference in New Issue
Block a user