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 APCSheetReviewRows 'Betakarítás előtti jegyzőkönyv sorok
    Inherits BaseObject
    Private _APCSheetReviewHeader As APCSheetReviewHeader
    Private _APCSheetByTerritorial As APCSheetByTerritorial
    Private _EstimatedHato As Double 'Becsült termés ha /to
    Private _Estimatedto As Double 'Becsült termés to
    Private _EstimatedDateExecution As Date 'Várható betakarítás dátuma

    Public Sub New(ByVal session As Session)
        MyBase.New(session)
        ' This constructor is used when an object is loaded from a persistent storage.
        ' Do not place any code here or place it only when the IsLoading property is false:
        ' if (!IsLoading){
        '   It is now OK to place your initialization code here.
        ' }
        ' or as an alternative, move your initialization code into the AfterConstruction method.
    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()
        ' Place here your initialization code.
    End Sub

    Property APCSheetReviewHeader As APCSheetReviewHeader
        Get
            Return _APCSheetReviewHeader
        End Get
        Set(value As APCSheetReviewHeader)
            SetPropertyValue("APCSheetReviewHeader", _APCSheetReviewHeader, value)
        End Set
    End Property
    Property APCSheetByTerritorial As APCSheetByTerritorial
        Get
            Return _APCSheetByTerritorial
        End Get
        Set(value As APCSheetByTerritorial)
            SetPropertyValue("APCSheetByTerritorial", _APCSheetByTerritorial, value)
        End Set
    End Property
    Property EstimatedHato As Double
        Get
            Return _EstimatedHato
        End Get
        Set(value As Double)
            SetPropertyValue("EstimatedHato", _EstimatedHato, value)
            If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving Then
                Estimatedto = value * APCSheetByTerritorial.Area
            End If
        End Set
    End Property
    Property Estimatedto As Double
        Get
            Return _Estimatedto
        End Get
        Set(value As Double)
            SetPropertyValue("Estimatedto", _Estimatedto, value)
        End Set
    End Property
    Property EstimatedDateExecution As Date
        Get
            Return _EstimatedDateExecution
        End Get
        Set(value As Date)
            SetPropertyValue("EstimatedDateExecution", _EstimatedDateExecution, value)
        End Set
    End Property
End Class
