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 PricingActionRows
    Inherits BaseObject

    Private _PricingActionHeader As PricingActionHeader
    Private _Products As Products
    Private _ListPriceHUF As Double
    Private _ListPriceDEV As Double
    Private _QTT_From As Double 'Mennyiségtől
    Private _QTT_To As Double 'Mennyiségig
    Private _IsAdditionalDiscount As Boolean = False 'Van-e további kedvezmény erre az árra ?

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

    <Association("PricingActionHeader-PricingActionRows", GetType(PricingActionHeader))> _
    Property PricingActionHeader As PricingActionHeader
        Get
            Return _PricingActionHeader
        End Get
        Set(value As PricingActionHeader)
            SetPropertyValue("PricingActionHeader", _PricingActionHeader, value)
        End Set
    End Property
    Property Products As Products
        Get
            Return _Products
        End Get
        Set(value As Products)
            SetPropertyValue("Products", _Products, value)
        End Set
    End Property
    Property ListPriceHUF As Double
        Get
            Return _ListPriceHUF
        End Get
        Set(value As Double)
            SetPropertyValue("ListPriceHUF", _ListPriceHUF, value)
        End Set
    End Property
    Property ListPriceDEV As Double
        Get
            Return _ListPriceDEV
        End Get
        Set(value As Double)
            SetPropertyValue("ListPriceDEV", _ListPriceDEV, value)
        End Set
    End Property
    Property QTT_From As Double
        Get
            Return _QTT_From
        End Get
        Set(value As Double)
            SetPropertyValue("QTT_From", -QTT_From, value)
        End Set
    End Property
    Property QTT_To As Double
        Get
            Return _QTT_To
        End Get
        Set(value As Double)
            SetPropertyValue("QTT_To", _QTT_To, value)
        End Set
    End Property
    Property IsAdditionalDiscount As Boolean
        Get
            Return _IsAdditionalDiscount
        End Get
        Set(value As Boolean)
            SetPropertyValue("IsAdditionalDiscount", _IsAdditionalDiscount, value)
        End Set
    End Property
End Class
