using System; using System.Collections.Generic; using BS.Shared; namespace BeWo.Data.Entities { public class AccountingTransaction : BeWoEntityBase { public static string PropertyName_Amount = "Amount"; public static string PropertyName_BookingDate = "BookingDate"; public static string PropertyName_CostBearer2SupportConcept = "CostBearer2SupportConcept"; public static string PropertyName_Customer = "Customer"; public static string PropertyName_Organisation = "Organisation"; public static string PropertyName_SupportConcept = "SupportConcept"; public static string PropertyName_ValueList = "ValueList"; public static string PropertyName_ValidityDate = "ValidityDate"; public static string PropertyName_ImportNotice = "ImportNotice"; private decimal _Amount; private DateTime? _BookingDate; private DateTime? _ValidityDate; private String _ImportNotice; private CostBearer2SupportConcept _CostBearer2SupportConcept; private Customer _Customer; private Organisation _Organisation; private SupportConcept _SupportConcept; private IList _ValueList; public AccountingTransaction() { this._Tid = TableID.AccountingTransaction; } public virtual decimal Amount { get { return this._Amount; } set { if (this.AreDifferent(this._Amount, value)) { this._Amount = value; } } } public virtual DateTime? GueltigkeitsDatum { get { if (_ValidityDate.HasValue) return _ValidityDate; return _BookingDate; } } public virtual DateTime? BookingDate { get { return this._BookingDate; } set { if (this.AreDifferent(this._BookingDate, value)) { this._BookingDate = value; } } } public virtual DateTime? ValidityDate { get { return this._ValidityDate; } set { if (this.AreDifferent(this._ValidityDate, value)) { this._ValidityDate = value; } } } public virtual String ImportNotice { get { return this._ImportNotice; } set { if (this.AreDifferent(this._ImportNotice, value)) { this._ImportNotice = value; } } } public virtual CostBearer2SupportConcept CostBearer2SupportConcept { get { return this._CostBearer2SupportConcept; } set { if (this.AreDifferent(this._CostBearer2SupportConcept, value)) { this._CostBearer2SupportConcept = value; } } } public virtual Customer Customer { get { return this._Customer; } set { if (this.AreDifferent(this._Customer, value)) { this._Customer = value; } } } public virtual Organisation Organisation { get { return this._Organisation; } set { if (this.AreDifferent(this._Organisation, value)) { this._Organisation = value; } } } public virtual SupportConcept SupportConcept { get { return this._SupportConcept; } set { if (this.AreDifferent(this._SupportConcept, value)) { this._SupportConcept = value; } } } public virtual IList ValueList { get { return this._ValueList ?? (this._ValueList = new List()); } set { if (this.AreDifferent(this._ValueList, value)) { this._ValueList = value; } } } } }