Reconfigure for GIT
This commit is contained in:
+65
@@ -0,0 +1,65 @@
|
||||
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()> _
|
||||
<NonPersistent()> _
|
||||
<NavigationItem(False)> _
|
||||
<CreatableItem(False)> _
|
||||
Public Class PricingActionRowsSet_PopUp
|
||||
Inherits BaseObject
|
||||
|
||||
Private _ListPriceHUFPercent As Double 'Ár %-os módosítása, itt az a % os érték kell, ami majd levonódik a termék árából!!
|
||||
Private _ListPriceHUFPercent_Change As Boolean
|
||||
Private _IsAdditionalDiscount As Boolean
|
||||
Private _IsAdditionalDiscount_Change As Boolean
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
ListPriceHUFPercent_Change = False
|
||||
IsAdditionalDiscount_Change = False
|
||||
End Sub
|
||||
|
||||
Property ListPriceHUFPercent As Double
|
||||
Get
|
||||
Return _ListPriceHUFPercent
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("ListPriceHUFPercent", _ListPriceHUFPercent, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ListPriceHUFPercent_Change As Boolean
|
||||
Get
|
||||
Return _ListPriceHUFPercent_Change
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("ListPriceHUFPercent_Change", _ListPriceHUFPercent_Change, 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
|
||||
Property IsAdditionalDiscount_Change As Boolean
|
||||
Get
|
||||
Return _IsAdditionalDiscount_Change
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("IsAdditionalDiscount_Change", _IsAdditionalDiscount_Change, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
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")> _
|
||||
'<DefaultProperty("DisplayMemberNameForLookupEditorsOfThisType")> _
|
||||
'<DefaultListViewOptions(MasterDetailMode.ListViewOnly, False, NewItemRowPosition.None)> _
|
||||
'<Persistent("DatabaseTableName")> _
|
||||
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False), NonPersistent> _
|
||||
Public Class PricingProductsBarcodeCustomersPopup ' 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).
|
||||
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).
|
||||
End Sub
|
||||
|
||||
ReadOnly Property Customers As XPCollection(Of Customers)
|
||||
Get
|
||||
Return New XPCollection(Of Customers)(Session)
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property Products As XPCollection(Of Products)
|
||||
Get
|
||||
Return New XPCollection(Of Products)(Session)
|
||||
End Get
|
||||
End Property
|
||||
Property ExpirationDate As Date
|
||||
Property ActualDate As Date
|
||||
'Private _PersistentProperty As String
|
||||
'<XafDisplayName("My display name"), ToolTip("My hint message")> _
|
||||
'<ModelDefault("EditMask", "(000)-00"), Index(0), VisibleInListView(False)> _
|
||||
'<Persistent("DatabaseColumnName"), RuleRequiredField(DefaultContexts.Save)> _
|
||||
'Public Property PersistentProperty() As String
|
||||
' Get
|
||||
' Return _PersistentProperty
|
||||
' End Get
|
||||
' Set(ByVal value As String)
|
||||
' SetPropertyValue("PersistentProperty", _PersistentProperty, value)
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'<Action(Caption:="My UI Action", ConfirmationMessage:="Are you sure?", ImageName:="Attention", AutoCommit:=True)> _
|
||||
'Public Sub ActionMethod()
|
||||
' ' Trigger a custom business logic for the current record in the UI (http://documentation.devexpress.com/#Xaf/CustomDocument2619).
|
||||
' Me.PersistentProperty = "Paid"
|
||||
'End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,237 @@
|
||||
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("BusinessStocks")> _
|
||||
<DefaultProperty("ShortName")> _
|
||||
Public Class Pricing ' -- Árképzés
|
||||
Inherits BaseObject
|
||||
Private _ShortName As String 'Árképzés megnevezése
|
||||
Private _PartnerType As ePartnerType 'Vevő vagy szállító
|
||||
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
|
||||
<RuleRequiredField("Pricing-ShortName", DefaultContexts.Save)> _
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("Pricing-PartnerType", DefaultContexts.Save)> _
|
||||
Property PartnerType As ePartnerType
|
||||
Get
|
||||
Return _PartnerType
|
||||
End Get
|
||||
Set(value As ePartnerType)
|
||||
SetPropertyValue("PartnerType", _PartnerType, value)
|
||||
End Set
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
<Association("Pricing-PricingFix", GetType(PricingFix))> _
|
||||
ReadOnly Property PricingFix As XPCollection(Of PricingFix)
|
||||
Get
|
||||
Return GetCollection(Of PricingFix)("PricingFix")
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
<Association("Pricing-PricingFixStaged", GetType(PricingFixStaged))> _
|
||||
ReadOnly Property PricingFixStaged As XPCollection(Of PricingFixStaged)
|
||||
Get
|
||||
Return GetCollection(Of PricingFixStaged)("PricingFixStaged")
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
<Association("Pricing-PricingProductsGroups", GetType(PricingProductsGroups))> _
|
||||
ReadOnly Property PricingProductsGroups As XPCollection(Of PricingProductsGroups)
|
||||
Get
|
||||
Return GetCollection(Of PricingProductsGroups)("PricingProductsGroups")
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
<Association("Pricing-PricingCRM", GetType(PricingCRM))> _
|
||||
ReadOnly Property PricingCRM As XPCollection(Of PricingCRM)
|
||||
Get
|
||||
Return GetCollection(Of PricingCRM)("PricingCRM")
|
||||
End Get
|
||||
End Property
|
||||
Function GetCurrentPriceNettoHUF(ByVal _p_Products As Products, ByVal _p_QTT As Double, Optional _p_CRM_Opportunities As CRM_Opportunities = Nothing) As Double
|
||||
'A függvény visszatér erre az árképzésre vonatkozólag, hogy a paraméterben megadott terméknek mennyi az ára HUF-ban
|
||||
Dim _i As Integer = 0 ' segédváltozó, hogy ha nincs a megadott intervallumokban a mennyiség akkor a normál listaárral térünk vissza
|
||||
Dim _PricingCRM As PricingCRM
|
||||
|
||||
If _p_CRM_Opportunities IsNot Nothing Then
|
||||
For Each _PricingCRM In Me.PricingCRM
|
||||
If _p_CRM_Opportunities Is _PricingCRM.CRM_Opportunities And _PricingCRM.ProductsGroups Is Nothing Then
|
||||
If PartnerType = ePartnerType.ePayabels Then
|
||||
Return _p_Products.ListPriceInHUF - ((_PricingCRM.DiscountPercent / 100) * _p_Products.ListPriceInHUF)
|
||||
Else
|
||||
Return _p_Products.ListPriceOutHUF - ((_PricingCRM.DiscountPercent / 100) * _p_Products.ListPriceOutHUF)
|
||||
End If
|
||||
Exit For
|
||||
ElseIf _p_CRM_Opportunities Is _PricingCRM.CRM_Opportunities And _p_Products.ProductGroups Is _PricingCRM.ProductsGroups Then
|
||||
If PartnerType = ePartnerType.ePayabels Then
|
||||
Return _p_Products.ListPriceInHUF - ((_PricingCRM.DiscountPercent / 100) * _p_Products.ListPriceInHUF)
|
||||
Else
|
||||
Return _p_Products.ListPriceOutHUF - ((_PricingCRM.DiscountPercent / 100) * _p_Products.ListPriceOutHUF)
|
||||
End If
|
||||
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
'// Akciós ÁR alapján !
|
||||
|
||||
For Each _PricingFix As PricingFix In PricingFix '1. Fix árat megnézni
|
||||
If _PricingFix.Products Is _p_Products Then
|
||||
If _PricingFix.CurrencyName.ShortName = "HUF" Then
|
||||
Return _PricingFix.PriceNetto
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
For Each _PricingFixStaged As PricingFixStaged In PricingFixStaged '2. Fix lépcsõs árat megnézni
|
||||
If _PricingFixStaged.Products Is _p_Products Then
|
||||
If _p_QTT >= _PricingFixStaged.VolumeFrom And _p_QTT <= _PricingFixStaged.VolumeTo Then
|
||||
If _PricingFixStaged.CurrencyName.ShortName = "HUF" Then
|
||||
Return _PricingFixStaged.PriceNetto
|
||||
End If
|
||||
Else
|
||||
_i = _i + 1
|
||||
End If
|
||||
If _i >= PricingFixStaged.Count Then ' Amennyiben a megadott intervallumokon kívül van a megadott mennyiség, akkor normál listaár
|
||||
Return _p_Products.ListPriceOutHUF
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
For Each _PricingProductsGroups As PricingProductsGroups In PricingProductsGroups '3. Termékcsoport árat megnézni
|
||||
|
||||
If _PricingProductsGroups.ProductsGroups Is Nothing Then
|
||||
If PartnerType = ePartnerType.ePayabels Then
|
||||
Return _p_Products.ListPriceInHUF - ((_PricingProductsGroups.DiscountPercent / 100) * _p_Products.ListPriceInHUF)
|
||||
Else
|
||||
Return _p_Products.ListPriceOutHUF - ((_PricingProductsGroups.DiscountPercent / 100) * _p_Products.ListPriceOutHUF)
|
||||
End If
|
||||
Exit For
|
||||
Else
|
||||
If _PricingProductsGroups.ProductsGroups Is _p_Products.ProductGroups Then ' Ha a levélelemnek meg van adva a kedvezmény
|
||||
If PartnerType = ePartnerType.ePayabels Then
|
||||
Return _p_Products.ListPriceInHUF - ((_PricingProductsGroups.DiscountPercent / 100) * _p_Products.ListPriceInHUF)
|
||||
Else
|
||||
Return _p_Products.ListPriceOutHUF - ((_PricingProductsGroups.DiscountPercent / 100) * _p_Products.ListPriceOutHUF)
|
||||
End If
|
||||
Else
|
||||
Return RecurziveProductsGroupsHUF(_p_Products, _PricingProductsGroups, _p_Products.ProductGroups) ' A levélelemnek nincs megadva a kedvezmény akkor rekurzív bejárás
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Function
|
||||
Function RecurziveProductsGroupsHUF(ByVal _p_Products As Products, ByVal _p_PricingProductsGroups As PricingProductsGroups, ByVal _p_ProductsGroups As ProductsGroups)
|
||||
'A treelist bejárása rekurzívan, mindaddig amíg van szülő, és keressük van e termékcsoport kedvezmény, ha van visszatérünk vele, ha nincs akkor az eredeti listaárral térünk vissza
|
||||
If _p_ProductsGroups.Parent IsNot Nothing Then
|
||||
If _p_ProductsGroups.Parent Is _p_PricingProductsGroups.ProductsGroups Then
|
||||
Return _p_Products.ListPriceOutHUF - ((_p_PricingProductsGroups.DiscountPercent / 100) * _p_Products.ListPriceOutHUF) ' Visszatérés a levélelemhez legközelebbi termékcsoport kedvezményes árral.
|
||||
End If
|
||||
RecurziveProductsGroupsHUF(_p_Products, _p_PricingProductsGroups, _p_ProductsGroups.Parent) ' Rekurzív hívás, hogy minden elemen keressen
|
||||
End If
|
||||
Return _p_Products.ListPriceOutHUF ' Visszatérés az eredeti listaárral
|
||||
End Function
|
||||
Function GetCurrentPriceNettoDEV(ByVal _p_Products As Products, ByVal _p_QTT As Double, Optional _p_CRM_Opportunities As CRM_Opportunities = Nothing) As Double
|
||||
'A függvény visszatér erre az árképzésre vonatkozólag, hogy a paraméterben megadott terméknek mennyi az ára adott DEV-ben
|
||||
Dim _i As Integer = 0 ' segédváltozó, hogy ha nincs a megadott intervallumokban a mennyiség akkor a normál listaárral térünk vissza
|
||||
Dim _PricingCRM As PricingCRM
|
||||
|
||||
If _p_CRM_Opportunities IsNot Nothing Then
|
||||
For Each _PricingCRM In Me.PricingCRM
|
||||
If _p_CRM_Opportunities Is _PricingCRM.CRM_Opportunities And _PricingCRM.ProductsGroups Is Nothing Then
|
||||
If PartnerType = ePartnerType.ePayabels Then
|
||||
Return _p_Products.ListPriceInDEV - ((_PricingCRM.DiscountPercent / 100) * _p_Products.ListPriceInDEV)
|
||||
Else
|
||||
Return _p_Products.ListPriceOutDEV - ((_PricingCRM.DiscountPercent / 100) * _p_Products.ListPriceOutDEV)
|
||||
End If
|
||||
Exit For
|
||||
ElseIf _p_CRM_Opportunities Is _PricingCRM.CRM_Opportunities And _p_Products.ProductGroups Is _PricingCRM.ProductsGroups Then
|
||||
If PartnerType = ePartnerType.ePayabels Then
|
||||
Return _p_Products.ListPriceInDEV - ((_PricingCRM.DiscountPercent / 100) * _p_Products.ListPriceInDEV)
|
||||
Else
|
||||
Return _p_Products.ListPriceOutDEV - ((_PricingCRM.DiscountPercent / 100) * _p_Products.ListPriceOutDEV)
|
||||
End If
|
||||
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
For Each _PricingFix As PricingFix In PricingFix '1. Fix árat megnézni
|
||||
If _PricingFix.Products Is _p_Products Then
|
||||
If _PricingFix.CurrencyName.ShortName <> "HUF" Then
|
||||
Return _PricingFix.PriceNetto
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
For Each _PricingFixStaged As PricingFixStaged In PricingFixStaged '2. Fix lépcsõs árat megnézni
|
||||
If _PricingFixStaged.Products Is _p_Products Then
|
||||
If _p_QTT >= _PricingFixStaged.VolumeFrom And _p_QTT <= _PricingFixStaged.VolumeTo Then
|
||||
If _PricingFixStaged.CurrencyName.ShortName <> "HUF" Then
|
||||
Return _PricingFixStaged.PriceNetto
|
||||
End If
|
||||
Else
|
||||
_i = _i + 1
|
||||
End If
|
||||
If _i >= PricingFixStaged.Count Then ' Amennyiben a megadott intervallumokon kívül van a megadott mennyiség, akkor normál listaár
|
||||
Return _p_Products.ListPriceOutDEV
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
For Each _PricingProductsGroups As PricingProductsGroups In PricingProductsGroups '3. Termékcsoport árat megnézni
|
||||
|
||||
If _PricingProductsGroups.ProductsGroups Is Nothing Then
|
||||
If PartnerType = ePartnerType.ePayabels Then
|
||||
Return _p_Products.ListPriceInDEV - ((_PricingProductsGroups.DiscountPercent / 100) * _p_Products.ListPriceInDEV)
|
||||
Else
|
||||
Return _p_Products.ListPriceOutDEV - ((_PricingProductsGroups.DiscountPercent / 100) * _p_Products.ListPriceOutDEV)
|
||||
End If
|
||||
Exit For
|
||||
Else
|
||||
If _PricingProductsGroups.ProductsGroups Is _p_Products.ProductGroups Then ' Ha a levélelemnek meg van adva a kedvezmény
|
||||
If PartnerType = ePartnerType.ePayabels Then
|
||||
Return _p_Products.ListPriceInDEV - ((_PricingProductsGroups.DiscountPercent / 100) * _p_Products.ListPriceInDEV)
|
||||
Else
|
||||
Return _p_Products.ListPriceOutDEV - ((_PricingProductsGroups.DiscountPercent / 100) * _p_Products.ListPriceOutDEV)
|
||||
End If
|
||||
Else
|
||||
Return RecurziveProductsGroupsDEV(_p_Products, _PricingProductsGroups, _p_Products.ProductGroups) ' A levélelemnek nincs megadva a kedvezmény akkor rekurzív bejárás
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Function
|
||||
Function RecurziveProductsGroupsDEV(ByVal _p_Products As Products, ByVal _p_PricingProductsGroups As PricingProductsGroups, ByVal _p_ProductsGroups As ProductsGroups)
|
||||
'A treelist bejárása rekurzívan, mindaddig amíg van szülő, és keressük van e termékcsoport kedvezmény, ha van visszatérünk vele, ha nincs akkor az eredeti listaárral térünk vissza
|
||||
If _p_ProductsGroups.Parent IsNot Nothing Then
|
||||
If _p_ProductsGroups.Parent Is _p_PricingProductsGroups.ProductsGroups Then
|
||||
Return _p_Products.ListPriceOutDEV - ((_p_PricingProductsGroups.DiscountPercent / 100) * _p_Products.ListPriceOutDEV) ' Visszatérés a levélelemhez legközelebbi termékcsoport kedvezményes árral.
|
||||
End If
|
||||
RecurziveProductsGroupsDEV(_p_Products, _p_PricingProductsGroups, _p_ProductsGroups.Parent) ' Rekurzív hívás, hogy minden elemen keressen
|
||||
End If
|
||||
Return _p_Products.ListPriceOutDEV ' Visszatérés az eredeti listaárral
|
||||
End Function
|
||||
End Class
|
||||
@@ -0,0 +1,144 @@
|
||||
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
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
|
||||
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class PricingActionHeader
|
||||
Inherits BaseObject
|
||||
|
||||
Private _CustomersFrom As Customers
|
||||
Private _ShortName As String
|
||||
Private _DateFrom As Date
|
||||
Private _DateTo As Date
|
||||
Private _DocumentNumber As String
|
||||
Private _CurrencyName As CurrencyName
|
||||
Private _Criterion As String
|
||||
Private _UserCreated As User
|
||||
Private _ObjectCreated As Date
|
||||
Private _IsActive As Boolean = False
|
||||
|
||||
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
|
||||
Protected Overrides Sub OnSaving()
|
||||
MyBase.OnSaving()
|
||||
If Session.IsNewObject(Me) Then
|
||||
ObjectCreated = GetSQLTime(Session)
|
||||
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Property CustomersFrom As CustomersFrom
|
||||
Get
|
||||
Return _CustomersFrom
|
||||
End Get
|
||||
Set(value As CustomersFrom)
|
||||
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DateFrom As Date
|
||||
Get
|
||||
Return _DateFrom
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("DateFrom", _DateFrom, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DateTo As Date
|
||||
Get
|
||||
Return _DateTo
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("DateTo", _DateTo, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DocumentNumber As String
|
||||
Get
|
||||
Return _DocumentNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("DocumentNumber", _DocumentNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CurrencyName As CurrencyName
|
||||
Get
|
||||
Return _CurrencyName
|
||||
End Get
|
||||
Set(value As CurrencyName)
|
||||
SetPropertyValue("CurrencyName", _CurrencyName, value)
|
||||
End Set
|
||||
End Property
|
||||
Private ReadOnly Property ObjectType() As Type
|
||||
Get
|
||||
Return GetType(Products)
|
||||
End Get
|
||||
End Property
|
||||
<CriteriaOptions("ObjectType"), Size(-1), ImmediatePostData()> _
|
||||
Public Property Criterion() As String
|
||||
Get
|
||||
Return _Criterion
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("Criterion", _Criterion, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property UserCreated As User
|
||||
Get
|
||||
Return _UserCreated
|
||||
End Get
|
||||
Set(value As User)
|
||||
SetPropertyValue("UserCreated", _UserCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property ObjectCreated As Date
|
||||
Get
|
||||
Return _ObjectCreated
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsActive As Boolean
|
||||
Get
|
||||
Return _IsActive
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("IsActive", _IsActive, value)
|
||||
End Set
|
||||
End Property
|
||||
'//XPCollection
|
||||
<Association("PricingActionHeader-PricingActionRows", GetType(PricingActionRows)), VisibleInListView(False), VisibleInLookupListView(False)> _
|
||||
ReadOnly Property PricingActionRows As XPCollection(Of PricingActionRows)
|
||||
Get
|
||||
Return GetCollection(Of PricingActionRows)("PricingActionRows")
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,88 @@
|
||||
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
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
Partial Class PricingActionVC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aGeneratePricingAction = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aSetPricingActionGroups = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aViewStorageMoveInfo_PricingActionRows = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aGeneratePricingAction
|
||||
'
|
||||
Me.aGeneratePricingAction.Caption = "aGenerate Pricing Action"
|
||||
Me.aGeneratePricingAction.ConfirmationMessage = Nothing
|
||||
Me.aGeneratePricingAction.Id = "aGeneratePricingAction"
|
||||
Me.aGeneratePricingAction.ImageName = Nothing
|
||||
Me.aGeneratePricingAction.Shortcut = Nothing
|
||||
Me.aGeneratePricingAction.Tag = Nothing
|
||||
Me.aGeneratePricingAction.TargetObjectsCriteria = Nothing
|
||||
Me.aGeneratePricingAction.TargetObjectType = GetType(SISBusiness.[Module].PricingActionHeader)
|
||||
Me.aGeneratePricingAction.TargetViewId = Nothing
|
||||
Me.aGeneratePricingAction.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aGeneratePricingAction.ToolTip = Nothing
|
||||
Me.aGeneratePricingAction.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aSetPricingActionGroups
|
||||
'
|
||||
Me.aSetPricingActionGroups.AcceptButtonCaption = Nothing
|
||||
Me.aSetPricingActionGroups.CancelButtonCaption = Nothing
|
||||
Me.aSetPricingActionGroups.Caption = "aSetPricingActionGroups"
|
||||
Me.aSetPricingActionGroups.Category = "Edit"
|
||||
Me.aSetPricingActionGroups.ConfirmationMessage = Nothing
|
||||
Me.aSetPricingActionGroups.Id = "aSetPricingActionGroups"
|
||||
Me.aSetPricingActionGroups.ImageName = Nothing
|
||||
Me.aSetPricingActionGroups.Shortcut = Nothing
|
||||
Me.aSetPricingActionGroups.Tag = Nothing
|
||||
Me.aSetPricingActionGroups.TargetObjectsCriteria = Nothing
|
||||
Me.aSetPricingActionGroups.TargetObjectType = GetType(SISBusiness.[Module].PricingActionRows)
|
||||
Me.aSetPricingActionGroups.TargetViewId = Nothing
|
||||
Me.aSetPricingActionGroups.ToolTip = Nothing
|
||||
Me.aSetPricingActionGroups.TypeOfView = Nothing
|
||||
'
|
||||
'aViewStorageMoveInfo_PricingActionRows
|
||||
'
|
||||
Me.aViewStorageMoveInfo_PricingActionRows.Caption = "aViewStorageMoveInfo_PricingActionRows"
|
||||
Me.aViewStorageMoveInfo_PricingActionRows.ConfirmationMessage = Nothing
|
||||
Me.aViewStorageMoveInfo_PricingActionRows.Id = "aViewStorageMoveInfo_PricingActionRows"
|
||||
Me.aViewStorageMoveInfo_PricingActionRows.ImageName = Nothing
|
||||
Me.aViewStorageMoveInfo_PricingActionRows.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aViewStorageMoveInfo_PricingActionRows.Shortcut = Nothing
|
||||
Me.aViewStorageMoveInfo_PricingActionRows.Tag = Nothing
|
||||
Me.aViewStorageMoveInfo_PricingActionRows.TargetObjectsCriteria = Nothing
|
||||
Me.aViewStorageMoveInfo_PricingActionRows.TargetObjectType = GetType(SISBusiness.[Module].PricingActionRows)
|
||||
Me.aViewStorageMoveInfo_PricingActionRows.TargetViewId = Nothing
|
||||
Me.aViewStorageMoveInfo_PricingActionRows.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aViewStorageMoveInfo_PricingActionRows.ToolTip = Nothing
|
||||
Me.aViewStorageMoveInfo_PricingActionRows.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aGeneratePricingAction As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aSetPricingActionGroups As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aViewStorageMoveInfo_PricingActionRows As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aGeneratePricingAction.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aSetPricingActionGroups.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>197, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aViewStorageMoveInfo_PricingActionRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>384, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,117 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
|
||||
Public Class PricingActionVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Public Event InitWork(ByVal _Minimum As Long, ByVal _Step As Long, ByVal _Maximum As Long)
|
||||
Public Event DoWork()
|
||||
Public Event FinalWork
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
|
||||
End Sub
|
||||
Private Sub aGeneratePricingAction_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aGeneratePricingAction.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
Dim _PricingActionHeader As PricingActionHeader = _uow.GetObjectByKey(Of PricingActionHeader)(TryCast(View.SelectedObjects(0), PricingActionHeader).Oid)
|
||||
Dim _PricingActionRows As PricingActionRows
|
||||
Dim I As Long = 0
|
||||
_uow.Delete(_PricingActionHeader.PricingActionRows)
|
||||
|
||||
Dim _Products_Collection As New XPCollection(Of Products)(_uow)
|
||||
|
||||
_Products_Collection.Criteria = _uow.ParseCriteria(_PricingActionHeader.Criterion)
|
||||
|
||||
RaiseEvent InitWork(1, 1, _Products_Collection.Count)
|
||||
For Each _Products In _Products_Collection
|
||||
RaiseEvent DoWork()
|
||||
_PricingActionRows = New PricingActionRows(_uow)
|
||||
_PricingActionRows.PricingActionHeader = _PricingActionHeader
|
||||
_PricingActionRows.Products = _Products
|
||||
_PricingActionRows.QTT_From = 1
|
||||
_PricingActionRows.QTT_To = 999999
|
||||
_PricingActionRows.IsAdditionalDiscount = False
|
||||
_PricingActionRows.ListPriceHUF = _Products.ListPriceOutHUF
|
||||
_PricingActionRows.ListPriceDEV = _Products.ListPriceOutDEV
|
||||
I += 1
|
||||
If I Mod 1000 = 0 Then _uow.CommitChanges()
|
||||
Next
|
||||
_uow.CommitChanges()
|
||||
RaiseEvent FinalWork
|
||||
|
||||
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
|
||||
End Sub
|
||||
|
||||
Private Sub aSetPricingActionGroups_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aSetPricingActionGroups.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _PricingActionRowsSet_PopUp As PricingActionRowsSet_PopUp = _onew.CreateObject(Of PricingActionRowsSet_PopUp)()
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "PricingActionRowsSet_PopUp_DetailView", False, _PricingActionRowsSet_PopUp)
|
||||
End Sub
|
||||
Private Sub aSetPricingActionGroups_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aSetPricingActionGroups.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _PricingActionRowsSet_PopUp As PricingActionRowsSet_PopUp = TryCast(e.PopupWindow.View.SelectedObjects(0), PricingActionRowsSet_PopUp)
|
||||
|
||||
If _PricingActionRowsSet_PopUp Is Nothing Then Throw New Exception("*Nem várt hiba történt, a folyamat megszakadt!")
|
||||
|
||||
Dim _ListPriceHUFPercent As Double = _PricingActionRowsSet_PopUp.ListPriceHUFPercent
|
||||
Dim _ListPriceHUFPercent_Change As Boolean = _PricingActionRowsSet_PopUp.ListPriceHUFPercent_Change
|
||||
Dim _IsAdditionalDiscount As Boolean = _PricingActionRowsSet_PopUp.IsAdditionalDiscount
|
||||
Dim _IsAdditionalDiscount_Change As Boolean = _PricingActionRowsSet_PopUp.IsAdditionalDiscount_Change
|
||||
|
||||
RaiseEvent InitWork(1, 1, View.SelectedObjects.Count)
|
||||
|
||||
For Each _PricingActionRows As PricingActionRows In View.SelectedObjects
|
||||
If _ListPriceHUFPercent_Change Then
|
||||
If _ListPriceHUFPercent = 0 Then
|
||||
_PricingActionRows.ListPriceHUF = _PricingActionRows.Products.ListPriceOutHUF
|
||||
Else
|
||||
_PricingActionRows.ListPriceHUF = _PricingActionRows.Products.ListPriceOutHUF - (_PricingActionRows.Products.ListPriceOutHUF * (_ListPriceHUFPercent / 100))
|
||||
_PricingActionRows.ListPriceDEV = _PricingActionRows.Products.ListPriceOutDEV - (_PricingActionRows.Products.ListPriceOutDEV * (_ListPriceHUFPercent / 100))
|
||||
End If
|
||||
End If
|
||||
If _IsAdditionalDiscount_Change Then
|
||||
_PricingActionRows.IsAdditionalDiscount = _IsAdditionalDiscount
|
||||
End If
|
||||
RaiseEvent DoWork()
|
||||
Next
|
||||
RaiseEvent FinalWork
|
||||
_ocur.CommitChanges()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub aViewStorageMoveInfo_PricingActionRows_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aViewStorageMoveInfo_PricingActionRows.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _PricingActionRows As PricingActionRows = TryCast(View.SelectedObjects(0), PricingActionRows)
|
||||
Dim _StorageMoveInfo As StorageMoveInfo
|
||||
If _PricingActionRows IsNot Nothing Then
|
||||
_StorageMoveInfo = _onew.CreateObject(Of StorageMoveInfo)()
|
||||
_StorageMoveInfo.Products = _onew.GetObject(_PricingActionRows.Products)
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "StorageMoveInfo_DetailView", False, _StorageMoveInfo)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,69 @@
|
||||
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 PricingCRM
|
||||
Inherits BaseObject
|
||||
Private _Pricing As Pricing
|
||||
Private _CRM_Opportunities As CRM_Opportunities
|
||||
Private _ProductsGroups As ProductsGroups ' -- Termék csoport
|
||||
Private _DiscountPercent As Double ' -- Kedvezmény százalék
|
||||
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
|
||||
<Association("Pricing-PricingCRM", 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("PricingCRM-CRM_Opportunities", DefaultContexts.Save)> _
|
||||
Property CRM_Opportunities As CRM_Opportunities
|
||||
Get
|
||||
Return _CRM_Opportunities
|
||||
End Get
|
||||
Set(value As CRM_Opportunities)
|
||||
SetPropertyValue("CRM_Opportunities", _CRM_Opportunities, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ProductsGroups As ProductsGroups
|
||||
Get
|
||||
Return _ProductsGroups
|
||||
End Get
|
||||
Set(ByVal value As ProductsGroups)
|
||||
SetPropertyValue("ProductsGroups", _ProductsGroups, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRange("PricingCRM-DiscountPercent", DefaultContexts.Save, 0.00000001, 100)> _
|
||||
Property DiscountPercent As Double
|
||||
Get
|
||||
Return _DiscountPercent
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("DiscountPercent", _DiscountPercent, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,60 @@
|
||||
|
||||
Imports DevExpress.Xpo
|
||||
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class PricingFix ' Fix árképzés
|
||||
Inherits BaseObject
|
||||
Private _Pricing As Pricing 'Árképzés fejléc
|
||||
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-PricingFix", 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("PricingFix-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("PricingFix-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("PricingFix-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
|
||||
@@ -0,0 +1,84 @@
|
||||
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
|
||||
@@ -0,0 +1,50 @@
|
||||
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 PricingMinimum 'Átlagárból generálja a minimum eladási árat
|
||||
Inherits BaseObject
|
||||
|
||||
Private _ShortName As String 'Megnevezés
|
||||
Private _Description As String 'Leírás
|
||||
Private _PricePercent As Double ' ? százalákkal növelje az átlagárból a minimum árat ?
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
|
||||
<RuleRequiredField("PricingMinimum-ShortName", DefaultContexts.Save)> _
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property Description As String
|
||||
Get
|
||||
Return _Description
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Description", _Description, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRange("PricingMinimum-PricePercent", DefaultContexts.Save, 0, 99)> _
|
||||
Property PricePercent As Double
|
||||
Get
|
||||
Return _PricePercent
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("PricePercent", _PricePercent, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,53 @@
|
||||
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 PricingProductsGroups ' -- Termékcsoportra vonatkozó árképzés
|
||||
Inherits BaseObject
|
||||
Private _Pricing As Pricing ' -- Árképzés fejléc
|
||||
Private _ProductsGroups As ProductsGroups ' -- Termék csoport
|
||||
Private _DiscountPercent As Double ' -- Kedvezmény százalék
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
|
||||
End Sub
|
||||
<Association("Pricing-PricingProductsGroups", GetType(Pricing))> _
|
||||
Property Pricing As Pricing
|
||||
Get
|
||||
Return _Pricing
|
||||
End Get
|
||||
Set(ByVal value As Pricing)
|
||||
SetPropertyValue("Pricing", _Pricing, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ProductsGroups As ProductsGroups
|
||||
Get
|
||||
Return _ProductsGroups
|
||||
End Get
|
||||
Set(ByVal value As ProductsGroups)
|
||||
SetPropertyValue("ProductsGroups", _ProductsGroups, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRange("PricingProductsGroups-DiscountPercent", DefaultContexts.Save, 0.00000001, 100)> _
|
||||
Property DiscountPercent As Double
|
||||
Get
|
||||
Return _DiscountPercent
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("DiscountPercent", _DiscountPercent, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
Reference in New Issue
Block a user