Feature - Data getrennt Feature <<< AICore AICore: Verbindung BeWoPlaner -> MikeAiService
62 lines
1.7 KiB
C#
62 lines
1.7 KiB
C#
using BS.Shared;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
|
|
namespace BeWo.Data.Entities
|
|
{
|
|
[DebuggerDisplay("{Oid}: {Street}, {Town}")]
|
|
public class Address : BeWoEntityBase
|
|
{
|
|
public static string PropertyName_AddressLine1 = "AddressLine1";
|
|
public static string PropertyName_Country = "Country";
|
|
public static string PropertyName_PostalCode = "PostalCode";
|
|
public static string PropertyName_State = "State";
|
|
public static string PropertyName_Street = "Street";
|
|
public static string PropertyName_Town = "Town";
|
|
|
|
public Address()
|
|
{
|
|
_Tid = TableID.Address;
|
|
}
|
|
|
|
public virtual string AddressLine1 { get; set; }
|
|
public virtual string AddressLine2 { get; set; }
|
|
public virtual string Country { get; set; }
|
|
public virtual long? L_Version { get; set; }
|
|
public virtual decimal? Latitude { get; set; }
|
|
public virtual decimal? Longitude { get; set; }
|
|
public virtual string PostalCode { get; set; }
|
|
public virtual string State { get; set; }
|
|
public virtual string Street { get; set; }
|
|
public virtual string Town { get; set; }
|
|
|
|
public virtual Address CopyToNew()
|
|
{
|
|
return new Address
|
|
{
|
|
AddressLine1 = AddressLine1,
|
|
AddressLine2 = this.AddressLine2,
|
|
Country = this.Country,
|
|
PostalCode = this.PostalCode,
|
|
Notice = this.Notice,
|
|
State = this.State,
|
|
Street = this.Street,
|
|
Town = this.Town
|
|
};
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
if (this is null)
|
|
return 0;
|
|
|
|
return Oid.Value.GetHashCode();
|
|
}
|
|
|
|
public virtual bool IsEmpty()
|
|
{
|
|
return string.IsNullOrWhiteSpace(Street + Town + PostalCode);
|
|
}
|
|
}
|
|
} |