//------------------------------------------------------------------------------ // // This code was generated by a tool. // Tango Observables Generator // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. Do not modify! // //------------------------------------------------------------------------------ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Xml.Serialization; using Newtonsoft.Json; using System.Linq; using Tango.DAL.Remote.DB; using Tango.Core; using System.ComponentModel; using Tango.Core.CustomAttributes; namespace Tango.BL.Entities { [Table("ADDRESSES")] public abstract class AddressBase : ObservableEntity
{ public event EventHandler AddressStringChanged; public event EventHandler LocalityChanged; public event EventHandler CountryChanged; public event EventHandler CityChanged; public event EventHandler StateChanged; public event EventHandler CountryCodeChanged; public event EventHandler PostalCodeChanged; public event EventHandler> OrganizationsChanged; public event EventHandler> UsersChanged; protected String _addressstring; /// /// Gets or sets the addressbase address string. /// [Column("ADDRESS_STRING")] public String AddressString { get { return _addressstring; } set { if (_addressstring != value) { _addressstring = value; OnAddressStringChanged(value); } } } protected String _locality; /// /// Gets or sets the addressbase locality. /// [Column("LOCALITY")] public String Locality { get { return _locality; } set { if (_locality != value) { _locality = value; OnLocalityChanged(value); } } } protected String _country; /// /// Gets or sets the addressbase country. /// [Column("COUNTRY")] public String Country { get { return _country; } set { if (_country != value) { _country = value; OnCountryChanged(value); } } } protected String _city; /// /// Gets or sets the addressbase city. /// [Column("CITY")] public String City { get { return _city; } set { if (_city != value) { _city = value; OnCityChanged(value); } } } protected String _state; /// /// Gets or sets the addressbase state. /// [Column("STATE")] public String State { get { return _state; } set { if (_state != value) { _state = value; OnStateChanged(value); } } } protected String _countrycode; /// /// Gets or sets the addressbase country code. /// [Column("COUNTRY_CODE")] public String CountryCode { get { return _countrycode; } set { if (_countrycode != value) { _countrycode = value; OnCountryCodeChanged(value); } } } protected String _postalcode; /// /// Gets or sets the addressbase postal code. /// [Column("POSTAL_CODE")] public String PostalCode { get { return _postalcode; } set { if (_postalcode != value) { _postalcode = value; OnPostalCodeChanged(value); } } } protected SynchronizedObservableCollection _organizations; /// /// Gets or sets the addressbase organizations. /// public virtual SynchronizedObservableCollection Organizations { get { return _organizations; } set { if (_organizations != value) { _organizations = value; OnOrganizationsChanged(value); } } } protected SynchronizedObservableCollection _users; /// /// Gets or sets the addressbase users. /// public virtual SynchronizedObservableCollection Users { get { return _users; } set { if (_users != value) { _users = value; OnUsersChanged(value); } } } /// /// Called when the AddressString has changed. /// protected virtual void OnAddressStringChanged(String addressstring) { AddressStringChanged?.Invoke(this, addressstring); RaisePropertyChanged(nameof(AddressString)); } /// /// Called when the Locality has changed. /// protected virtual void OnLocalityChanged(String locality) { LocalityChanged?.Invoke(this, locality); RaisePropertyChanged(nameof(Locality)); } /// /// Called when the Country has changed. /// protected virtual void OnCountryChanged(String country) { CountryChanged?.Invoke(this, country); RaisePropertyChanged(nameof(Country)); } /// /// Called when the City has changed. /// protected virtual void OnCityChanged(String city) { CityChanged?.Invoke(this, city); RaisePropertyChanged(nameof(City)); } /// /// Called when the State has changed. /// protected virtual void OnStateChanged(String state) { StateChanged?.Invoke(this, state); RaisePropertyChanged(nameof(State)); } /// /// Called when the CountryCode has changed. /// protected virtual void OnCountryCodeChanged(String countrycode) { CountryCodeChanged?.Invoke(this, countrycode); RaisePropertyChanged(nameof(CountryCode)); } /// /// Called when the PostalCode has changed. /// protected virtual void OnPostalCodeChanged(String postalcode) { PostalCodeChanged?.Invoke(this, postalcode); RaisePropertyChanged(nameof(PostalCode)); } /// /// Called when the Organizations has changed. /// protected virtual void OnOrganizationsChanged(SynchronizedObservableCollection organizations) { OrganizationsChanged?.Invoke(this, organizations); RaisePropertyChanged(nameof(Organizations)); } /// /// Called when the Users has changed. /// protected virtual void OnUsersChanged(SynchronizedObservableCollection users) { UsersChanged?.Invoke(this, users); RaisePropertyChanged(nameof(Users)); } /// /// Initializes a new instance of the class. /// public AddressBase() : base() { Organizations = new SynchronizedObservableCollection(); Users = new SynchronizedObservableCollection(); } } }