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 Enum eImportPHType
    eApartments = 0
    eOffices = 1
    eGarages = 2
    eContainers = 3
    eInvoiceRows = 4
End Enum
<DefaultClassOptions()> _
<NonPersistent()> _
<CreatableItem(False)> _
<NavigationItem(False)> _
<Appearance("Import_PH_Immovables_PopUp - Disable OFileName", AppearanceItemType.ViewItem, "1=1", TargetItems:="FileName", Enabled:=False)> _
<Appearance("Import_PH_Immovables_PopUp - Hide Customers", TargetItems:="Customers", Criteria:="ImportPHType != 4", Visibility:=Editors.ViewItemVisibility.Hide, Context:="DetailView")> _
<Appearance("Import_PH_Immovables_PopUp - Hide CustomersFrom", TargetItems:="CustomersFrom", Criteria:="ImportPHType != 4", Visibility:=Editors.ViewItemVisibility.Hide, Context:="DetailView")> _
Public Class Import_PH_Immovables_PopUp
    Inherits BaseObject

    Private _ImportPHType As eImportPHType
    Private _FileName As String
    Private _Customers As Customers
    Private _CustomersFrom As CustomersFrom

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

    <ImmediatePostData()> _
    Property ImportPHType As eImportPHType
        Get
            Return _ImportPHType
        End Get
        Set(value As eImportPHType)
            SetPropertyValue("ImportPHType", _ImportPHType, value)
        End Set
    End Property
    <ImmediatePostData()> _
    Property FileName As String
        Get
            Return _FileName
        End Get
        Set(value As String)
            SetPropertyValue("FileName", _FileName, 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
    Property CustomersFrom As CustomersFrom
        Get
            Return _CustomersFrom
        End Get
        Set(value As CustomersFrom)
            SetPropertyValue("CustomersFrom", _CustomersFrom, value)
        End Set
    End Property
End Class
