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 CRMEstate_Offer_Template_CustomersFrom
    Inherits BaseObject
    Private _CustomersFrom As CustomersFrom
    Private _ContractTemplate_AdvanceMoney As ContractTemplate 'Szerződési sablon az előszerződéshez
    Private _ContractTemplate_Final As ContractTemplate 'Szerződési sablon az értékesítési végszerződéshez
    Private _ContractTemplate_Rent As ContractTemplate 'Szerződési sablon a bérleti szerződéshez
    Private _CRMEstate_Offer_Template As CRMEstate_Offer_Template 'Általános ajánlati paraméterek
    Public Sub New(ByVal session As Session)
        MyBase.New(session)
    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()
    End Sub
    Public Property CustomersFrom As CustomersFrom
        Get
            Return _CustomersFrom
        End Get
        Set(ByVal value As CustomersFrom)
            SetPropertyValue("CustomersFrom", _CustomersFrom, value)
        End Set
    End Property
    <DataSourceCriteria("CustomersFrom='@This.CustomersFrom' AND PartnerType=0")> _
    Property ContractTemplate_AdvanceMoney As ContractTemplate
        Get
            Return _ContractTemplate_AdvanceMoney
        End Get
        Set(ByVal value As ContractTemplate)
            SetPropertyValue("ContractTemplate_AdvanceMoney", _ContractTemplate_AdvanceMoney, value)
        End Set
    End Property
    <DataSourceCriteria("CustomersFrom='@This.CustomersFrom' AND PartnerType=0")> _
    Property ContractTemplate_Final As ContractTemplate
        Get
            Return _ContractTemplate_Final
        End Get
        Set(ByVal value As ContractTemplate)
            SetPropertyValue("ContractTemplate_Final", _ContractTemplate_Final, value)
        End Set
    End Property
    <DataSourceCriteria("CustomersFrom='@This.CustomersFrom' AND PartnerType=0")> _
    Property ContractTemplate_Rent As ContractTemplate
        Get
            Return _ContractTemplate_Rent
        End Get
        Set(ByVal value As ContractTemplate)
            SetPropertyValue("ContractTemplate_Rent", _ContractTemplate_Rent, value)
        End Set
    End Property
    <Association("CRMEstate_Offer_Template-CRMEstate_Offer_Template_CustomersFrom", GetType(CRMEstate_Offer_Template))> _
    Property CRMEstate_Offer_Template As CRMEstate_Offer_Template
        Get
            Return _CRMEstate_Offer_Template
        End Get
        Set(ByVal value As CRMEstate_Offer_Template)
            SetPropertyValue("CRMEstate_Offer_Template", _CRMEstate_Offer_Template, value)
        End Set
    End Property
End Class
