case 4015

This commit is contained in:
2021-11-05 15:27:14 +00:00
parent c36012e89d
commit 3416f91031
6 changed files with 74 additions and 21 deletions

View File

@@ -875,10 +875,10 @@ namespace AyaNova.Biz
//Alert notes //Alert notes
//Customer notes first then others below //Customer notes first then others below
var custInfo = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => new { AlertViz = x.AlertNotes, x.TechNotes, CustomerViz = x.Name }).FirstOrDefaultAsync(); var custInfo = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => new { x.AlertNotes, x.TechNotes, x.Name, x.Phone1, x.Phone2, x.Phone3, x.Phone4, x.Phone5, x.EmailAddress }).FirstOrDefaultAsync();
if (!string.IsNullOrWhiteSpace(custInfo.AlertViz)) if (!string.IsNullOrWhiteSpace(custInfo.AlertNotes))
{ {
o.AlertViz = $"{await Translate("Customer")} - {await Translate("AlertNotes")}\n{custInfo.AlertViz}\n\n"; o.AlertViz = $"{await Translate("Customer")} - {await Translate("AlertNotes")}\n{custInfo.AlertNotes}\n\n";
} }
if (!string.IsNullOrWhiteSpace(custInfo.TechNotes)) if (!string.IsNullOrWhiteSpace(custInfo.TechNotes))
@@ -886,7 +886,13 @@ namespace AyaNova.Biz
o.CustomerTechNotesViz = $"{await Translate("CustomerTechNotes")}\n{custInfo.TechNotes}\n\n"; o.CustomerTechNotesViz = $"{await Translate("CustomerTechNotes")}\n{custInfo.TechNotes}\n\n";
} }
o.CustomerViz = custInfo.CustomerViz; o.CustomerViz = custInfo.Name;
o.CustomerPhone1Viz = custInfo.Phone1;
o.CustomerPhone2Viz = custInfo.Phone2;
o.CustomerPhone3Viz = custInfo.Phone3;
o.CustomerPhone4Viz = custInfo.Phone4;
o.CustomerPhone5Viz = custInfo.Phone5;
o.CustomerEmailAddressViz = custInfo.EmailAddress;
if (o.ProjectId != null) if (o.ProjectId != null)
o.ProjectViz = await ct.Project.AsNoTracking().Where(x => x.Id == o.ProjectId).Select(x => x.Name).FirstOrDefaultAsync(); o.ProjectViz = await ct.Project.AsNoTracking().Where(x => x.Id == o.ProjectId).Select(x => x.Name).FirstOrDefaultAsync();

View File

@@ -854,10 +854,10 @@ namespace AyaNova.Biz
//Alert notes //Alert notes
//Customer notes first then others below //Customer notes first then others below
var custInfo = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => new { AlertViz = x.AlertNotes, x.TechNotes, CustomerViz = x.Name }).FirstOrDefaultAsync(); var custInfo = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => new { x.AlertNotes, x.TechNotes, x.Name, x.Phone1, x.Phone2, x.Phone3, x.Phone4, x.Phone5, x.EmailAddress }).FirstOrDefaultAsync();
if (!string.IsNullOrWhiteSpace(custInfo.AlertViz)) if (!string.IsNullOrWhiteSpace(custInfo.AlertNotes))
{ {
o.AlertViz = $"{await Translate("Customer")} - {await Translate("AlertNotes")}\n{custInfo.AlertViz}\n\n"; o.AlertViz = $"{await Translate("Customer")} - {await Translate("AlertNotes")}\n{custInfo.AlertNotes}\n\n";
} }
if (!string.IsNullOrWhiteSpace(custInfo.TechNotes)) if (!string.IsNullOrWhiteSpace(custInfo.TechNotes))
@@ -865,7 +865,13 @@ namespace AyaNova.Biz
o.CustomerTechNotesViz = $"{await Translate("CustomerTechNotes")}\n{custInfo.TechNotes}\n\n"; o.CustomerTechNotesViz = $"{await Translate("CustomerTechNotes")}\n{custInfo.TechNotes}\n\n";
} }
o.CustomerViz = custInfo.CustomerViz; o.CustomerViz = custInfo.Name;
o.CustomerPhone1Viz = custInfo.Phone1;
o.CustomerPhone2Viz = custInfo.Phone2;
o.CustomerPhone3Viz = custInfo.Phone3;
o.CustomerPhone4Viz = custInfo.Phone4;
o.CustomerPhone5Viz = custInfo.Phone5;
o.CustomerEmailAddressViz = custInfo.EmailAddress;
if (o.ProjectId != null) if (o.ProjectId != null)
o.ProjectViz = await ct.Project.AsNoTracking().Where(x => x.Id == o.ProjectId).Select(x => x.Name).FirstOrDefaultAsync(); o.ProjectViz = await ct.Project.AsNoTracking().Where(x => x.Id == o.ProjectId).Select(x => x.Name).FirstOrDefaultAsync();

