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 _ _ _ _ _ _ Public Class IntrastatHeader Inherits BaseObject Private _IntrastatParameters As IntrastatParameters Private _UserCreated As User Private _ObjectCreated As Date Private _DateExecution As Date 'Időszak Év, hónap Private _DocumentNumber As String Private _DocumentFile As FileData Public Sub New(ByVal session As Session) MyBase.New(session) End Sub Public Overrides Sub AfterConstruction() MyBase.AfterConstruction() 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 If String.IsNullOrEmpty(DocumentNumber) Then DocumentNumber = IntrastatParameters.NumberGenerator.GetNewNumber(IntrastatParameters.NumberGenerator) End Sub _ Property IntrastatParameters As IntrastatParameters Get Return _IntrastatParameters End Get Set(value As IntrastatParameters) SetPropertyValue("IntrastatParameters", _IntrastatParameters, 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 ObjectCreated As Date Get Return _ObjectCreated End Get Set(value As Date) SetPropertyValue("ObjectCreated", _ObjectCreated, 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 DocumentNumber As String Get Return _DocumentNumber End Get Set(value As String) SetPropertyValue("DocumentNumber", _DocumentNumber, value) End Set End Property Property DocumentFile As FileData Get Return _DocumentFile End Get Set(value As FileData) SetPropertyValue("DocumentFile", _DocumentFile, value) End Set End Property '-------ReadONLY------- _ ReadOnly Property IntrastatRows As XPCollection(Of IntrastatRows) Get Return GetCollection(Of IntrastatRows)("IntrastatRows") End Get End Property End Class