Imports Microsoft.VisualBasic
Imports System
Imports System.Linq
Imports System.Text
Imports DevExpress.Xpo
Imports DevExpress.ExpressApp
Imports System.ComponentModel
Imports DevExpress.ExpressApp.DC
Imports DevExpress.Data.Filtering
Imports DevExpress.Persistent.Base
Imports System.Collections.Generic
Imports DevExpress.ExpressApp.Model
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation

'<ImageName("BO_Contact")> _
'
'<DefaultListViewOptions(MasterDetailMode.ListViewOnly, False, NewItemRowPosition.None)> _
'<Persistent("DatabaseTableName")> _
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False), DeferredDeletion(False)>
<DefaultProperty("Products.ShortName")>
<Indices("Barcode;Products;BarcodeType")>
Public Class ProductsBarcodes ' Specify more UI options using a declarative approach (http://documentation.devexpress.com/#Xaf/CustomDocument2701).
    Inherits BaseObject ' Inherit from a different class to provide a custom primary key, concurrency and deletion behavior, etc. (http://documentation.devexpress.com/#Xaf/CustomDocument3146).

    Private _Products As Products 'Termék
    Private _Barcode As String 'Vonalkód 
    Private _BarcodeType As String 'Vonalkód tipusa ('PLU','AIR','Private')
    Private _Units As Units 'Vonalkódhoz tartozó mennyiségi egység
    Private _Multiplier As Long '? DB van 1 vonalkódhoz rendelve
    Public Sub New(ByVal session As Session)
        MyBase.New(session)
    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()
        ' Place your initialization code here (http://documentation.devexpress.com/#Xaf/CustomDocument2834).
        Multiplier = 1
    End Sub
    <Association("Products-ProductsBarcodes", GetType(Products)), NoForeignKey()>
    Property Products As Products
        Get
            Return _Products
        End Get
        Set(value As Products)
            SetPropertyValue("Products", _Products, value)
        End Set
    End Property
    Property Barcode As String
        Get
            Return _Barcode
        End Get
        Set(value As String)
            SetPropertyValue("Barcode", _Barcode, value)
        End Set
    End Property
    Property BarcodeType As String
        Get
            Return _BarcodeType
        End Get
        Set(value As String)
            SetPropertyValue("BarcodeType", _BarcodeType, value)
        End Set
    End Property
    Property Units As Units
        Get
            Return _Units
        End Get
        Set(value As Units)
            SetPropertyValue("Units", _Units, value)
        End Set
    End Property
    Property Multiplier As Long
        Get
            Return _Multiplier
        End Get
        Set(value As Long)
            SetPropertyValue("Multiplier", _Multiplier, value)
        End Set
    End Property
End Class
