1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
| Public Class PromoDetail
Implements DtoBase
Public Property Isnew As Boolean Implements DtoBase.Isnew
Public Property Id As Integer 'PED_ID pour demo et PEO_ID pour ferme
Public Property BuyingDepartment As BuyingDept
Public Property Comment As String
Public Property Note As String
Public Property PriceReduction As Boolean
Public Property Percentage As Decimal
Private _listType As String
Public ReadOnly Property ListType As String
Get
Return _listType
End Get
End Property
Private _products As List(Of Product)
Public Property Products As List(Of Product)
Get
Return _products
End Get
Set(value As List(Of Product))
_products = value
If value.Count > 0 Then
_listType = "INC"
End If
End Set
End Property
Private _productsOut As List(Of Product)
Public Property ProductsOut As List(Of Product)
Get
Return _productsOut
End Get
Set(value As List(Of Product))
_productsOut = value
If value.Count > 0 Then
_listType = "EXC"
End If
End Set
End Property
Public Sub New(id As Integer, buyingDept As BuyingDept, comment As String, note As String, priceReduction As Boolean, percentage As Decimal)
Me.Id = id
Me.BuyingDepartment = buyingDept
Me.Comment = comment
Me.Note = note
Me.PriceReduction = priceReduction
Me.Percentage = percentage
Me._listType = Nothing
Me.Isnew = False
End Sub
End Class
Public Class PromoDetailDemo
Inherits PromoDetail
Public Property CodeDemo As CodeDemo
Public Property Vbn As String
Public Sub New(id As Integer, buyingDept As BuyingDept, comment As String, note As String, priceReduction As Boolean, percentage As Decimal, codeDemo As CodeDemo, vbn As String)
MyBase.New(id, buyingDept, comment, note, priceReduction, percentage)
Me.CodeDemo = codeDemo
Me.Vbn = vbn
End Sub
End Class
Public Class PromoDetailOwn
Inherits PromoDetail
Public Property Department As Department
Public Property Brand As Brand
Public Property Seasons As List(Of Season)
Public Property SeasonsRange As String
Public Sub New(id As Integer, buyingDept As BuyingDept, comment As String, note As String, priceReduction As Boolean, percentage As Decimal, dept As Department, brand As Brand)
MyBase.New(id, buyingDept, comment, note, priceReduction, percentage)
Me.Department = dept
Me.Brand = brand
Me.SeasonsRange = ""
End Sub
End Class |