First create solution

This commit is contained in:
2017-03-08 11:21:27 +01:00
commit a2fb86bacf
5508 changed files with 1082238 additions and 0 deletions
@@ -0,0 +1,107 @@
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)> _
<DeferredDeletion(False)> _
Public Class InventoryDifferent
Inherits BaseObject
Private _InventoryHeader As InventoryHeader
Private _Products As Products
Private _QTT_SC_Free As Double
Private _QTT_SC_Found As Double
Private _QTT_PDA As Double 'Leltározott mennyiség
Private _SumPriceHUF As Double
Private _SumPriceDEV As Double
Private _QTT_In As Double
Private _QTT_Out As Double
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Association("InventoryHeader-InventoryDifferent", GetType(InventoryHeader))> _
Property InventoryHeader As InventoryHeader
Get
Return _InventoryHeader
End Get
Set(value As InventoryHeader)
SetPropertyValue("InventoryHeader", _InventoryHeader, 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 QTT_SC_Free As Double
Get
Return _QTT_SC_Free
End Get
Set(value As Double)
SetPropertyValue("QTT_SC_Free", _QTT_SC_Free, value)
End Set
End Property
Property QTT_SC_Found As Double
Get
Return _QTT_SC_Found
End Get
Set(value As Double)
SetPropertyValue("QTT_SC_Found", _QTT_SC_Found, value)
End Set
End Property
Property QTT_PDA As Double
Get
Return _QTT_PDA
End Get
Set(value As Double)
SetPropertyValue("QTT_PDA", _QTT_PDA, value)
End Set
End Property
Property SumPriceHUF As Double
Get
Return _SumPriceHUF
End Get
Set(value As Double)
SetPropertyValue("SumPriceHUF", _SumPriceHUF, value)
End Set
End Property
Property SumPriceDEV As Double
Get
Return _SumPriceDEV
End Get
Set(value As Double)
SetPropertyValue("SumPriceDEV", _SumPriceDEV, value)
End Set
End Property
Property QTT_In As Double
Get
Return _QTT_In
End Get
Set(value As Double)
SetPropertyValue("QTT_In", _QTT_In, value)
End Set
End Property
Property QTT_Out As Double
Get
Return _QTT_Out
End Get
Set(value As Double)
SetPropertyValue("QTT_Out", _QTT_Out, value)
End Set
End Property
End Class
@@ -0,0 +1,207 @@
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.ConditionalAppearance
Public Enum eInventoryStatus
eOpen = 0
eClosed = 1
End Enum
<DefaultClassOptions()> _
<NavigationItem("StorageTransactions"), CreatableItem(False)> _
<Appearance("Disable InventoryHeader-ObjectCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
<Appearance("Disable InventoryHeader-UserCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
<Appearance("Disable InventoryHeader-InventoryStatus", AppearanceItemType.ViewItem, "1=1", TargetItems:="InventoryStatus", Enabled:=False)> _
<Appearance("Disable InventoryHeader-InventoryHeaderDateClose", AppearanceItemType.ViewItem, "1=1", TargetItems:="InventoryHeaderDateClose", Enabled:=False)> _
<Appearance("Disable InventoryHeader-Storage", AppearanceItemType.ViewItem, "1=1", TargetItems:="Storage", Enabled:=False)> _
<Appearance("Disable InventoryHeader-DocumentNumber", AppearanceItemType.ViewItem, "1=1", TargetItems:="DocumentNumber", Enabled:=False)> _
Public Class InventoryHeader
Inherits BaseObject
Private _DocumentNumber As String
Private _Storage As Storage
Private _InventoryStatus As eInventoryStatus
Private _InventoryParameters As InventoryParameters
Private _DateClose As Date
Private _InventoryHeaderDateClose As Date
Private _ObjectCreated As Date
Private _UserCreated As User
Private _ExcelProperty As String
Private _ExcelFile As FileData
Private _InventoryInspector As HRPerson 'Ellenõr
Private _InventoryCreator As HRPerson 'Leltárt készítõ/elvégzõ/végrehejtó
Private _InventorySignedDocument As FileData
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
Me.InventoryStatus = eInventoryStatus.eOpen
End Sub
Protected Overrides Sub OnSaving()
MyBase.OnSaving()
If String.IsNullOrEmpty(DocumentNumber) Then
DocumentNumber = InventoryParameters.NumberGenerator.GetNewNumber(InventoryParameters.NumberGenerator)
End If
If Session.IsNewObject(Me) Then
ObjectCreated = GetSQLTime(Session)
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
End If
End Sub
Property DocumentNumber As String
Get
Return _DocumentNumber
End Get
Set(value As String)
SetPropertyValue("DocumentNumber", _DocumentNumber, value)
End Set
End Property
Property Storage As Storage
Get
Return _Storage
End Get
Set(value As Storage)
SetPropertyValue("Storage", _Storage, value)
End Set
End Property
Property InventoryStatus As eInventoryStatus
Get
Return _InventoryStatus
End Get
Set(value As eInventoryStatus)
SetPropertyValue("InventoryStatus", _InventoryStatus, value)
End Set
End Property
<RuleRequiredField("InventoryHeader -InventoryParameters ", DefaultContexts.Save)> _
Property InventoryParameters As InventoryParameters
Get
Return _InventoryParameters
End Get
Set(value As InventoryParameters)
SetPropertyValue("InventoryParameters", _InventoryParameters, value)
End Set
End Property
Property DateClose As Date
Get
Return _DateClose
End Get
Set(value As Date)
SetPropertyValue("DateClose", _DateClose, value)
End Set
End Property
Property InventoryHeaderDateClose As Date
Get
Return _InventoryHeaderDateClose
End Get
Set(value As Date)
SetPropertyValue("InventoryHeaderDateClose", _InventoryHeaderDateClose, 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
<NonCloneable> _
Property UserCreated As User
Get
Return _UserCreated
End Get
Set(value As User)
SetPropertyValue("UserCreated", _UserCreated, value)
End Set
End Property
<Size(-1)> _
<ImmediatePostData(True)> _
Property ExcelProperty As String
Get
Return _ExcelProperty
End Get
Set(value As String)
SetPropertyValue("ExcelProperty", _ExcelProperty, value)
End Set
End Property
<VisibleInListView(False)> _
<VisibleInDetailView(False)> _
Property ExcelFile As FileData
Get
Return _ExcelFile
End Get
Set(value As FileData)
SetPropertyValue("ExcelFile", _ExcelFile, value)
End Set
End Property
<RuleRequiredField("InventoryHeader - InventoryInspector ", DefaultContexts.Save)> _
Property InventoryInspector As HRPerson
Get
Return _InventoryInspector
End Get
Set(value As HRPerson)
SetPropertyValue("InventoryInspector", _InventoryInspector, value)
End Set
End Property
<RuleRequiredField("InventoryHeader - InventoryCreator ", DefaultContexts.Save)> _
Property InventoryCreator As HRPerson
Get
Return _InventoryCreator
End Get
Set(value As HRPerson)
SetPropertyValue("InventoryCreator", _InventoryCreator, value)
End Set
End Property
Property InventorySignedDocument As FileData
Get
Return _InventorySignedDocument
End Get
Set(value As FileData)
SetPropertyValue("InventorySignedDocument", _InventorySignedDocument, value)
End Set
End Property
'-------------------------ReadOnly-----------------------
<VisibleInListView(False)> _
<Aggregated()> _
<Association("InventoryHeader-InventorySC", GetType(InventorySC))> _
Public ReadOnly Property InventorySC() As XPCollection(Of InventorySC)
Get
Return GetCollection(Of InventorySC)("InventorySC")
End Get
End Property
<VisibleInListView(False)> _
<Aggregated()> _
<Association("InventoryHeader-InventorySIR", GetType(InventorySIR))> _
Public ReadOnly Property InventorySIR() As XPCollection(Of InventorySIR)
Get
Return GetCollection(Of InventorySIR)("InventorySIR")
End Get
End Property
<VisibleInListView(False)> _
<Aggregated()> _
<Association("InventoryHeader-InventoryPDA", GetType(InventoryPDA))> _
Public ReadOnly Property InventoryPDA() As XPCollection(Of InventoryPDA)
Get
Return GetCollection(Of InventoryPDA)("InventoryPDA")
End Get
End Property
<VisibleInListView(False)> _
<Aggregated()> _
<Association("InventoryHeader-InventoryDifferent", GetType(InventoryDifferent))> _
Public ReadOnly Property InventoryDifferent() As XPCollection(Of InventoryDifferent)
Get
Return GetCollection(Of InventoryDifferent)("InventoryDifferent")
End Get
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 InventoryPDA
Inherits BaseObject
Private _InventoryHeader As InventoryHeader
Private _StoragePDACollectionHeader As StoragePDACollectionHeader
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Association("InventoryHeader-InventoryPDA", GetType(InventoryHeader))> _
Property InventoryHeader As InventoryHeader
Get
Return _InventoryHeader
End Get
Set(value As InventoryHeader)
SetPropertyValue("InventoryHeader", _InventoryHeader, value)
End Set
End Property
Property StoragePDACollectionHeader As StoragePDACollectionHeader
Get
Return _StoragePDACollectionHeader
End Get
Set(value As StoragePDACollectionHeader)
SetPropertyValue("StoragePDACollectionHeader", _StoragePDACollectionHeader, value)
End Set
End Property
<VisibleInListView(False), VisibleInDetailView(False)> _
ReadOnly Property StoragePDACollectionRows As XPCollection(Of StoragePDACollectionRows)
Get
Return New XPCollection(Of StoragePDACollectionRows)(Session, Session.ParseCriteria("StoragePDACollectionHeader=?", Me.StoragePDACollectionHeader))
End Get
End Property
End Class
@@ -0,0 +1,78 @@
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()> _
<CreatableItem(False)> _
<NavigationItem(False)> _
<DefaultProperty("NumberGenerator")> _
Public Class InventoryParameters
Inherits BaseObject
Private _CustomersFrom As CustomersFrom
Private _Storage As Storage
Private _NumberGenerator As NumberGenerator
Private _ExcelProperty As String
Private _ExcelFile As FileData
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<RuleRequiredField("InventoryParameters - CustomersFrom", DefaultContexts.Save)> _
Property CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
End Set
End Property
<RuleRequiredField("InventoryParameters - Storage", DefaultContexts.Save)> _
Property Storage As Storage
Get
Return _Storage
End Get
Set(value As Storage)
SetPropertyValue("Storage", _Storage, value)
End Set
End Property
<RuleRequiredField("InventoryParameters - NumberGenerator", DefaultContexts.Save)> _
Property NumberGenerator As NumberGenerator
Get
Return _NumberGenerator
End Get
Set(value As NumberGenerator)
SetPropertyValue("NumberGenerator", _NumberGenerator, value)
End Set
End Property
<Size(-1)> _
Property ExcelProperty As String
Get
Return _ExcelProperty
End Get
Set(value As String)
SetPropertyValue("ExcelProperty", _ExcelProperty, value)
End Set
End Property
<VisibleInListView(False)> _
<VisibleInDetailView(False)> _
Property ExcelFile As FileData
Get
Return _ExcelFile
End Get
Set(value As FileData)
SetPropertyValue("ExcelFile", _ExcelFile, value)
End Set
End Property
End Class
@@ -0,0 +1,141 @@
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 InventorySC
Inherits BaseObject
Private _InventoryHeader As InventoryHeader
Private _Products As Products
Private _QTT As Double 'Raktáron lévõ mennyiség GÉPI készlet
Private _QTT_Found As Double 'Raktáron lévõ TALÁLT mennyiség
Private _QTT_Different As Double 'Különbség GÉPI-TALÁLT
Private _AveragePriceHUF As Double 'Mérlegelt átlagár adott záró dátumra vonatkozólag
Private _SumAveragePriceHUF_Found As Double 'Talált átlagár
Private _SumAveragePriceHUF As Double 'Gépi érték
Private _SumAveragePriceHUF_Different As Double 'különbség érték
Private _SumAveragePriceHUF_Surplus As Double 'Összes Többlet
Private _SumAveragePriceHUF_Want As Double 'Összes Hiány
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Association("InventoryHeader-InventorySC", GetType(InventoryHeader))> _
Property InventoryHeader As InventoryHeader
Get
Return _InventoryHeader
End Get
Set(value As InventoryHeader)
SetPropertyValue("InventoryHeader", _InventoryHeader, 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 QTT As Double
Get
Return Math.Round(_QTT, 4, MidpointRounding.AwayFromZero)
End Get
Set(value As Double)
SetPropertyValue("QTT", _QTT, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
Property QTT_Found As Double
Get
Return Math.Round(_QTT_Found, 4, MidpointRounding.AwayFromZero)
End Get
Set(value As Double)
SetPropertyValue("QTT_Found", _QTT_Found, Math.Round(value, 4, MidpointRounding.AwayFromZero))
If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving Then
QTT_Different = Math.Round(value - QTT, 4, MidpointRounding.AwayFromZero)
SumAveragePriceHUF_Found = AveragePriceHUF * value
SumAveragePriceHUF_Different = SumAveragePriceHUF_Found - SumAveragePriceHUF
If SumAveragePriceHUF_Different > 0 Then
SumAveragePriceHUF_Surplus = SumAveragePriceHUF_Different
Else
SumAveragePriceHUF_Want = Math.Abs(SumAveragePriceHUF_Different)
End If
End If
End Set
End Property
Property QTT_Different As Double
Get
Return Math.Round(_QTT_Different, 4, MidpointRounding.AwayFromZero)
End Get
Set(value As Double)
SetPropertyValue("QTT_Different", _QTT_Different, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
Property AveragePriceHUF As Double
Get
Return _AveragePriceHUF
End Get
Set(value As Double)
SetPropertyValue("AveragePriceHUF", _AveragePriceHUF, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
SumAveragePriceHUF_Found = Math.Round(AveragePriceHUF * QTT_Found, 0, MidpointRounding.AwayFromZero)
SumAveragePriceHUF = Math.Round(AveragePriceHUF * QTT, 0, MidpointRounding.AwayFromZero)
SumAveragePriceHUF_Different = Math.Round(AveragePriceHUF * QTT_Different, 0, MidpointRounding.AwayFromZero)
End If
End Set
End Property
Property SumAveragePriceHUF_Found As Double
Get
Return _SumAveragePriceHUF_Found
End Get
Set(value As Double)
SetPropertyValue("SumAveragePriceHUF_Found", _SumAveragePriceHUF_Found, value)
End Set
End Property
Property SumAveragePriceHUF As Double
Get
Return Math.Round(_SumAveragePriceHUF, 4, MidpointRounding.AwayFromZero)
End Get
Set(value As Double)
SetPropertyValue("SumAveragePriceHUF", _SumAveragePriceHUF, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
Property SumAveragePriceHUF_Different As Double
Get
Return Math.Round(_SumAveragePriceHUF_Different, 4, MidpointRounding.AwayFromZero)
End Get
Set(value As Double)
SetPropertyValue("SumAveragePriceHUF_Different", _SumAveragePriceHUF_Different, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
Property SumAveragePriceHUF_Surplus As Double
Get
Return _SumAveragePriceHUF_Surplus
End Get
Set(value As Double)
SetPropertyValue("SumAveragePriceHUF_Surplus", _SumAveragePriceHUF_Surplus, value)
End Set
End Property
Property SumAveragePriceHUF_Want As Double
Get
Return _SumAveragePriceHUF_Want
End Get
Set(value As Double)
SetPropertyValue("SumAveragePriceHUF_Want", _SumAveragePriceHUF_Want, value)
End Set
End Property
End Class
@@ -0,0 +1,141 @@
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 InventorySIR
Inherits BaseObject
Private _InventoryHeader As InventoryHeader
Private _StorageInRows As StorageInRows
Private _QTT As Double
Private _QTT_Found As Double
Private _QTT_Different As Double
Private _AveragePriceHUF As Double 'Mérlegelt átlagár adott záró dátumra vonatkozólag
Private _SumAveragePriceHUF_Found As Double 'Talált átlagár
Private _SumAveragePriceHUF As Double
Private _SumAveragePriceHUF_Different As Double
Private _SumAveragePriceHUF_Surplus As Double 'Többlet
Private _SumAveragePriceHUF_Want As Double 'Hiány
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Association("InventoryHeader-InventorySIR", GetType(InventoryHeader))> _
Property InventoryHeader As InventoryHeader
Get
Return _InventoryHeader
End Get
Set(value As InventoryHeader)
SetPropertyValue("InventoryHeader", _InventoryHeader, value)
End Set
End Property
Property StorageInRows As StorageInRows
Get
Return _StorageInRows
End Get
Set(value As StorageInRows)
SetPropertyValue("StorageInRows", _StorageInRows, value)
End Set
End Property
Property QTT As Double
Get
Return _QTT
End Get
Set(value As Double)
SetPropertyValue("QTT", _QTT, value)
End Set
End Property
Property QTT_Found As Double
Get
Return Math.Round(_QTT_Found, 4, MidpointRounding.AwayFromZero)
End Get
Set(value As Double)
SetPropertyValue("QTT_Found", _QTT_Found, Math.Round(value, 4, MidpointRounding.AwayFromZero))
If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving Then
QTT_Different = Math.Round(value - QTT, 4, MidpointRounding.AwayFromZero)
SumAveragePriceHUF_Found = AveragePriceHUF * value
SumAveragePriceHUF_Different = SumAveragePriceHUF_Found - SumAveragePriceHUF
If SumAveragePriceHUF_Different > 0 Then
SumAveragePriceHUF_Surplus = SumAveragePriceHUF_Different
Else
SumAveragePriceHUF_Want = Math.Abs(SumAveragePriceHUF_Different)
End If
End If
End Set
End Property
Property QTT_Different As Double
Get
Return Math.Round(_QTT_Different, 4, MidpointRounding.AwayFromZero)
End Get
Set(value As Double)
SetPropertyValue("QTT_Different", _QTT_Different, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
Property AveragePriceHUF As Double
Get
Return _AveragePriceHUF
End Get
Set(value As Double)
SetPropertyValue("AveragePriceHUF", _AveragePriceHUF, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
SumAveragePriceHUF_Found = Math.Round(AveragePriceHUF * QTT_Found, 0, MidpointRounding.AwayFromZero)
SumAveragePriceHUF = Math.Round(AveragePriceHUF * QTT, 0, MidpointRounding.AwayFromZero)
SumAveragePriceHUF_Different = Math.Round(AveragePriceHUF * QTT_Different, 0, MidpointRounding.AwayFromZero)
End If
End Set
End Property
Property SumAveragePriceHUF_Found As Double
Get
Return _SumAveragePriceHUF_Found
End Get
Set(value As Double)
SetPropertyValue("SumAveragePriceHUF_Found", _SumAveragePriceHUF_Found, value)
End Set
End Property
Property SumAveragePriceHUF As Double
Get
Return Math.Round(_SumAveragePriceHUF, 4, MidpointRounding.AwayFromZero)
End Get
Set(value As Double)
SetPropertyValue("SumAveragePriceHUF", _SumAveragePriceHUF, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
Property SumAveragePriceHUF_Different As Double
Get
Return Math.Round(_SumAveragePriceHUF_Different, 4, MidpointRounding.AwayFromZero)
End Get
Set(value As Double)
SetPropertyValue("SumAveragePriceHUF_Different", _SumAveragePriceHUF_Different, Math.Round(value, 4, MidpointRounding.AwayFromZero))
End Set
End Property
Property SumAveragePriceHUF_Surplus As Double
Get
Return _SumAveragePriceHUF_Surplus
End Get
Set(value As Double)
SetPropertyValue("SumAveragePriceHUF_Surplus", _SumAveragePriceHUF_Surplus, value)
End Set
End Property
Property SumAveragePriceHUF_Want As Double
Get
Return _SumAveragePriceHUF_Want
End Get
Set(value As Double)
SetPropertyValue("SumAveragePriceHUF_Want", _SumAveragePriceHUF_Want, value)
End Set
End Property
End Class
@@ -0,0 +1,167 @@
Partial Class InventoryVC
<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.aCloseInventoryHeader = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aCreateInventoryHeader = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aCreatePDACollection = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aCreateDifferent = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aInventory_Print = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aInventoryHeader_RecreateInventory = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aInventoryHeader_LoadSpreadFromParameters = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aInventoryRecalculatePrice = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
'
'aCloseInventoryHeader
'
Me.aCloseInventoryHeader.Caption = "aCloseInventoryHeader"
Me.aCloseInventoryHeader.Category = "RecordEdit"
Me.aCloseInventoryHeader.ConfirmationMessage = Nothing
Me.aCloseInventoryHeader.Id = "aCloseInventoryHeader"
Me.aCloseInventoryHeader.ImageName = Nothing
Me.aCloseInventoryHeader.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aCloseInventoryHeader.Shortcut = Nothing
Me.aCloseInventoryHeader.Tag = Nothing
Me.aCloseInventoryHeader.TargetObjectsCriteria = Nothing
Me.aCloseInventoryHeader.TargetViewId = Nothing
Me.aCloseInventoryHeader.ToolTip = Nothing
Me.aCloseInventoryHeader.TypeOfView = Nothing
'
'aCreateInventoryHeader
'
Me.aCreateInventoryHeader.AcceptButtonCaption = Nothing
Me.aCreateInventoryHeader.CancelButtonCaption = Nothing
Me.aCreateInventoryHeader.Caption = "aCreateInventoryHeader"
Me.aCreateInventoryHeader.Category = "ObjectsCreation"
Me.aCreateInventoryHeader.ConfirmationMessage = Nothing
Me.aCreateInventoryHeader.Id = "aCreateInventoryHeader"
Me.aCreateInventoryHeader.ImageName = Nothing
Me.aCreateInventoryHeader.Shortcut = Nothing
Me.aCreateInventoryHeader.Tag = Nothing
Me.aCreateInventoryHeader.TargetObjectsCriteria = Nothing
Me.aCreateInventoryHeader.TargetViewId = Nothing
Me.aCreateInventoryHeader.ToolTip = Nothing
Me.aCreateInventoryHeader.TypeOfView = Nothing
'
'aCreatePDACollection
'
Me.aCreatePDACollection.Caption = "aCreatePDACollection"
Me.aCreatePDACollection.ConfirmationMessage = Nothing
Me.aCreatePDACollection.Id = "aCreatePDACollection"
Me.aCreatePDACollection.ImageName = Nothing
Me.aCreatePDACollection.Shortcut = Nothing
Me.aCreatePDACollection.Tag = Nothing
Me.aCreatePDACollection.TargetObjectsCriteria = Nothing
Me.aCreatePDACollection.TargetViewId = Nothing
Me.aCreatePDACollection.ToolTip = Nothing
Me.aCreatePDACollection.TypeOfView = Nothing
'
'aCreateDifferent
'
Me.aCreateDifferent.Caption = "aCreateDifferent"
Me.aCreateDifferent.ConfirmationMessage = Nothing
Me.aCreateDifferent.Id = "aCreateDifferent"
Me.aCreateDifferent.ImageName = Nothing
Me.aCreateDifferent.Shortcut = Nothing
Me.aCreateDifferent.Tag = Nothing
Me.aCreateDifferent.TargetObjectsCriteria = Nothing
Me.aCreateDifferent.TargetViewId = Nothing
Me.aCreateDifferent.ToolTip = Nothing
Me.aCreateDifferent.TypeOfView = Nothing
'
'aInventory_Print
'
Me.aInventory_Print.Caption = "aInventory_Print"
Me.aInventory_Print.ConfirmationMessage = Nothing
Me.aInventory_Print.Id = "aInventory_Print"
Me.aInventory_Print.ImageName = Nothing
Me.aInventory_Print.Shortcut = Nothing
Me.aInventory_Print.Tag = Nothing
Me.aInventory_Print.TargetObjectsCriteria = Nothing
Me.aInventory_Print.TargetObjectType = GetType(Nuvolar.[Module].InventoryHeader)
Me.aInventory_Print.TargetViewId = Nothing
Me.aInventory_Print.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aInventory_Print.ToolTip = Nothing
Me.aInventory_Print.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aInventoryHeader_RecreateInventory
'
Me.aInventoryHeader_RecreateInventory.Caption = "aInventoryHeader_RecreateInventory"
Me.aInventoryHeader_RecreateInventory.Category = "ObjectsCreation"
Me.aInventoryHeader_RecreateInventory.ConfirmationMessage = "Are you sure ?"
Me.aInventoryHeader_RecreateInventory.Id = "aInventoryHeader_RecreateInventory"
Me.aInventoryHeader_RecreateInventory.ImageName = Nothing
Me.aInventoryHeader_RecreateInventory.Shortcut = Nothing
Me.aInventoryHeader_RecreateInventory.Tag = Nothing
Me.aInventoryHeader_RecreateInventory.TargetObjectsCriteria = Nothing
Me.aInventoryHeader_RecreateInventory.TargetObjectType = GetType(Nuvolar.[Module].InventoryHeader)
Me.aInventoryHeader_RecreateInventory.TargetViewId = Nothing
Me.aInventoryHeader_RecreateInventory.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aInventoryHeader_RecreateInventory.ToolTip = Nothing
Me.aInventoryHeader_RecreateInventory.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aInventoryHeader_LoadSpreadFromParameters
'
Me.aInventoryHeader_LoadSpreadFromParameters.Caption = "aInventoryHeader_LoadSpreadFromParameters"
Me.aInventoryHeader_LoadSpreadFromParameters.Category = "aInventoryHeader_LoadSpreadFromParameters"
Me.aInventoryHeader_LoadSpreadFromParameters.ConfirmationMessage = Nothing
Me.aInventoryHeader_LoadSpreadFromParameters.Id = "aInventoryHeader_LoadSpreadFromParameters"
Me.aInventoryHeader_LoadSpreadFromParameters.ImageName = Nothing
Me.aInventoryHeader_LoadSpreadFromParameters.Shortcut = Nothing
Me.aInventoryHeader_LoadSpreadFromParameters.Tag = Nothing
Me.aInventoryHeader_LoadSpreadFromParameters.TargetObjectsCriteria = Nothing
Me.aInventoryHeader_LoadSpreadFromParameters.TargetObjectType = GetType(Nuvolar.[Module].InventoryHeader)
Me.aInventoryHeader_LoadSpreadFromParameters.TargetViewId = Nothing
Me.aInventoryHeader_LoadSpreadFromParameters.ToolTip = Nothing
Me.aInventoryHeader_LoadSpreadFromParameters.TypeOfView = Nothing
'
'aInventoryRecalculatePrice
'
Me.aInventoryRecalculatePrice.Caption = "aInventory Recalculate Price"
Me.aInventoryRecalculatePrice.ConfirmationMessage = "Are you sure ?"
Me.aInventoryRecalculatePrice.Id = "aInventoryRecalculatePrice"
Me.aInventoryRecalculatePrice.ImageName = Nothing
Me.aInventoryRecalculatePrice.Shortcut = Nothing
Me.aInventoryRecalculatePrice.Tag = Nothing
Me.aInventoryRecalculatePrice.TargetObjectsCriteria = Nothing
Me.aInventoryRecalculatePrice.TargetObjectType = GetType(Nuvolar.[Module].InventoryHeader)
Me.aInventoryRecalculatePrice.TargetViewId = Nothing
Me.aInventoryRecalculatePrice.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aInventoryRecalculatePrice.ToolTip = Nothing
Me.aInventoryRecalculatePrice.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
End Sub
Friend WithEvents aCloseInventoryHeader As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aCreateInventoryHeader As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aCreatePDACollection As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aCreateDifferent As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aInventory_Print As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aInventoryHeader_RecreateInventory As DevExpress.ExpressApp.Actions.SimpleAction
Protected WithEvents aInventoryHeader_LoadSpreadFromParameters As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aInventoryRecalculatePrice As DevExpress.ExpressApp.Actions.SimpleAction
End Class
@@ -0,0 +1,147 @@
<?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="aCloseInventoryHeader.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 173</value>
</metadata>
<metadata name="aCreateInventoryHeader.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 290</value>
</metadata>
<metadata name="aCreatePDACollection.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 251</value>
</metadata>
<metadata name="aCreateDifferent.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 212</value>
</metadata>
<metadata name="aInventory_Print.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 134</value>
</metadata>
<metadata name="aInventoryHeader_RecreateInventory.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="aInventoryHeader_LoadSpreadFromParameters.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aInventoryRecalculatePrice.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>577, 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,463 @@
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.ExpressApp.SystemModule
Imports DevExpress.ExpressApp.CloneObject
Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering
Imports DevExpress.ExpressApp.Utils
Imports System.IO
Imports DevExpress.Persistent.BaseImpl
Public Class InventoryVC
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()
Frame.GetController(Of InventoryVC).aCreateInventoryHeader.Active.SetItemValue("", False)
Frame.GetController(Of InventoryVC).aCloseInventoryHeader.Active.SetItemValue("", False)
Frame.GetController(Of InventoryVC).aCreatePDACollection.Active.SetItemValue("", False)
Frame.GetController(Of InventoryVC).aCreateDifferent.Active.SetItemValue("", False)
If View.Id = "InventoryHeader_ListView" Then
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
' Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False) Teszt miatt ideiglenesen enedélyezett
Frame.GetController(Of InventoryVC).aCreateInventoryHeader.Active.SetItemValue("", True)
Frame.GetController(Of InventoryVC).aCloseInventoryHeader.Active.SetItemValue("", True)
End If
If View.Id = "InventoryHeader_InventorySC_ListView" Then
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", False)
Frame.GetController(Of AuditTrailVC).aGetAuditTrail.Active.SetItemValue("", False)
Frame.GetController(Of InventoryVC).aCreatePDACollection.Active.SetItemValue("", True)
End If
If View.Id = "InventoryHeader_InventorySIR_ListView" Then
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", False)
Frame.GetController(Of AuditTrailVC).aGetAuditTrail.Active.SetItemValue("", False)
End If
If View.Id = "InventoryHeader_InventoryPDA_ListView" Then
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", False)
Frame.GetController(Of AuditTrailVC).aGetAuditTrail.Active.SetItemValue("", False)
End If
If View.Id = "InventoryHeader_InventoryDifferent_ListView" Then
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", False)
Frame.GetController(Of AuditTrailVC).aGetAuditTrail.Active.SetItemValue("", False)
Frame.GetController(Of InventoryVC).aCreateDifferent.Active.SetItemValue("", True)
End If
If View.Id = "Storage_LookupListView" Then
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
End If
If View.Id = "InventoryParameters_ListView" Then
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
End If
'--------------DeatilViewZ-------------
If View.Id = "InventoryParameters_DetailView" Then
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "InventoryHeader_ListView" Then
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
Frame.GetController(Of InventoryVC).aCreateInventoryHeader.Active.SetItemValue("", False)
Frame.GetController(Of InventoryVC).aCloseInventoryHeader.Active.SetItemValue("", False)
End If
If View.Id = "Storage_LookupListView" Then
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
End If
If View.Id = "InventoryHeader_InventorySC_ListView" Then
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", True)
Frame.GetController(Of AuditTrailVC).aGetAuditTrail.Active.SetItemValue("", True)
Frame.GetController(Of InventoryVC).aCreatePDACollection.Active.SetItemValue("", False)
End If
If View.Id = "InventoryHeader_InventorySIR_ListView" Then
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", True)
Frame.GetController(Of AuditTrailVC).aGetAuditTrail.Active.SetItemValue("", True)
End If
If View.Id = "InventoryHeader_InventoryPDA_ListView" Then
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", True)
Frame.GetController(Of AuditTrailVC).aGetAuditTrail.Active.SetItemValue("", True)
End If
If View.Id = "InventoryHeader_InventoryDifferent_ListView" Then
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", True)
Frame.GetController(Of AuditTrailVC).aGetAuditTrail.Active.SetItemValue("", True)
Frame.GetController(Of InventoryVC).aCreateDifferent.Active.SetItemValue("", False)
End If
If View.Id = "InventoryParameters_ListView" Then
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
End If
'--------------DeatilViewZ-------------
If View.Id = "InventoryHeader_DetailView" Then
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
End If
If View.Id = "InventoryParameters_DetailView" Then
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
End If
End Sub
Private Sub aCreateInventoryHeader_Cancel(sender As Object, e As System.EventArgs) Handles aCreateInventoryHeader.Cancel
End Sub
Private Sub aCreateInventoryHeader_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aCreateInventoryHeader.CustomizePopupWindowParams
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _CreateInventoryHeader_PopUp As CreateInventoryHeader_PopUp = _onew.CreateObject(Of CreateInventoryHeader_PopUp)()
e.View = Application.CreateDetailView(_onew, "CreateInventoryHeader_PopUp_DetailView", False, _CreateInventoryHeader_PopUp)
End Sub
Private Sub aCreateInventoryHeader_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aCreateInventoryHeader.Execute
Try
GLOBAL_HAS_Audit = False
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _CreateInventoryHeader_PopUp As CreateInventoryHeader_PopUp = TryCast(e.PopupWindow.View.SelectedObjects(0), CreateInventoryHeader_PopUp)
Dim _InventoryHeader As InventoryHeader = _ocur.CreateObject(Of InventoryHeader)()
With _InventoryHeader
.Storage = _ocur.GetObject(_CreateInventoryHeader_PopUp.Storage)
.DateClose = _CreateInventoryHeader_PopUp.DateClose
.InventoryParameters = _ocur.GetObject(_CreateInventoryHeader_PopUp.InventoryParameters)
.InventoryCreator = _ocur.GetObject(_CreateInventoryHeader_PopUp.InventoryCreator)
.InventoryInspector = _ocur.GetObject(_CreateInventoryHeader_PopUp.InventoryInspector)
End With
Dim _StorageInRows_Collection As New XPCollection(Of StorageInRows)(_ocur.Session, _
CriteriaOperator.Parse("StorageInHeader.IsEditable=False AND " +
" StorageInHeader.Active=True AND " +
" StorageInHeader.Storage=? AND " +
" StorageInHeader.ObjectCreated<=?", _ocur.GetObject(_CreateInventoryHeader_PopUp.Storage), _CreateInventoryHeader_PopUp.DateClose))
RaiseEvent InitWork(1, 1, _StorageInRows_Collection.Count)
If _StorageInRows_Collection.Count > 0 Then
For Each _StorageInRows As StorageInRows In _StorageInRows_Collection
Dim _InventorySIR As InventorySIR = _ocur.CreateObject(Of InventorySIR)()
With _InventorySIR
.InventoryHeader = _InventoryHeader
.StorageInRows = _StorageInRows
.QTT = Math.Round(_StorageInRows.QTT, 4, MidpointRounding.AwayFromZero)
Dim _StorageOutRowsInRows_Collection As New XPCollection(Of StorageOutRowsInRows)(_ocur.Session, _
CriteriaOperator.Parse("StorageInRows=? and StorageOutRows.StorageOutHeader.ObjectCreated<=?", _StorageInRows, _CreateInventoryHeader_PopUp.DateClose))
For Each _StorageOutRowsInRows As StorageOutRowsInRows In _StorageOutRowsInRows_Collection
.QTT -= Math.Round(_StorageOutRowsInRows.QTT, 4, MidpointRounding.AwayFromZero)
Next
End With
If _InventorySIR.QTT > 0 Then
Dim _InventorySC As InventorySC = _ocur.FindObject(Of InventorySC)(CriteriaOperator.Parse("InventoryHeader=? AND Products=?", _
_InventoryHeader, _InventorySIR.StorageInRows.Products))
If _InventorySC Is Nothing Then
_InventorySC = New InventorySC(_ocur.Session)
With _InventorySC
.InventoryHeader = _InventoryHeader
.Products = _InventorySIR.StorageInRows.Products
.QTT = Math.Round(_InventorySIR.QTT, 4, MidpointRounding.AwayFromZero)
End With
Else
_InventorySC.QTT += Math.Round(_InventorySIR.QTT, 4, MidpointRounding.AwayFromZero)
End If
End If
RaiseEvent DoWork()
Next
End If
_ocur.CommitChanges()
Dim _InventorySIR_DEL_Collection As New XPCollection(Of InventorySIR)(_ocur.Session, CriteriaOperator.Parse("InventoryHeader=? AND QTT=0", _InventoryHeader))
If _InventorySIR_DEL_Collection.Count > 0 Then _ocur.Delete(_InventorySIR_DEL_Collection)
_ocur.CommitChanges()
Catch ext As Exception
MsgBox(ext.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, "Hiba!")
Finally
GLOBAL_HAS_Audit = True
RaiseEvent FinalWork
End Try
End Sub
Private Sub aCloseInventoryHeader_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCloseInventoryHeader.Execute
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _InventoryHeader As InventoryHeader = TryCast(View.SelectedObjects(0), InventoryHeader)
_InventoryHeader.InventoryStatus = eInventoryStatus.eClosed
_InventoryHeader.InventoryHeaderDateClose = GetSQLTime(_ocur.Session)
_ocur.CommitChanges()
End Sub
Private Sub aCreatePDACollection_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCreatePDACollection.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _InventoryHeader As InventoryHeader = TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject
If _InventoryHeader Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
Dim _StoragePDACollectionHeader As StoragePDACollectionHeader = _ocur.CreateObject(Of StoragePDACollectionHeader)()
_StoragePDACollectionHeader.StoragePDACollectionHeaderStatus = eStoragePDACollectionHeaderStatus.eOpen
_StoragePDACollectionHeader.StoragePDAParameters = _ocur.FindObject(Of StoragePDAParameters)(CriteriaOperator.Parse("CustomersFrom=?", _InventoryHeader.Storage.CustomersFrom))
Dim _InventoryPDA As InventoryPDA = _ocur.CreateObject(Of InventoryPDA)()
_InventoryPDA.InventoryHeader = _InventoryHeader
_InventoryPDA.StoragePDACollectionHeader = _StoragePDACollectionHeader
_ocur.CommitChanges()
Catch ext As Exception
MsgBox(ext.Message)
End Try
End Sub
Private Sub aCreateDifferent_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCreateDifferent.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _InventoryHeader As InventoryHeader = TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject
If _InventoryHeader Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
If _InventoryHeader.InventoryDifferent.Count > 0 Then
Dim _InventoryDifferent_Collection As New XPCollection(Of InventoryDifferent)(_ocur.Session, CriteriaOperator.Parse("InventoryHeader=?", _InventoryHeader))
_ocur.Delete(_InventoryDifferent_Collection)
End If
If _InventoryHeader.InventorySC.Count > 0 Then
For Each _InventorySC As InventorySC In _InventoryHeader.InventorySC
Dim _InventoryDifferent As InventoryDifferent = _ocur.CreateObject(Of InventoryDifferent)()
_InventoryDifferent.InventoryHeader = _InventoryHeader
'_InventoryDifferent.Products = _InventorySC.StorageComputed.Products
'_InventoryDifferent.QTT_SC_Free = _InventorySC.StorageComputed.QTTFree
_InventoryDifferent.QTT_SC_Found = _InventorySC.QTT_Found
Next
End If
If _InventoryHeader.InventoryPDA.Count > 0 Then
For Each _InventoryPDA As InventoryPDA In _InventoryHeader.InventoryPDA
If _InventoryPDA.StoragePDACollectionHeader.StoragePDACollectionRows.Count > 0 Then
For Each _StoragePDACollectionRows As StoragePDACollectionRows In _InventoryPDA.StoragePDACollectionHeader.StoragePDACollectionRows
Dim _InventoryDifferent As InventoryDifferent = _ocur.FindObject(Of InventoryDifferent)(CriteriaOperator.Parse("Products.Oid=? AND InventoryHeader=?", _StoragePDACollectionRows.Products.Oid, _InventoryHeader), True)
If _InventoryDifferent IsNot Nothing Then
_InventoryDifferent.QTT_PDA = _StoragePDACollectionRows.QTT
End If
Next
End If
Next
End If
If _InventoryHeader.InventorySIR.Count > 0 Then
For Each _InventorySIR As InventorySIR In _InventoryHeader.InventorySIR
Dim _InventoryDifferent As InventoryDifferent = _ocur.FindObject(Of InventoryDifferent)(CriteriaOperator.Parse("Products.Oid=? AND InventoryHeader=?", _InventorySIR.StorageInRows.Products.Oid, _InventoryHeader), True)
Dim _StorageMoveEvents_IN_Collection As New XPCollection(Of StorageMoveEvents)(_ocur.Session, CriteriaOperator.Parse("StorageInRows.Oid=? AND StorageOutRows=?", _InventorySIR.StorageInRows.Oid, Nothing))
_StorageMoveEvents_IN_Collection.Sorting.Add(New SortProperty("ExecutionDate", DB.SortingDirection.Ascending))
_StorageMoveEvents_IN_Collection.Filter = CriteriaOperator.Parse("ExecutionDate>?", _InventoryHeader.ObjectCreated)
If _StorageMoveEvents_IN_Collection.Count > 0 Then
Dim _QTT_In As Double = 0
For Each _StorageMoveEvents As StorageMoveEvents In _StorageMoveEvents_IN_Collection
_QTT_In += _StorageMoveEvents.QTT
Next
_InventoryDifferent.QTT_In = _QTT_In
End If
Dim _StorageMoveEvents_OUT_Collection As New XPCollection(Of StorageMoveEvents)(_ocur.Session, CriteriaOperator.Parse("StorageInRows.Oid=? AND StorageOutRows=?", _InventorySIR.StorageInRows.Oid, Not Nothing))
_StorageMoveEvents_OUT_Collection.Sorting.Add(New SortProperty("ExecutionDate", DB.SortingDirection.Ascending))
_StorageMoveEvents_OUT_Collection.Filter = CriteriaOperator.Parse("ExecutionDate>?", _InventoryHeader.ObjectCreated)
If _StorageMoveEvents_OUT_Collection.Count > 0 Then
Dim _QTT_Out As Double = 0
For Each _StorageMoveEvents As StorageMoveEvents In _StorageMoveEvents_OUT_Collection
_QTT_Out += _StorageMoveEvents.QTT
Next
_InventoryDifferent.QTT_Out = _QTT_Out
End If
Next
End If
_ocur.CommitChanges()
Catch ext As Exception
MsgBox(ext.Message)
End Try
End Sub
Private Sub aInventory_Print_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aInventory_Print.Execute
Try
Dim _InventoryHeader As InventoryHeader = TryCast(View.SelectedObjects(0), InventoryHeader)
Dim _ReportData As ReportData = _InventoryHeader.Storage.ReportInventory
If _ReportData Is Nothing Then Throw New Exception(String.Format("""{0}"" raktárhoz nincs beállítva letár nyomtatvány!", _InventoryHeader.Storage.ShortName))
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("InventoryHeader.Oid=?", _InventoryHeader.Oid), True)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
End Try
End Sub
Private Sub aInventoryHeader_RecreateInventory_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aInventoryHeader_RecreateInventory.Execute
Try
GLOBAL_HAS_Audit = False
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _InventoryHeader As InventoryHeader = TryCast(View.SelectedObjects(0), InventoryHeader)
Dim _InventorySC_DELCollection As New XPCollection(Of InventorySC)(_ocur.Session, CriteriaOperator.Parse("InventoryHeader=?", _InventoryHeader))
Dim _InventorySIR_DELCollection As New XPCollection(Of InventorySIR)(_ocur.Session, CriteriaOperator.Parse("InventoryHeader=?", _InventoryHeader))
_ocur.Delete(_InventorySC_DELCollection)
_ocur.Delete(_InventorySIR_DELCollection)
Dim _StorageInRows_Collection As New XPCollection(Of StorageInRows)(_ocur.Session, _
CriteriaOperator.Parse("StorageInHeader.IsEditable=False AND " +
" StorageInHeader.Active=True AND " +
" StorageInHeader.Storage=? AND " +
" StorageInHeader.ObjectCreated<=?", _InventoryHeader.Storage, _InventoryHeader.DateClose))
RaiseEvent InitWork(1, 1, _StorageInRows_Collection.Count)
If _StorageInRows_Collection.Count > 0 Then
For Each _StorageInRows As StorageInRows In _StorageInRows_Collection
Dim _InventorySIR As InventorySIR = _ocur.CreateObject(Of InventorySIR)()
With _InventorySIR
.InventoryHeader = _InventoryHeader
.StorageInRows = _StorageInRows
.QTT = Math.Round(_StorageInRows.QTT, 4, MidpointRounding.AwayFromZero)
Dim _StorageOutRowsInRows_Collection As New XPCollection(Of StorageOutRowsInRows)(_ocur.Session, _
CriteriaOperator.Parse("StorageInRows=? AND StorageOutRows.StorageOutHeader.ObjectCreated<=?", _StorageInRows, _InventoryHeader.DateClose))
For Each _StorageOutRowsInRows As StorageOutRowsInRows In _StorageOutRowsInRows_Collection
.QTT -= Math.Round(_StorageOutRowsInRows.QTT, 4, MidpointRounding.AwayFromZero)
Next
.QTT = Math.Round(.QTT, 4, MidpointRounding.AwayFromZero)
End With
If _InventorySIR.QTT > 0 Then
Dim _InventorySC As InventorySC = _ocur.FindObject(Of InventorySC)(CriteriaOperator.Parse("InventoryHeader=? AND Products=?", _
_InventoryHeader, _InventorySIR.StorageInRows.Products))
If _InventorySC Is Nothing Then
_InventorySC = New InventorySC(_ocur.Session)
With _InventorySC
.InventoryHeader = _InventoryHeader
.Products = _InventorySIR.StorageInRows.Products
.QTT = Math.Round(_InventorySIR.QTT, 4, MidpointRounding.AwayFromZero)
End With
Else
_InventorySC.QTT += Math.Round(_InventorySIR.QTT, 4, MidpointRounding.AwayFromZero)
End If
End If
RaiseEvent DoWork()
Next
End If
_ocur.CommitChanges()
Dim _InventorySIR_DEL_Collection As New XPCollection(Of InventorySIR)(_ocur.Session, CriteriaOperator.Parse("InventoryHeader=? AND QTT<=0", _InventoryHeader))
If _InventorySIR_DEL_Collection.Count > 0 Then _ocur.Delete(_InventorySIR_DEL_Collection)
_ocur.CommitChanges()
Catch ext As Exception
MsgBox(ext.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, "Hiba!")
Finally
GLOBAL_HAS_Audit = True
RaiseEvent FinalWork
End Try
End Sub
Protected Sub aInventoryHeader_LoadSpreadFromParameters_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aInventoryHeader_LoadSpreadFromParameters.Execute
'WIN esben kidolgozva!
End Sub
Private Sub aInventoryRecalculatePrice_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aInventoryRecalculatePrice.Execute
Try
GLOBAL_HAS_Audit = False
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _InventoryHeader As InventoryHeader = TryCast(View.SelectedObjects(0), InventoryHeader)
Dim _StorageDateClearingPrice As StorageDateClearingPrice
Dim _StorageDateClearingPrice_Collection As XPCollection(Of StorageDateClearingPrice)
RaiseEvent InitWork(1, 1, _InventoryHeader.InventorySC.Count)
For Each _InventorySC As InventorySC In _InventoryHeader.InventorySC
RaiseEvent DoWork()
_InventorySC.AveragePriceHUF = 0
_StorageDateClearingPrice_Collection = New XPCollection(Of StorageDateClearingPrice)(_ocur.Session, CriteriaOperator.Parse("CustomersFrom=? and Products=? and GetDate(DateExecution)<=?", _InventoryHeader.Storage.CustomersFrom, _InventorySC.Products, _InventoryHeader.DateClose.Date))
_StorageDateClearingPrice_Collection.Sorting.Add(New SortProperty("GetDate(DateExecution)", DB.SortingDirection.Descending))
_StorageDateClearingPrice_Collection.Sorting.Add(New SortProperty("RowIndex", DB.SortingDirection.Ascending))
For Each _StorageDateClearingPrice In _StorageDateClearingPrice_Collection
_InventorySC.AveragePriceHUF = _StorageDateClearingPrice.AveragePriceHUF_After
_InventorySC.SumAveragePriceHUF = _InventorySC.AveragePriceHUF * _InventorySC.QTT
_InventorySC.SumAveragePriceHUF_Found = _InventorySC.AveragePriceHUF * _InventorySC.QTT_Found
_InventorySC.SumAveragePriceHUF_Different = _InventorySC.SumAveragePriceHUF_Found - _InventorySC.SumAveragePriceHUF
_InventorySC.SumAveragePriceHUF_Surplus = 0
_InventorySC.SumAveragePriceHUF_Want = 0
If _InventorySC.SumAveragePriceHUF_Different > 0 Then
_InventorySC.SumAveragePriceHUF_Surplus = _InventorySC.SumAveragePriceHUF_Different
Else
_InventorySC.SumAveragePriceHUF_Want = Math.Abs(_InventorySC.SumAveragePriceHUF_Different)
End If
Exit For
Next
For Each _InventorySIR As InventorySIR In _InventoryHeader.InventorySIR
If _InventorySC.Products.Oid = _InventorySIR.StorageInRows.Products.Oid Then
_InventorySIR.AveragePriceHUF = _InventorySC.AveragePriceHUF
_InventorySIR.SumAveragePriceHUF = _InventorySIR.AveragePriceHUF * _InventorySIR.QTT
_InventorySIR.SumAveragePriceHUF_Found = _InventorySIR.AveragePriceHUF * _InventorySIR.QTT_Found
_InventorySIR.SumAveragePriceHUF_Different = _InventorySIR.SumAveragePriceHUF_Found - _InventorySIR.SumAveragePriceHUF
_InventorySIR.SumAveragePriceHUF_Surplus = 0
_InventorySIR.SumAveragePriceHUF_Want = 0
If _InventorySIR.SumAveragePriceHUF_Different > 0 Then
_InventorySIR.SumAveragePriceHUF_Surplus = _InventorySIR.SumAveragePriceHUF_Different
Else
_InventorySIR.SumAveragePriceHUF_Want = Math.Abs(_InventorySIR.SumAveragePriceHUF_Different)
End If
End If
Next
Next
_ocur.CommitChanges()
Catch ex As Exception
MsgBox(ex.Message)
Finally
GLOBAL_HAS_Audit = True
RaiseEvent FinalWork
End Try
End Sub
End Class
@@ -0,0 +1,82 @@
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.ConditionalAppearance
<DefaultClassOptions()> _
<NonPersistent()> _
<NavigationItem(False)> _
<CreatableItem(False)> _
<Appearance("Disable CreateInventoryHeader_PopUp-Storage", AppearanceItemType.ViewItem, "1=1", TargetItems:="Storage", Enabled:=False)> _
Public Class CreateInventoryHeader_PopUp
Inherits BaseObject
Private _InventoryParameters As InventoryParameters
Private _Storage As Storage
Private _DateClose As Date
Private _InventoryInspector As HRPerson 'Ellenõr
Private _InventoryCreator As HRPerson 'Leltárt készítõ/elvégzõ/végrehejtó
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
DateClose = GetSQLTime(Session)
End Sub
<ImmediatePostData()> _
Property InventoryParameters As InventoryParameters
Get
Return _InventoryParameters
End Get
Set(value As InventoryParameters)
SetPropertyValue("InventoryParameters", _InventoryParameters, value)
If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving Then
Storage = value.Storage
End If
End Set
End Property
<RuleRequiredField("CreateInventoryHeader_PopUp-Storage", DefaultContexts.Save)> _
Property Storage As Storage
Get
Return _Storage
End Get
Set(value As Storage)
SetPropertyValue("Storage", _Storage, value)
End Set
End Property
Property DateClose As Date
Get
Return _DateClose
End Get
Set(value As Date)
SetPropertyValue("DateClose", _DateClose, value)
End Set
End Property
Property InventoryInspector As HRPerson
Get
Return _InventoryInspector
End Get
Set(value As HRPerson)
SetPropertyValue("InventoryInspector", _InventoryInspector, value)
End Set
End Property
Property InventoryCreator As HRPerson
Get
Return _InventoryCreator
End Get
Set(value As HRPerson)
SetPropertyValue("InventoryCreator", _InventoryCreator, value)
End Set
End Property
End Class