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 PricingFixStaged ' -- Lépcsős fix árképzés
    Inherits BaseObject
    Private _Pricing As Pricing 'Árképzés fejléc
    Private _VolumeFrom As Double 'Mennyiségtõl
    Private _VolumeTo As Double ' Mennyiségig
    Private _Products As Products 'Termék (amire az ár vonatkozik)
    Private _CurrencyName As CurrencyName ' Deviza 
    Private _PriceNetto As Double 'Nettó ár (devizának megfelelõen)
    Public Sub New(ByVal session As Session)
        MyBase.New(session)

    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()

    End Sub
    <Association("Pricing-PricingFixStaged", GetType(Pricing))> _
    Property Pricing As Pricing
        Get
            Return _Pricing
        End Get
        Set(ByVal value As Pricing)
            SetPropertyValue("Pricing", _Pricing, value)
        End Set
    End Property
    <RuleRequiredField("PricingFixStaged-VolumeFrom", DefaultContexts.Save)> _
    Property VolumeFrom As Double
        Get
            Return _VolumeFrom
        End Get
        Set(ByVal value As Double)
            SetPropertyValue("VolumeFrom", _VolumeFrom, value)
        End Set
    End Property
    <RuleRequiredField("PricingFixStaged-VolumeTo", DefaultContexts.Save)> _
    Property VolumeTo As Double
        Get
            Return _VolumeTo
        End Get
        Set(ByVal value As Double)
            SetPropertyValue("VolumeTo", _VolumeTo, value)
        End Set
    End Property
    <RuleRequiredField("PricingFixStaged-Products", DefaultContexts.Save)> _
    Property Products As Products
        Get
            Return _Products
        End Get
        Set(ByVal value As Products)
            SetPropertyValue("Products", _Products, value)
        End Set
    End Property
    <RuleRequiredField("PricingFixStaged-CurrencyName", DefaultContexts.Save)> _
    Property CurrencyName As CurrencyName
        Get
            Return _CurrencyName
        End Get
        Set(ByVal value As CurrencyName)
            SetPropertyValue("CurrencyName", _CurrencyName, value)
        End Set
    End Property
    <RuleRange("PricingFixStaged-PriceNetto", DefaultContexts.Save, 0.00000001, Double.MaxValue)> _
    Property PriceNetto As Double
        Get
            Return _PriceNetto
        End Get
        Set(ByVal value As Double)
            SetPropertyValue("PriceNetto", _PriceNetto, value)
        End Set
    End Property
End Class
