37 lines
1.5 KiB
C#
37 lines
1.5 KiB
C#
using BS.Shared.DataContracts;
|
|
|
|
namespace BeWoPlanerMobil.Util
|
|
{
|
|
public class Umfeldsperson
|
|
{
|
|
public string Vorname { get; set; }
|
|
public string Nachname { get; set; }
|
|
public string StrNameNr { get; set; }
|
|
public string PLZOrt { get; set; }
|
|
public string TelNr { get; set; }
|
|
public string Mobil { get; set; }
|
|
public string EMail { get; set; }
|
|
public string Fax { get; set; }
|
|
public string Rolle { get; set; }
|
|
public string Titel { get; set; }
|
|
public string FormattedName => $"{Titel}{(!string.IsNullOrWhiteSpace(Titel) ? " " : "")}{Vorname} {Nachname}";
|
|
|
|
public long? Customer2PersonOid { get; }
|
|
|
|
public Umfeldsperson(CustomerPersonRelationDC umfeldspersonDC)
|
|
{
|
|
Customer2PersonOid = umfeldspersonDC.Customer2PersonOid;
|
|
var person = umfeldspersonDC.Person;
|
|
Rolle = umfeldspersonDC.RelationRole?.ToString() ?? string.Empty;
|
|
Vorname = person.FirstName ?? string.Empty;
|
|
Nachname = person.LastName ?? string.Empty;
|
|
StrNameNr = person.Street ?? string.Empty;
|
|
PLZOrt = $"{person.PostalCode} {person.Town}";
|
|
TelNr = person.Communication1 ?? string.Empty;
|
|
Mobil = person.Communication2 ?? string.Empty;
|
|
EMail = person.Communication3 ?? string.Empty;
|
|
Fax = person.Communication4 ?? string.Empty;
|
|
Titel = person.Title ?? string.Empty;
|
|
}
|
|
}
|
|
} |