View File

@@ -968,10 +968,10 @@ namespace AyaNova.Biz
//Alert notes //Alert notes
//Customer notes first then others below //Customer notes first then others below
var custInfo = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => new { AlertViz = x.AlertNotes, x.TechNotes, CustomerViz = x.Name }).FirstOrDefaultAsync(); var custInfo = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => new { x.AlertNotes, x.TechNotes, x.Name, x.Phone1, x.Phone2, x.Phone3, x.Phone4, x.Phone5, x.EmailAddress }).FirstOrDefaultAsync();
if (!string.IsNullOrWhiteSpace(custInfo.AlertViz)) if (!string.IsNullOrWhiteSpace(custInfo.AlertNotes))
{ {
o.AlertViz = $"{await Translate("Customer")} - {await Translate("AlertNotes")}\n{custInfo.AlertViz}\n\n"; o.AlertViz = $"{await Translate("Customer")} - {await Translate("AlertNotes")}\n{custInfo.AlertNotes}\n\n";
} }
if (!string.IsNullOrWhiteSpace(custInfo.TechNotes)) if (!string.IsNullOrWhiteSpace(custInfo.TechNotes))
@@ -979,7 +979,13 @@ namespace AyaNova.Biz
o.CustomerTechNotesViz = $"{await Translate("CustomerTechNotes")}\n{custInfo.TechNotes}\n\n"; o.CustomerTechNotesViz = $"{await Translate("CustomerTechNotes")}\n{custInfo.TechNotes}\n\n";
} }
o.CustomerViz = custInfo.CustomerViz; o.CustomerViz = custInfo.Name;
o.CustomerPhone1Viz = custInfo.Phone1;
o.CustomerPhone2Viz = custInfo.Phone2;
o.CustomerPhone3Viz = custInfo.Phone3;
o.CustomerPhone4Viz = custInfo.Phone4;
o.CustomerPhone5Viz = custInfo.Phone5;
o.CustomerEmailAddressViz = custInfo.EmailAddress;
if (o.ProjectId != null) if (o.ProjectId != null)
o.ProjectViz = await ct.Project.AsNoTracking().Where(x => x.Id == o.ProjectId).Select(x => x.Name).FirstOrDefaultAsync(); o.ProjectViz = await ct.Project.AsNoTracking().Where(x => x.Id == o.ProjectId).Select(x => x.Name).FirstOrDefaultAsync();

View File

@@ -49,9 +49,20 @@ namespace AyaNova.Models
public long CustomerId { get; set; } public long CustomerId { get; set; }
[NotMapped] [NotMapped]
public string CustomerViz { get; set; } public string CustomerViz { get; set; }
[NotMapped] [NotMapped]
public string CustomerTechNotesViz { get; set; } public string CustomerTechNotesViz { get; set; }
[NotMapped]
public string CustomerPhone1Viz { get; set; }
[NotMapped]
public string CustomerPhone2Viz { get; set; }
[NotMapped]
public string CustomerPhone3Viz { get; set; }
[NotMapped]
public string CustomerPhone4Viz { get; set; }
[NotMapped]
public string CustomerPhone5Viz { get; set; }
[NotMapped]
public string CustomerEmailAddressViz { get; set; }
public long? ProjectId { get; set; } public long? ProjectId { get; set; }
[NotMapped] [NotMapped]

View File

@@ -40,6 +40,18 @@ namespace AyaNova.Models
[NotMapped] [NotMapped]
public string CustomerTechNotesViz { get; set; } public string CustomerTechNotesViz { get; set; }
[NotMapped]
public string CustomerPhone1Viz { get; set; }
[NotMapped]
public string CustomerPhone2Viz { get; set; }
[NotMapped]
public string CustomerPhone3Viz { get; set; }
[NotMapped]
public string CustomerPhone4Viz { get; set; }
[NotMapped]
public string CustomerPhone5Viz { get; set; }
[NotMapped]
public string CustomerEmailAddressViz { get; set; }
public long? ProjectId { get; set; } public long? ProjectId { get; set; }
[NotMapped] [NotMapped]

View File

@@ -27,6 +27,18 @@ namespace AyaNova.Models
[NotMapped] [NotMapped]
public string CustomerTechNotesViz { get; set; } public string CustomerTechNotesViz { get; set; }
[NotMapped]
public string CustomerPhone1Viz { get; set; }
[NotMapped]
public string CustomerPhone2Viz { get; set; }
[NotMapped]
public string CustomerPhone3Viz { get; set; }
[NotMapped]
public string CustomerPhone4Viz { get; set; }
[NotMapped]
public string CustomerPhone5Viz { get; set; }
[NotMapped]
public string CustomerEmailAddressViz { get; set; }
public long? ProjectId { get; set; } public long? ProjectId { get; set; }
[NotMapped] [NotMapped]