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 HRPersonCostHolder
    Inherits BaseObject
    Private _HRPerson As HRPerson
    Private _CostHolder As CostHolder
    Private _DateFrom As Date
    Private _DateTo As Date
    Private _WorkPercent As Double
    Public Sub New(ByVal session As Session)
        MyBase.New(session)
    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()
    End Sub

    <Association("HRPerson-HRPersonCostHolder", GetType(HRPerson))> _
    Property HRPerson As HRPerson
        Get
            Return _HRPerson
        End Get
        Set(value As HRPerson)
            SetPropertyValue("HRPerson", _HRPerson, value)
        End Set
    End Property
    Property CostHolder As CostHolder
        Get
            Return _CostHolder
        End Get
        Set(value As CostHolder)
            SetPropertyValue("CostHolder", _CostHolder, value)
        End Set
    End Property
    Property DateFrom As Date
        Get
            Return _DateFrom
        End Get
        Set(value As Date)
            SetPropertyValue("DateFrom", _DateFrom, value.Date)
        End Set
    End Property
    Property DateTo As Date
        Get
            Return _DateTo
        End Get
        Set(value As Date)
            SetPropertyValue("DateTo", _DateTo, value.Date)
        End Set
    End Property
    Property WorkPercent As Double
        Get
            Return _WorkPercent
        End Get
        Set(value As Double)
            SetPropertyValue("WorkPercent", _WorkPercent, value)
        End Set
    End Property
End Class
