Imports System Imports System.ComponentModel Imports DevExpress.Xpo Imports DevExpress.Data.Filtering Imports DevExpress.ExpressApp Imports DevExpress.Persistent.Base Imports DevExpress.Persistent.BaseImpl Imports DevExpress.Persistent.Validation Imports DevExpress.ExpressApp.ConditionalAppearance 'CreditNoteRows _ _ _ _ _ _ _ _ Public Class InvoiceCreditNoteHeader Inherits BaseObject Private _CustomersFrom As CustomersFrom Private _Customers As Customers Private _Storage As Storage Private _StorageMoveType As StorageMoveType Private _DateExecution As Date Private _ObjectCreated As Date Private _UserCreated As User Private _PaymentOption As PaymentOption Private _DatePayment As Date Private _Description As String Public Sub New(ByVal session As Session) MyBase.New(session) End Sub Public Overrides Sub AfterConstruction() MyBase.AfterConstruction() DateExecution = GetSQLTime(Session) End Sub Protected Overrides Sub OnSaving() MyBase.OnSaving() If Session.IsNewObject(Me) Then ObjectCreated = GetSQLTime(Session) UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser)) End If End Sub _ Property CustomersFrom As CustomersFrom Get Return _CustomersFrom End Get Set(value As CustomersFrom) SetPropertyValue("CustomersFrom", _CustomersFrom, value) End Set End Property _ Property Customers As Customers Get Return _Customers End Get Set(value As Customers) SetPropertyValue("Customers", _Customers, value) End Set End Property _ Property Storage As Storage Get Return _Storage End Get Set(value As Storage) SetPropertyValue("Storage", _Storage, value) End Set End Property Property StorageMoveType As StorageMoveType Get Return _StorageMoveType End Get Set(value As StorageMoveType) SetPropertyValue("StorageMoveType", _StorageMoveType, value) End Set End Property Property DateExecution As Date Get Return _DateExecution End Get Set(value As Date) SetPropertyValue("DateExecution", _DateExecution, value) End Set End Property Property ObjectCreated As Date Get Return _ObjectCreated End Get Set(value As Date) SetPropertyValue("ObjectCreated", _ObjectCreated, value) End Set End Property Property UserCreated As User Get Return _UserCreated End Get Set(value As User) SetPropertyValue("UserCreated", _UserCreated, value) End Set End Property _ Property PaymentOption As PaymentOption Get Return _PaymentOption End Get Set(value As PaymentOption) SetPropertyValue("PaymentOption", _PaymentOption, value) End Set End Property Property DatePayment As Date Get Return _DatePayment End Get Set(value As Date) SetPropertyValue("DatePayment", _DatePayment, value) End Set End Property _ Property Description As String Get Return _Description End Get Set(value As String) SetPropertyValue("Description", _Description, value) End Set End Property '--==ReadOnly==-- _ _ ReadOnly Property InvoiceCreditNoteRows As XPCollection(Of InvoiceCreditNoteRows) Get Return GetCollection(Of InvoiceCreditNoteRows)("InvoiceCreditNoteRows") End Get End Property End Class