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()> _
<NonPersistent()> _
<NavigationItem(False)> _
<CreatableItem(False)> _
<Appearance("Disable CreateInventoryHeader_PopUp-Storage", AppearanceItemType.ViewItem, "1=1", TargetItems:="Storage", Enabled:=False)> _
Public Class CreateInventoryHeader_PopUp
    Inherits BaseObject

    Private _InventoryParameters As InventoryParameters
    Private _Storage As Storage
    Private _DateClose As Date
    Private _InventoryInspector As HRPerson 'Ellenőr
    Private _InventoryCreator As HRPerson 'Leltárt készítő/elvégző/végrehejtó

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

    <ImmediatePostData()> _
    Property InventoryParameters As InventoryParameters
        Get
            Return _InventoryParameters
        End Get
        Set(value As InventoryParameters)
            SetPropertyValue("InventoryParameters", _InventoryParameters, value)
            If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving Then
                Storage = value.Storage
            End If
        End Set
    End Property
    <RuleRequiredField("CreateInventoryHeader_PopUp-Storage", DefaultContexts.Save)> _
    Property Storage As Storage
        Get
            Return _Storage
        End Get
        Set(value As Storage)
            SetPropertyValue("Storage", _Storage, value)
        End Set
    End Property
    Property DateClose As Date
        Get
            Return _DateClose
        End Get
        Set(value As Date)
            SetPropertyValue("DateClose", _DateClose, value)
        End Set
    End Property

    Property InventoryInspector As HRPerson
        Get
            Return _InventoryInspector
        End Get
        Set(value As HRPerson)
            SetPropertyValue("InventoryInspector", _InventoryInspector, value)
        End Set
    End Property

    Property InventoryCreator As HRPerson
        Get
            Return _InventoryCreator
        End Get
        Set(value As HRPerson)
            SetPropertyValue("InventoryCreator", _InventoryCreator, value)
        End Set
    End Property
End Class
