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 StoragePDACollectionHeader Inherits BaseObject Private _CustomersFrom As CustomersFrom Private _DocumentNumber As String Private _StoragePDACollectionHeaderStatus As eStoragePDACollectionHeaderStatus Private _StoragePDACollectionType As eStoragePDACollectionType Private _StoragePDAParameters As StoragePDAParameters Private _ObjectCreated As Date Private _UserCreated As User Private _StorageInHeader As StorageInHeader Private _StorageOutHeader As StorageOutHeader Private _row_Products As Products Private _row_QTT As Double Public Sub New(ByVal session As Session) MyBase.New(session) End Sub Public Overrides Sub AfterConstruction() MyBase.AfterConstruction() Me.ObjectCreated = GetSQLTime(Session) Me.UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser)) Me.StoragePDACollectionHeaderStatus = eStoragePDACollectionHeaderStatus.eOpen End Sub Protected Overrides Sub OnSaving() MyBase.OnSaving() If Session.IsNewObject(Me) Then Me.DocumentNumber = Me.StoragePDAParameters.NumberGenerator.GetNewNumber(Me.StoragePDAParameters.NumberGenerator) 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 DocumentNumber As String Get Return _DocumentNumber End Get Set(value As String) SetPropertyValue("DocumentNumber", _DocumentNumber, value) End Set End Property Property StoragePDACollectionHeaderStatus As eStoragePDACollectionHeaderStatus Get Return _StoragePDACollectionHeaderStatus End Get Set(value As eStoragePDACollectionHeaderStatus) SetPropertyValue("StoragePDACollectionHeaderStatus", _StoragePDACollectionHeaderStatus, value) End Set End Property Property StorageCollectionType As eStoragePDACollectionType Get Return _StoragePDACollectionType End Get Set(value As eStoragePDACollectionType) SetPropertyValue("StoragePDACollectionType", _StoragePDACollectionType, value) End Set End Property Property StoragePDAParameters As StoragePDAParameters Get Return _StoragePDAParameters End Get Set(value As StoragePDAParameters) SetPropertyValue("StoragePDAParameters", _StoragePDAParameters, 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 StorageInHeader As StorageInHeader Get Return _StorageInHeader End Get Set(value As StorageInHeader) SetPropertyValue("StorageInHeader", _StorageInHeader, value) End Set End Property Property StorageOutHeader As StorageOutHeader Get Return _StorageOutHeader End Get Set(value As StorageOutHeader) SetPropertyValue("StorageOutHeader", _StorageOutHeader, value) End Set End Property 'Nonpersistent _ Property row_Products As Products Get Return _row_Products End Get Set(value As Products) SetPropertyValue("row_Products", _row_Products, value) End Set End Property _ Property row_QTT As Double Get Return _row_QTT End Get Set(value As Double) SetPropertyValue("row_QTT", _row_QTT, value) End Set End Property '--------------------ReadOnly-------------------------- _ _ Public ReadOnly Property StoragePDACollectionRows() As XPCollection(Of StoragePDACollectionRows) Get Return GetCollection(Of StoragePDACollectionRows)("StoragePDACollectionRows") End Get End Property End Class