Files
BeWoPlaner/Data/Entities/Address.cs

229 lines
5.1 KiB
C#

using BS.Shared;
using System.Diagnostics;
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";
private string _AddressLine1;
private string _AddressLine2;
private string _Country;
private string _PostalCode;
private string _State;
private string _Street;
private string _Town;
private decimal? _Latitude;
private decimal? _Longitude;
private long? _L_Version;
public Address()
{
this._Tid = TableID.Address;
}
public virtual string AddressLine1
{
get
{
return this._AddressLine1;
}
set
{
if (this.AreDifferent(this._AddressLine1, value))
{
this._AddressLine1 = value;
}
}
}
public virtual string AddressLine2
{
get
{
return this._AddressLine2;
}
set
{
if (this.AreDifferent(this._AddressLine2, value))
{
this._AddressLine2 = value;
}
}
}
public virtual string Country
{
get
{
return this._Country;
}
set
{
if (this.AreDifferent(this._Country, value))
{
this._Country = value;
}
}
}
public virtual string PostalCode
{
get
{
return this._PostalCode;
}
set
{
if (this.AreDifferent(this._PostalCode, value))
{
this._PostalCode = value;
}
}
}
public virtual string State
{
get
{
return this._State;
}
set
{
if (this.AreDifferent(this._State, value))
{
this._State = value;
}
}
}
public virtual string Street
{
get
{
return this._Street;
}
set
{
if (this.AreDifferent(this._Street, value))
{
this._Street = value;
}
}
}
public virtual string Town
{
get
{
return this._Town;
}
set
{
if (this.AreDifferent(this._Town, value))
{
this._Town = value;
}
}
}
public virtual decimal? Latitude
{
get
{
return this._Latitude;
}
set
{
if (this.AreDifferent(this._Latitude, value))
{
this._Latitude = value;
}
}
}
public virtual decimal? Longitude
{
get
{
return this._Longitude;
}
set
{
if (this.AreDifferent(this._Longitude, value))
{
this._Longitude = value;
}
}
}
public virtual long? L_Version
{
get
{
return this._L_Version;
}
set
{
if (this.AreDifferent(this._L_Version, value))
{
this._L_Version = value;
}
}
}
public virtual Address CopyToNew()
{
return new Address
{
AddressLine1 = this.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();
}
}
}