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 CustomersNGCollection 'Partnerhez tartozó sorszám generálási kollekció
    Inherits BaseObject
    Private _Customers As Customers 'Partner
    Private _ContractTemplate As ContractTemplate
    Private _NumberGenerator As NumberGenerator

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

    <Association("Customers-CustomersNGCollection", GetType(Customers))> _
    Property Customers As Customers
        Get
            Return _Customers
        End Get
        Set(value As Customers)
            SetPropertyValue("Customers", _Customers, value)
        End Set
    End Property
    <RuleRequiredField("CustomersNGCollection-ContractTemplate", DefaultContexts.Save)> _
    Property ContractTemplate As ContractTemplate
        Get
            Return _ContractTemplate
        End Get
        Set(value As ContractTemplate)
            SetPropertyValue("ContractTemplate", _ContractTemplate, value)
        End Set
    End Property
    <RuleRequiredField("CustomersNGCollection-NumberGenerator", DefaultContexts.Save)> _
    Property NumberGenerator As NumberGenerator
        Get
            Return _NumberGenerator
        End Get
        Set(value As NumberGenerator)
            SetPropertyValue("NumberGenerator", _NumberGenerator, value)
        End Set
    End Property

End Class
