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

<DefaultClassOptions()> _
<NavigationItem(False), CreatableItem(False)> _
Public Class InventoryPDA
    Inherits BaseObject
    Private _InventoryHeader As InventoryHeader
    Private _StoragePDACollectionHeader As StoragePDACollectionHeader

    Public Sub New(ByVal session As Session)
        MyBase.New(session)
    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()
    End Sub

    <Association("InventoryHeader-InventoryPDA", GetType(InventoryHeader))> _
    Property InventoryHeader As InventoryHeader
        Get
            Return _InventoryHeader
        End Get
        Set(value As InventoryHeader)
            SetPropertyValue("InventoryHeader", _InventoryHeader, value)
        End Set
    End Property
    Property StoragePDACollectionHeader As StoragePDACollectionHeader
        Get
            Return _StoragePDACollectionHeader
        End Get
        Set(value As StoragePDACollectionHeader)
            SetPropertyValue("StoragePDACollectionHeader", _StoragePDACollectionHeader, value)
        End Set
    End Property

    <VisibleInListView(False), VisibleInDetailView(False)> _
    ReadOnly Property StoragePDACollectionRows As XPCollection(Of StoragePDACollectionRows)
        Get
            Return New XPCollection(Of StoragePDACollectionRows)(Session, Session.ParseCriteria("StoragePDACollectionHeader=?", Me.StoragePDACollectionHeader))
        End Get
    End Property
End Class
