case 4015
This commit is contained in:
@@ -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();
|
||||||
@@ -4491,7 +4497,7 @@ namespace AyaNova.Biz
|
|||||||
if (o is PM)
|
if (o is PM)
|
||||||
{
|
{
|
||||||
PM dto = new PM();
|
PM dto = new PM();
|
||||||
CopyObject.Copy(o, dto,"Name");
|
CopyObject.Copy(o, dto, "Name");
|
||||||
return await PMPutAsync((PM)dto);
|
return await PMPutAsync((PM)dto);
|
||||||
}
|
}
|
||||||
return await PMPutAsync((PM)o) as ICoreBizObjectModel;
|
return await PMPutAsync((PM)o) as ICoreBizObjectModel;
|
||||||
|
|||||||
@@ -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();
|
||||||
@@ -4814,7 +4820,7 @@ namespace AyaNova.Biz
|
|||||||
if (o is Quote)
|
if (o is Quote)
|
||||||
{
|
{
|
||||||
Quote dto = new Quote();
|
Quote dto = new Quote();
|
||||||
CopyObject.Copy(o, dto,"Name");
|
CopyObject.Copy(o, dto, "Name");
|
||||||
return await QuotePutAsync((Quote)dto);
|
return await QuotePutAsync((Quote)dto);
|
||||||
}
|
}
|
||||||
return await QuotePutAsync((Quote)o) as ICoreBizObjectModel;
|
return await QuotePutAsync((Quote)o) as ICoreBizObjectModel;
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
@@ -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]
|
||||||
|
|||||||
@@ -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]
|
||||||
|
|||||||
@@ -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]
|
||||||
|
|||||||
Reference in New Issue
Block a user