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

<DefaultClassOptions()> _
<NavigationItem(False)> _
<CreatableItem(False)> _
<NonPersistent()> _
<Appearance("OfferAskInCreateOfferAskOutFromCustomersPopUp - Disable Operations", AppearanceItemType.ViewItem, "1=1", TargetItems:="Operations", visibility:=Editors.ViewItemVisibility.Hide)> _
Public Class OfferAskInCreateOfferAskOutFromCustomersPopUp
    Inherits BaseObject

    Private _DateValid As Date
    Private _Operations As Operations

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

    Property DateValid As Date
        Get
            Return _DateValid
        End Get
        Set(value As Date)
            SetPropertyValue("DateValid", _DateValid, value)
        End Set
    End Property
    Property Operations As Operations
        Get
            Return _Operations
        End Get
        Set(value As Operations)
            SetPropertyValue("Operations", _Operations, value)
        End Set
    End Property

    '------------ReadOnly------------
    ReadOnly Property CustomersQualification As XPCollection(Of CustomersQualification)
        Get
            Return New XPCollection(Of CustomersQualification)(Session, CriteriaOperator.Parse("Operations=?", Me.Operations))
        End Get
    End Property
End Class
