Added address

This commit is contained in:
2025-07-28 11:58:52 +02:00
parent 140b4736a6
commit 959b8ca1c0
6 changed files with 24 additions and 6 deletions

View File

@@ -29,7 +29,7 @@ namespace AICore.Context.EntryMapper
pContext.PostalCode = pObject.Person.Address.PostalCode;
pContext.Town = pObject.Person.Address.Town;
pContext.DistanceInMeter = pObject.DistanceInMeter;
pContext.InvoiceAddress = "---";
pContext.InvoiceAddress = pObject.Person.InvoiceAddress?.ToSingleLine() ?? "null";
}
}
}

View File

@@ -9,13 +9,13 @@ namespace AICore.Context.EntryMapper
{
public override void MergeWithObject(Customer pObject, CustomerNavigationContextEntry pContext)
{
pContext.AddressString = "---";
pContext.AddressString = pObject.Person.Address?.ToSingleLine() ?? "null";
pContext.CustomerAlias = pObject.CustomerAlias;
pContext.CustomerOid = pObject.Oid.Value;
pContext.DateOfBirth = pObject.Person.DateOfBirth;
pContext.EquityContribution = pObject.EquityContribution;
pContext.FullName = pObject.Person.FirstNameLastName;
pContext.InvoiceAddressString = "---";
pContext.InvoiceAddressString = pObject.Person.InvoiceAddress?.ToSingleLine() ?? "null";
}
}
}

View File

@@ -14,7 +14,7 @@ namespace AICore.Context.EntryMapper
pContext.Name2 = pObject.Name2;
pContext.DebitorNumber = pObject.DebitorNumber;
pContext.BusinessPartnerId = pObject.BusinessPartnerId;
pContext.AddressString = "---";
pContext.AddressString = pObject.Address?.ToSingleLine() ?? "null";
pContext.IKDatenannahmestelle = pObject.IKDatenannahmestelle;
pContext.IKKostentrager = pObject.IKKostentrager;
pContext.IKKrankenkasse = pObject.IKKrankenkasse;

View File

@@ -9,7 +9,7 @@ namespace AICore.Context.EntryMapper
{
public override void MergeWithObject(Person pObject, PersonNavigationContextEntry pContext)
{
pContext.AddressString = "---";
pContext.AddressString = pObject.Address?.ToSingleLine() ?? "null";
pContext.DateOfBirth = pObject.DateOfBirth;
//pContext.CustomerOid = "---";
//pContext.EmployeeOid = "---";

View File

@@ -59,7 +59,7 @@ namespace BeWo
public static string ShortVersion = "3.26";
public static string Version = "Version 3.26 - 1.1 Test";
public static string Version = "Version 3.26 - 1.2 Test";
public static int RenderTier = 0;
public static bool IsInDesignMode = DesignerProperties.GetIsInDesignMode(new DependencyObject());

View File

@@ -1,5 +1,7 @@
using BS.Shared;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace BeWo.Data.Entities
{
@@ -56,5 +58,21 @@ namespace BeWo.Data.Entities
{
return string.IsNullOrWhiteSpace(Street + Town + PostalCode);
}
public virtual string ToSingleLine()
{
var parts = new List<string>
{
AddressLine1,
AddressLine2,
Street,
PostalCode,
Town,
State,
Country
};
return string.Join(", ", parts.Where(p => !string.IsNullOrWhiteSpace(p)));
}
}
}