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()> _
<CreatableItem(False)> _
<NavigationItem(False)> _
Public Class SubcontractorCustomers
    Inherits BaseObject
    Private _Subcontractor As Subcontractor
    Private _Customers As Customers
    Private _Workplace As WorkPlace

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

    <Association("Subcontractor-SubcontractorCustomers", GetType(Subcontractor))> _
    Property Subcontractor As Subcontractor
        Get
            Return _Subcontractor
        End Get
        Set(value As Subcontractor)
            SetPropertyValue("Subcontractor", _Subcontractor, 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
    <NonCloneable()> _
    <DataSourceCriteria("Customers='@This.Customers'")> _
    Property Workplace As WorkPlace
        Get
            Return _Workplace
        End Get
        Set(value As WorkPlace)
            SetPropertyValue("Workplace", _Workplace, value)
        End Set
    End Property
End Class
