This commit is contained in:
2023-04-21 22:14:30 +00:00
parent 76ffaa6910
commit 4c603cb648
3 changed files with 12 additions and 9 deletions

View File

@@ -360,11 +360,14 @@ namespace Sockeye.Biz
if (CustomerId != 0)
{
if (!vc.Has("customer", CustomerId))
if (!vc.Has("customername", CustomerId))
{
vc.Add(await ct.Customer.AsNoTracking().Where(x => x.Id == CustomerId).Select(x => x.Name).FirstOrDefaultAsync(), "customer", CustomerId);
var custInfo = await ct.Customer.AsNoTracking().Where(x => x.Id == CustomerId).FirstOrDefaultAsync();
vc.Add(custInfo.Name, "customername", CustomerId);
vc.Add(custInfo.EmailAddress, "customeremail", CustomerId);
}
o.CustomerViz = vc.Get("customer", CustomerId);
o.CustomerViz = vc.Get("customername", CustomerId);
o.CustomerEmailViz = vc.Get("customeremail", CustomerId);
}
if (!vc.Has("productname", o.ProductId))