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,35 @@
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 StorageInFromPDACollectionPopup
Inherits BaseObject
Private _Storage As Storage
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<RuleRequiredField("StorageInFromPDACollectionPopup-Storage", DefaultContexts.Save)> _
Property Storage As Storage
Get
Return _Storage
End Get
Set(value As Storage)
SetPropertyValue("Storage", _Storage, value)
End Set
End Property
End Class
@@ -0,0 +1,156 @@
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()> _
<NavigationItem("PDA")> _
<DeferredDeletion(False)> _
<DefaultProperty("DocumentNumber")> _
<Appearance("StoragePDACollectionHeader - Disable ObjectCreated, UserCreated, DocumentNumber", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated;UserCreated;DocumentNumber", Enabled:=False)> _
<Appearance("StoragePDACollectionHeader - Disable all properties, when StoragePDACollectionHeaderStatus=1", AppearanceItemType.ViewItem, "StoragePDACollectionHeaderStatus=1", TargetItems:="*", Enabled:=False)> _
<Appearance("StoragePDACollectionHeader - Disable aInsertStoragePDARows, when StoragePDACollectionHeaderStatus=1", AppearanceItemType.Action, "StoragePDACollectionHeaderStatus=1", TargetItems:="aInsertStoragePDARows", Visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("StoragePDACollectionHeader - Disable aDeleteStoragePDARows, when StoragePDACollectionHeaderStatus=1", AppearanceItemType.Action, "StoragePDACollectionHeaderStatus=1", TargetItems:="aDeleteStoragePDARows", Visibility:=Editors.ViewItemVisibility.Hide)> _
Public Class StoragePDACollectionHeader
Inherits BaseObject
Private _CustomersFrom As CustomersFrom
Private _DocumentNumber As String
Private _StoragePDACollectionHeaderStatus As eStoragePDACollectionHeaderStatus
Private _StoragePDACollectionType As eStoragePDACollectionType
Private _StoragePDAParameters As StoragePDAParameters
Private _ObjectCreated As Date
Private _UserCreated As User
Private _StorageInHeader As StorageInHeader
Private _StorageOutHeader As StorageOutHeader
Private _row_Products As Products
Private _row_QTT As Double
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
Me.ObjectCreated = GetSQLTime(Session)
Me.UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
Me.StoragePDACollectionHeaderStatus = eStoragePDACollectionHeaderStatus.eOpen
End Sub
Protected Overrides Sub OnSaving()
MyBase.OnSaving()
If Session.IsNewObject(Me) Then
Me.DocumentNumber = Me.StoragePDAParameters.NumberGenerator.GetNewNumber(Me.StoragePDAParameters.NumberGenerator)
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 DocumentNumber As String
Get
Return _DocumentNumber
End Get
Set(value As String)
SetPropertyValue("DocumentNumber", _DocumentNumber, value)
End Set
End Property
Property StoragePDACollectionHeaderStatus As eStoragePDACollectionHeaderStatus
Get
Return _StoragePDACollectionHeaderStatus
End Get
Set(value As eStoragePDACollectionHeaderStatus)
SetPropertyValue("StoragePDACollectionHeaderStatus", _StoragePDACollectionHeaderStatus, value)
End Set
End Property
Property StorageCollectionType As eStoragePDACollectionType
Get
Return _StoragePDACollectionType
End Get
Set(value As eStoragePDACollectionType)
SetPropertyValue("StoragePDACollectionType", _StoragePDACollectionType, value)
End Set
End Property
<RuleRequiredField("StoragePDACollectionHeader-StoragePDAParameters", DefaultContexts.Save)>
<ImmediatePostData(True), DataSourceCriteria("CustomersFrom = '@This.CustomersFrom'")>
Property StoragePDAParameters As StoragePDAParameters
Get
Return _StoragePDAParameters
End Get
Set(value As StoragePDAParameters)
SetPropertyValue("StoragePDAParameters", _StoragePDAParameters, 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
Property StorageInHeader As StorageInHeader
Get
Return _StorageInHeader
End Get
Set(value As StorageInHeader)
SetPropertyValue("StorageInHeader", _StorageInHeader, value)
End Set
End Property
Property StorageOutHeader As StorageOutHeader
Get
Return _StorageOutHeader
End Get
Set(value As StorageOutHeader)
SetPropertyValue("StorageOutHeader", _StorageOutHeader, value)
End Set
End Property
'Nonpersistent
<NonPersistent> _
Property row_Products As Products
Get
Return _row_Products
End Get
Set(value As Products)
SetPropertyValue("row_Products", _row_Products, value)
End Set
End Property
<NonPersistent> _
Property row_QTT As Double
Get
Return _row_QTT
End Get
Set(value As Double)
SetPropertyValue("row_QTT", _row_QTT, value)
End Set
End Property
'--------------------ReadOnly--------------------------
<VisibleInListView(False), VisibleInLookupListView(False)> _
<Association("StoragePDACollectionHeader-StoragePDACollectionRows", GetType(StoragePDACollectionRows)), Aggregated()> _
Public ReadOnly Property StoragePDACollectionRows() As XPCollection(Of StoragePDACollectionRows)
Get
Return GetCollection(Of StoragePDACollectionRows)("StoragePDACollectionRows")
End Get
End Property
End Class
@@ -0,0 +1,270 @@
Partial Class StoragePDACollectionHeaderVC
<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.aLocatePDACollectionIn = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aLocatePDACollectionOut = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aImportCSVToStoragePDA = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aGetBarcodeStoragePDA = New DevExpress.ExpressApp.Actions.ParametrizedAction(Me.components)
Me.aPrintReport_StoragePDA = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aImportPDA_StoragePDA = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aToTableD_StoragePDA = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aToTable_StoragePDA = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aToTable_StoragePDA_ocur = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aToTableD_StoragePDA_ocur = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aGetBarcodeStoragePDA_ocur = New DevExpress.ExpressApp.Actions.ParametrizedAction(Me.components)
Me.aImportPDA_StoragePDA_ocur = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aGeneratePDARowsByPricingActionHeader = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aGeneratePDARowsByDiscount = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aStoragePDARow_Divide = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aStoragePDARow_Merge = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
'
'aLocatePDACollectionIn
'
Me.aLocatePDACollectionIn.Caption = "aLocatePDACollectionIn"
Me.aLocatePDACollectionIn.Category = "ObjectsCreation"
Me.aLocatePDACollectionIn.ConfirmationMessage = Nothing
Me.aLocatePDACollectionIn.Id = "aLocatePDACollectionIn"
Me.aLocatePDACollectionIn.ImageName = "PDA"
Me.aLocatePDACollectionIn.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aLocatePDACollectionIn.TargetObjectsCriteria = "StorageCollectionType=1 AND StoragePDACollectionHeaderStatus=2"
Me.aLocatePDACollectionIn.TargetObjectType = GetType(Nuvolar.[Module].StoragePDACollectionHeader)
Me.aLocatePDACollectionIn.TargetViewId = ""
Me.aLocatePDACollectionIn.ToolTip = Nothing
'
'aLocatePDACollectionOut
'
Me.aLocatePDACollectionOut.Caption = "aLocatePDACollectionOut"
Me.aLocatePDACollectionOut.Category = "ObjectsCreation"
Me.aLocatePDACollectionOut.ConfirmationMessage = Nothing
Me.aLocatePDACollectionOut.Id = "aLocatePDACollectionOut"
Me.aLocatePDACollectionOut.ImageName = "PDA"
Me.aLocatePDACollectionOut.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aLocatePDACollectionOut.TargetObjectsCriteria = "StorageCollectionType=2 AND StoragePDACollectionHeaderStatus=2"
Me.aLocatePDACollectionOut.TargetObjectType = GetType(Nuvolar.[Module].StoragePDACollectionHeader)
Me.aLocatePDACollectionOut.TargetViewId = ""
Me.aLocatePDACollectionOut.ToolTip = Nothing
'
'aImportCSVToStoragePDA
'
Me.aImportCSVToStoragePDA.Caption = "aImport CSVTo Storage PDA"
Me.aImportCSVToStoragePDA.Category = "aImportCSVToStoragePDA"
Me.aImportCSVToStoragePDA.ConfirmationMessage = Nothing
Me.aImportCSVToStoragePDA.Id = "aImportCSVToStoragePDA"
Me.aImportCSVToStoragePDA.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aImportCSVToStoragePDA.TargetObjectType = GetType(Nuvolar.[Module].StoragePDACollectionHeader)
Me.aImportCSVToStoragePDA.TargetViewNesting = DevExpress.ExpressApp.Nesting.Root
Me.aImportCSVToStoragePDA.ToolTip = Nothing
'
'aGetBarcodeStoragePDA
'
Me.aGetBarcodeStoragePDA.Caption = "aGet Barcode Storage PDA"
Me.aGetBarcodeStoragePDA.Category = "aGetBarcodeStoragePDA"
Me.aGetBarcodeStoragePDA.ConfirmationMessage = Nothing
Me.aGetBarcodeStoragePDA.Id = "aGetBarcodeStoragePDA"
Me.aGetBarcodeStoragePDA.NullValuePrompt = Nothing
Me.aGetBarcodeStoragePDA.ShortCaption = Nothing
Me.aGetBarcodeStoragePDA.TargetObjectType = GetType(Nuvolar.[Module].StoragePDACollectionHeader)
Me.aGetBarcodeStoragePDA.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aGetBarcodeStoragePDA.ToolTip = Nothing
Me.aGetBarcodeStoragePDA.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aPrintReport_StoragePDA
'
Me.aPrintReport_StoragePDA.AcceptButtonCaption = Nothing
Me.aPrintReport_StoragePDA.CancelButtonCaption = Nothing
Me.aPrintReport_StoragePDA.Caption = "aPrintReport_StoragePDA"
Me.aPrintReport_StoragePDA.ConfirmationMessage = Nothing
Me.aPrintReport_StoragePDA.Id = "aPrintReport_StoragePDA"
Me.aPrintReport_StoragePDA.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aPrintReport_StoragePDA.TargetObjectType = GetType(Nuvolar.[Module].StoragePDACollectionHeader)
Me.aPrintReport_StoragePDA.ToolTip = Nothing
'
'aImportPDA_StoragePDA
'
Me.aImportPDA_StoragePDA.Caption = "aImportPDA_StoragePDA"
Me.aImportPDA_StoragePDA.Category = "aImportPDA_StoragePDA"
Me.aImportPDA_StoragePDA.ConfirmationMessage = Nothing
Me.aImportPDA_StoragePDA.Id = "aImportPDA_StoragePDA"
Me.aImportPDA_StoragePDA.TargetObjectType = GetType(Nuvolar.[Module].StoragePDACollectionHeader)
Me.aImportPDA_StoragePDA.ToolTip = Nothing
'
'aToTableD_StoragePDA
'
Me.aToTableD_StoragePDA.Caption = "Delete row"
Me.aToTableD_StoragePDA.Category = "aToTableD_StoragePDA"
Me.aToTableD_StoragePDA.ConfirmationMessage = Nothing
Me.aToTableD_StoragePDA.Id = "aToTableD_StoragePDA"
Me.aToTableD_StoragePDA.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aToTableD_StoragePDA.TargetObjectType = GetType(Nuvolar.[Module].StoragePDACollectionHeader)
Me.aToTableD_StoragePDA.TargetViewId = ""
Me.aToTableD_StoragePDA.ToolTip = Nothing
'
'aToTable_StoragePDA
'
Me.aToTable_StoragePDA.Caption = "Add row"
Me.aToTable_StoragePDA.Category = "aToTable_StoragePDA"
Me.aToTable_StoragePDA.ConfirmationMessage = Nothing
Me.aToTable_StoragePDA.Id = "aToTable_StoragePDA"
Me.aToTable_StoragePDA.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aToTable_StoragePDA.TargetObjectType = GetType(Nuvolar.[Module].StoragePDACollectionHeader)
Me.aToTable_StoragePDA.TargetViewId = ""
Me.aToTable_StoragePDA.ToolTip = Nothing
'
'aToTable_StoragePDA_ocur
'
Me.aToTable_StoragePDA_ocur.Caption = "Add row"
Me.aToTable_StoragePDA_ocur.Category = "aToTable_StoragePDA_ocur"
Me.aToTable_StoragePDA_ocur.ConfirmationMessage = Nothing
Me.aToTable_StoragePDA_ocur.Id = "aToTable_StoragePDA_ocur"
Me.aToTable_StoragePDA_ocur.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aToTable_StoragePDA_ocur.TargetObjectType = GetType(Nuvolar.[Module].StoragePDACollectionHeader)
Me.aToTable_StoragePDA_ocur.TargetViewId = ""
Me.aToTable_StoragePDA_ocur.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aToTable_StoragePDA_ocur.ToolTip = Nothing
Me.aToTable_StoragePDA_ocur.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aToTableD_StoragePDA_ocur
'
Me.aToTableD_StoragePDA_ocur.Caption = "Delete row"
Me.aToTableD_StoragePDA_ocur.Category = "aToTableD_StoragePDA_ocur"
Me.aToTableD_StoragePDA_ocur.ConfirmationMessage = Nothing
Me.aToTableD_StoragePDA_ocur.Id = "aToTableD_StoragePDA_ocur"
Me.aToTableD_StoragePDA_ocur.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aToTableD_StoragePDA_ocur.TargetObjectType = GetType(Nuvolar.[Module].StoragePDACollectionHeader)
Me.aToTableD_StoragePDA_ocur.TargetViewId = ""
Me.aToTableD_StoragePDA_ocur.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aToTableD_StoragePDA_ocur.ToolTip = Nothing
Me.aToTableD_StoragePDA_ocur.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aGetBarcodeStoragePDA_ocur
'
Me.aGetBarcodeStoragePDA_ocur.Caption = "aGetBarcodeStoragePDA_ocur"
Me.aGetBarcodeStoragePDA_ocur.Category = "aGetBarcodeStoragePDA_ocur"
Me.aGetBarcodeStoragePDA_ocur.ConfirmationMessage = Nothing
Me.aGetBarcodeStoragePDA_ocur.Id = "aGetBarcodeStoragePDA_ocur"
Me.aGetBarcodeStoragePDA_ocur.NullValuePrompt = Nothing
Me.aGetBarcodeStoragePDA_ocur.ShortCaption = Nothing
Me.aGetBarcodeStoragePDA_ocur.TargetObjectType = GetType(Nuvolar.[Module].StoragePDACollectionHeader)
Me.aGetBarcodeStoragePDA_ocur.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aGetBarcodeStoragePDA_ocur.ToolTip = Nothing
Me.aGetBarcodeStoragePDA_ocur.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aImportPDA_StoragePDA_ocur
'
Me.aImportPDA_StoragePDA_ocur.Caption = "aImportPDA_StoragePDA_ocur"
Me.aImportPDA_StoragePDA_ocur.Category = "aImportPDA_StoragePDA_ocur"
Me.aImportPDA_StoragePDA_ocur.ConfirmationMessage = Nothing
Me.aImportPDA_StoragePDA_ocur.Id = "aImportPDA_StoragePDA_ocur"
Me.aImportPDA_StoragePDA_ocur.TargetObjectType = GetType(Nuvolar.[Module].StoragePDACollectionHeader)
Me.aImportPDA_StoragePDA_ocur.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aImportPDA_StoragePDA_ocur.ToolTip = Nothing
Me.aImportPDA_StoragePDA_ocur.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aGeneratePDARowsByPricingActionHeader
'
Me.aGeneratePDARowsByPricingActionHeader.AcceptButtonCaption = Nothing
Me.aGeneratePDARowsByPricingActionHeader.CancelButtonCaption = Nothing
Me.aGeneratePDARowsByPricingActionHeader.Caption = "aGenerate PDARows By Pricing Action Header"
Me.aGeneratePDARowsByPricingActionHeader.Category = "aGeneratePDARowsByPricingActionHeader"
Me.aGeneratePDARowsByPricingActionHeader.ConfirmationMessage = Nothing
Me.aGeneratePDARowsByPricingActionHeader.Id = "aGeneratePDARowsByPricingActionHeader"
Me.aGeneratePDARowsByPricingActionHeader.TargetObjectType = GetType(Nuvolar.[Module].StoragePDACollectionHeader)
Me.aGeneratePDARowsByPricingActionHeader.ToolTip = Nothing
'
'aGeneratePDARowsByDiscount
'
Me.aGeneratePDARowsByDiscount.AcceptButtonCaption = Nothing
Me.aGeneratePDARowsByDiscount.CancelButtonCaption = Nothing
Me.aGeneratePDARowsByDiscount.Caption = "aGenerate PDARows By Discount"
Me.aGeneratePDARowsByDiscount.Category = "aGeneratePDARowsByDiscount"
Me.aGeneratePDARowsByDiscount.ConfirmationMessage = Nothing
Me.aGeneratePDARowsByDiscount.Id = "aGeneratePDARowsByDiscount"
Me.aGeneratePDARowsByDiscount.TargetObjectType = GetType(Nuvolar.[Module].StoragePDACollectionHeader)
Me.aGeneratePDARowsByDiscount.ToolTip = Nothing
'
'aStoragePDARow_Divide
'
Me.aStoragePDARow_Divide.AcceptButtonCaption = Nothing
Me.aStoragePDARow_Divide.CancelButtonCaption = Nothing
Me.aStoragePDARow_Divide.Caption = "aStoragePDARow_Divide"
Me.aStoragePDARow_Divide.ConfirmationMessage = Nothing
Me.aStoragePDARow_Divide.Id = "aStoragePDARow_Divide"
Me.aStoragePDARow_Divide.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aStoragePDARow_Divide.TargetObjectType = GetType(Nuvolar.[Module].StoragePDACollectionRows)
Me.aStoragePDARow_Divide.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aStoragePDARow_Divide.ToolTip = Nothing
Me.aStoragePDARow_Divide.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
'
'aStoragePDARow_Merge
'
Me.aStoragePDARow_Merge.Caption = "aStoragePDARow_Merge"
Me.aStoragePDARow_Merge.ConfirmationMessage = Nothing
Me.aStoragePDARow_Merge.Id = "aStoragePDARow_Merge"
Me.aStoragePDARow_Merge.TargetObjectType = GetType(Nuvolar.[Module].StoragePDACollectionRows)
Me.aStoragePDARow_Merge.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aStoragePDARow_Merge.ToolTip = Nothing
Me.aStoragePDARow_Merge.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
'
'StoragePDACollectionHeaderVC
'
Me.Actions.Add(Me.aLocatePDACollectionIn)
Me.Actions.Add(Me.aLocatePDACollectionOut)
Me.Actions.Add(Me.aImportCSVToStoragePDA)
Me.Actions.Add(Me.aGetBarcodeStoragePDA)
Me.Actions.Add(Me.aPrintReport_StoragePDA)
Me.Actions.Add(Me.aImportPDA_StoragePDA)
Me.Actions.Add(Me.aToTableD_StoragePDA)
Me.Actions.Add(Me.aToTable_StoragePDA)
Me.Actions.Add(Me.aToTable_StoragePDA_ocur)
Me.Actions.Add(Me.aToTableD_StoragePDA_ocur)
Me.Actions.Add(Me.aGetBarcodeStoragePDA_ocur)
Me.Actions.Add(Me.aImportPDA_StoragePDA_ocur)
Me.Actions.Add(Me.aGeneratePDARowsByPricingActionHeader)
Me.Actions.Add(Me.aGeneratePDARowsByDiscount)
Me.Actions.Add(Me.aStoragePDARow_Divide)
Me.Actions.Add(Me.aStoragePDARow_Merge)
End Sub
Friend WithEvents aLocatePDACollectionIn As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aLocatePDACollectionOut As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aGetBarcodeStoragePDA As DevExpress.ExpressApp.Actions.ParametrizedAction
Public WithEvents aImportCSVToStoragePDA As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aPrintReport_StoragePDA As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aImportPDA_StoragePDA As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aToTableD_StoragePDA As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aToTable_StoragePDA As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aToTable_StoragePDA_ocur As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aToTableD_StoragePDA_ocur As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aGetBarcodeStoragePDA_ocur As DevExpress.ExpressApp.Actions.ParametrizedAction
Friend WithEvents aImportPDA_StoragePDA_ocur As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aGeneratePDARowsByPricingActionHeader As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aGeneratePDARowsByDiscount As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Public WithEvents aStoragePDARow_Divide As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Public WithEvents aStoragePDARow_Merge As DevExpress.ExpressApp.Actions.SimpleAction
End Class
@@ -0,0 +1,171 @@
<?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="aLocatePDACollectionIn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="aLocatePDACollectionOut.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 173</value>
</metadata>
<metadata name="aImportCSVToStoragePDA.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 290</value>
</metadata>
<metadata name="aGetBarcodeStoragePDA.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 368</value>
</metadata>
<metadata name="aPrintReport_StoragePDA.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 446</value>
</metadata>
<metadata name="aImportPDA_StoragePDA.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 485</value>
</metadata>
<metadata name="aToTableD_StoragePDA.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 524</value>
</metadata>
<metadata name="aToTable_StoragePDA.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aToTable_StoragePDA_ocur.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 563</value>
</metadata>
<metadata name="aToTableD_StoragePDA_ocur.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 602</value>
</metadata>
<metadata name="aGetBarcodeStoragePDA_ocur.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 212</value>
</metadata>
<metadata name="aImportPDA_StoragePDA_ocur.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 407</value>
</metadata>
<metadata name="aGeneratePDARowsByPricingActionHeader.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 329</value>
</metadata>
<metadata name="aGeneratePDARowsByDiscount.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 251</value>
</metadata>
<metadata name="aStoragePDARow_Divide.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 134</value>
</metadata>
<metadata name="aStoragePDARow_Merge.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>189, 56</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,622 @@
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.Persistent.Validation
Imports DevExpress.Data.Filtering
Imports DevExpress.ExpressApp.SystemModule
Imports DevExpress.ExpressApp.Editors
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Xpo
Imports System.IO
Imports Microsoft.VisualBasic.FileIO
Imports System.Reflection
Imports DevExpress.Xpo.DB
Imports System.Net
Public Class StoragePDACollectionHeaderVC
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()
If View.Id = "StoragePDACollectionHeader_ListView" Then
Frame.GetController(Of CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
End If
If View.Id = "StoragePDACollectionHeader_StoragePDACollectionRows_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DeleteObjectsViewController)().Active.SetItemValue("", False)
Frame.GetController(Of CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of ListViewProcessCurrentObjectController)().Active.SetItemValue("", False)
Frame.GetController(Of AuditTrailVC)().aGetAuditTrail.Active.SetItemValue("", False)
End If
'--------------------------DetailViewZ----------------------------------------
If View.Id = "StoragePDACollectionHeader_DetailView" Then
Frame.GetController(Of CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
End If
If View.Id = "StorageInFromPDACollectionPopup_DetailView" Then
AddHandler Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DialogController)().AcceptAction.Executing, AddressOf AcceptAction_Executing
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "StoragePDACollectionHeader_ListView" Then
Frame.GetController(Of CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
End If
If View.Id = "StoragePDACollectionHeader_StoragePDACollectionRows_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DeleteObjectsViewController)().Active.SetItemValue("", True)
Frame.GetController(Of CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of ListViewProcessCurrentObjectController)().Active.SetItemValue("", True)
Frame.GetController(Of AuditTrailVC)().aGetAuditTrail.Active.SetItemValue("", True)
End If
'--------------------------DetailViewZ----------------------------------------
If View.Id = "StoragePDACollectionHeader_DetailView" Then
Frame.GetController(Of CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
End If
If View.Id = "StorageInFromPDACollectionPopup_DetailView" Then
RemoveHandler Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DialogController)().AcceptAction.Executing, AddressOf AcceptAction_Executing
End If
End Sub
Private Sub AcceptAction_Executing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
Validator.RuleSet.ValidateAll(View.ObjectSpace, View.SelectedObjects, DefaultContexts.Save)
End Sub
Private Sub aInsertStoragePDARows_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs)
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _StoragePDACollectionRows As StoragePDACollectionRows = _onew.CreateObject(Of StoragePDACollectionRows)()
e.View = Application.CreateDetailView(_onew, "StoragePDACollectionRows_DetailView", False, _StoragePDACollectionRows)
End Sub
Private Sub aInsertStoragePDARows_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs)
Try
Dim _ocur As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _StoragePDACollectionHeader As StoragePDACollectionHeader = TryCast(View.SelectedObjects(0), StoragePDACollectionHeader)
Dim _StoragePDACollectionRows_PopUp As StoragePDACollectionRows = TryCast(e.PopupWindow.View.SelectedObjects(0), StoragePDACollectionRows)
If _StoragePDACollectionRows_PopUp Is Nothing Then Throw New Exception("*")
Dim _StoragePDACollectionRows As StoragePDACollectionRows = _ocur.CreateObject(Of StoragePDACollectionRows)()
_StoragePDACollectionRows.StoragePDACollectionHeader = _ocur.GetObject(_StoragePDACollectionHeader)
_StoragePDACollectionRows.Products = _ocur.GetObject(_StoragePDACollectionRows_PopUp.Products)
_StoragePDACollectionRows.QTT = _StoragePDACollectionRows_PopUp.QTT
_StoragePDACollectionRows.Description = _StoragePDACollectionRows_PopUp.Description
_ocur.CommitChanges()
Dim nestedFrame As NestedFrame = TryCast(Frame, NestedFrame)
If nestedFrame IsNot Nothing Then
Dim parentView As View = nestedFrame.View
parentView.ObjectSpace.Refresh()
End If
Catch ext As Exception
MsgBox(ext.Message)
End Try
End Sub
Private Sub aDeleteStoragePDARows_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs)
Try
Dim _StoragePDACollectionRows_ListEditor As ListPropertyEditor = TryCast(View, DetailView).FindItem("StoragePDACollectionRows")
If _StoragePDACollectionRows_ListEditor Is Nothing Then Throw New Exception("*Váratlan hiba történt, művelet megszakadt!")
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _StoragePDACollectionRows_DEL_Collection As New ArrayList
For Each _StoragePDACollectionRows As StoragePDACollectionRows In _StoragePDACollectionRows_ListEditor.ListView.SelectedObjects
_StoragePDACollectionRows_DEL_Collection.Add(_StoragePDACollectionRows)
Next
_ocur.Delete(_StoragePDACollectionRows_DEL_Collection)
_ocur.CommitChanges()
Catch ext As Exception
MsgBox(ext.Message)
End Try
End Sub
Private Sub aLocatePDACollectionIn_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aLocatePDACollectionIn.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _StoragePDACollectionHeader As StoragePDACollectionHeader = TryCast(View.SelectedObjects(0), StoragePDACollectionHeader)
If _StoragePDACollectionHeader Is Nothing Then Throw New Exception("*Nincs kijelölve egyetlen PDA kollekció sem!")
If _StoragePDACollectionHeader.StoragePDACollectionHeaderStatus = eStoragePDACollectionHeaderStatus.eClosed Then Throw New Exception("*A kollekció már fel lett dolgozva!")
If _StoragePDACollectionHeader.StoragePDACollectionHeaderStatus = eStoragePDACollectionHeaderStatus.eOpen Then Throw New Exception("*A kollekció még nem lett lokalizálva!")
Dim _StorageComputedLocations As StorageComputedLocations = Nothing
For Each _StoragePDACollectionRows As StoragePDACollectionRows In _StoragePDACollectionHeader.StoragePDACollectionRows
If _StoragePDACollectionRows.StorageLocation IsNot Nothing Then
Dim _StorageComputed As StorageComputed = _ocur.FindObject(Of StorageComputed) _
(CriteriaOperator.Parse("Storage=? AND Products=?", _StoragePDACollectionRows.StorageLocation.Storage, _StoragePDACollectionRows.Products))
If _StorageComputed Is Nothing Then Throw New Exception("*Végzetes hiba történt, a folymat megszakadt!")
If _StoragePDACollectionRows.Products.ProductType = eProductType.ePacketNumber Or _
_StoragePDACollectionRows.Products.ProductType = eProductType.eSerialNumber Then
_StorageComputedLocations = _ocur.CreateObject(Of StorageComputedLocations)()
_StorageComputedLocations.StorageComputed = _StorageComputed
_StorageComputedLocations.QTT = _StoragePDACollectionRows.QTT
_StorageComputedLocations.StorageLocation = _StoragePDACollectionRows.StorageLocation
_StorageComputedLocations.SerialNumber = _StoragePDACollectionRows.SerialNumber
_StorageComputedLocations.PacketNumber = _StoragePDACollectionRows.PacketNumber
Else
_StorageComputedLocations = _ocur.FindObject(Of StorageComputedLocations)(CriteriaOperator.Parse("StorageComputed=? AND StorageLocation=?", _
_StorageComputed, _StoragePDACollectionRows.StorageLocation))
If _StorageComputedLocations Is Nothing Then
_StorageComputedLocations = _ocur.CreateObject(Of StorageComputedLocations)()
_StorageComputedLocations.StorageComputed = _StorageComputed
_StorageComputedLocations.QTT = _StoragePDACollectionRows.QTT
_StorageComputedLocations.StorageLocation = _StoragePDACollectionRows.StorageLocation
Else
_StorageComputedLocations.QTT += _StoragePDACollectionRows.QTT
End If
End If
End If
Next
_StoragePDACollectionHeader.StoragePDACollectionHeaderStatus = eStoragePDACollectionHeaderStatus.eClosed
_ocur.CommitChanges()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
End Try
End Sub
Private Sub aLocatePDACollectionOut_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aLocatePDACollectionOut.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _StoragePDACollectionHeader As StoragePDACollectionHeader = TryCast(View.SelectedObjects(0), StoragePDACollectionHeader)
If _StoragePDACollectionHeader Is Nothing Then Throw New Exception("*Nincs kijelölve egyetlen PDA kollekció sem!")
'For Each _StoragePDACollectionRows As StoragePDACollectionRows In _StoragePDACollectionHeader.StoragePDACollectionRows
' Dim _StorageComputed As StorageComputed = _ocur.FindObject(Of StorageComputed) _
' (CriteriaOperator.Parse("Storage=? AND Products=?", _StoragePDACollectionRows.StorageLocation.Storage, _StoragePDACollectionRows.Products))
' Dim _StorageComputedLocations As StorageComputedLocations = _ocur.FindObject(Of StorageComputedLocations)(CriteriaOperator.Parse("StorageLocation=? AND StorageComputed=?", _StoragePDACollectionRows.StorageLocation, _StorageComputed))
' ' _StorageComputedLocations.QTT -= _StoragePDACollectionRows.QTT
'Next
_StoragePDACollectionHeader.StoragePDACollectionHeaderStatus = eStoragePDACollectionHeaderStatus.eClosed
_ocur.CommitChanges()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
End Try
End Sub
Private Sub aGetBarcodeStoragePDA_Execute(sender As Object, e As ParametrizedActionExecuteEventArgs) Handles aGetBarcodeStoragePDA.Execute
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _StoragePDACollectionHeader As StoragePDACollectionHeader = TryCast(View.SelectedObjects(0), StoragePDACollectionHeader)
Dim _Barcode As String = TryCast(e.ParameterCurrentValue, String)
TryCast(sender, ParametrizedAction).Value = Nothing
_Barcode = _Barcode.Replace("ö", "0")
If LTrim(RTrim(_Barcode)) <> "" Then
Dim _ProductsBarcodes As ProductsBarcodes = _onew.FindObject(Of ProductsBarcodes)(CriteriaOperator.Parse("StartsWith([Barcode], ?)", _Barcode))
If _ProductsBarcodes IsNot Nothing Then
Dim _StoragePDACollectionRows As StoragePDACollectionRows
_StoragePDACollectionRows = _onew.CreateObject(Of StoragePDACollectionRows)()
_StoragePDACollectionRows.StoragePDACollectionHeader = _onew.GetObject(_StoragePDACollectionHeader)
_StoragePDACollectionRows.Barcode = _Barcode
_StoragePDACollectionRows.Products = _ProductsBarcodes.Products
If _StoragePDACollectionHeader.row_QTT <= 0 Then
_StoragePDACollectionRows.QTT = 1
Else
_StoragePDACollectionRows.QTT = _StoragePDACollectionHeader.row_QTT
End If
_StoragePDACollectionRows.QTT_Processed = 0
_onew.CommitChanges()
End If
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
End If
'Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
'Dim _StoragePDACollectionHeader As StoragePDACollectionHeader = TryCast(View.SelectedObjects(0), StoragePDACollectionHeader)
'Dim _Barcode As String = TryCast(e.ParameterCurrentValue, String)
'TryCast(sender, ParametrizedAction).Value = Nothing
'If LTrim(RTrim(_Barcode)) <> "" Then
' Dim _ProductsBarcodes As ProductsBarcodes = _ocur.FindObject(Of ProductsBarcodes)(CriteriaOperator.Parse("StartsWith([Barcode], ?)", _Barcode))
' If _ProductsBarcodes IsNot Nothing Then
' Dim _StoragePDACollectionRows As StoragePDACollectionRows
' _StoragePDACollectionRows = _ocur.CreateObject(Of StoragePDACollectionRows)()
' _StoragePDACollectionRows.StoragePDACollectionHeader = _StoragePDACollectionHeader
' _StoragePDACollectionRows.Barcode = _Barcode
' _StoragePDACollectionRows.Products = _ProductsBarcodes.Products
' If _StoragePDACollectionHeader.row_QTT <= 0 Then
' _StoragePDACollectionRows.QTT = 1
' Else
' _StoragePDACollectionRows.QTT = _StoragePDACollectionHeader.row_QTT
' End If
' _StoragePDACollectionRows.QTT_Processed = 0
' '_onew.CommitChanges()
' End If
' 'Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
'End If
End Sub
Private Sub aImportCSVToStoragePDA_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aImportCSVToStoragePDA.Execute
End Sub
Private Sub aPrintReport_StoragePDA_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aPrintReport_StoragePDA.CustomizePopupWindowParams
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _ReportData_CollectionSource = New CollectionSource(_onew, GetType(ReportData))
_ReportData_CollectionSource.BeginUpdateCriteria()
_ReportData_CollectionSource.Criteria("Criteria") = CriteriaOperator.Parse("DataTypeName='Nuvolar.Module.PricingProductsBarcodePrint'")
_ReportData_CollectionSource.EndUpdateCriteria()
e.View = Application.CreateListView("ReportData_ListView_Select", _ReportData_CollectionSource, True)
End Sub
Private Sub aPrintReport_StoragePDA_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aPrintReport_StoragePDA.Execute
Dim _ReportData As ReportData = TryCast(e.PopupWindow.View.SelectedObjects(0), ReportData)
If _ReportData Is Nothing Then Throw New Exception("*Nincs beállítva nyomtatvány!")
Try
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _StoragePDACollectionHeader As StoragePDACollectionHeader = TryCast(View.SelectedObjects(0), StoragePDACollectionHeader)
'// Le kell generálni a sorokat
Dim _textStreamReader As StreamReader
Dim _assembly As [Assembly]
Dim _SQL As String
Try
_assembly = [Assembly].GetExecutingAssembly()
_textStreamReader = New StreamReader(_assembly.GetManifestResourceStream("Nuvolar.Module.StoragePDAGenerateDataforPrint.sql"))
_SQL = _textStreamReader.ReadToEnd
_SQL = String.Format(_SQL, _StoragePDACollectionHeader.Oid.ToString, SecuritySystem.CurrentUserId.ToString)
_ocur.Session.ExecuteNonQuery(_SQL)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical)
End Try
Catch ext As Exception
MsgBox(ext.Message, MsgBoxStyle.OkOnly)
Finally
RaiseEvent FinalWork()
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("MasterKey=?", SecuritySystem.CurrentUserId))
End Try
End Sub
Private Sub aImportPDA_StoragePDA_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aImportPDA_StoragePDA.Execute
''Megnyitja a PDA-t és beemeli a sorokat
'Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
'Dim _StoragePDACollectionHeader As StoragePDACollectionHeader = _onew.GetObjectByKey(Of StoragePDACollectionHeader)(TryCast(View.SelectedObjects(0), StoragePDACollectionHeader).Oid)
'Dim _Products As Products
'Try
' GLOBAL_HAS_Audit = False
' Dim _DeliveryNoteInType As DeliveryNoteInType = _onew.FindObject(Of DeliveryNoteInType)(CriteriaOperator.Parse("IsNull(PDAPath)=False and PDAPath !=''"))
' If File.Exists(_DeliveryNoteInType.PDAPath) Then
' Dim _StreamFile = New FileStream(_DeliveryNoteInType.PDAPath, FileMode.Open, FileAccess.Read)
' Dim _StreamReader As New StreamReader(_StreamFile)
' Dim _StrBuffer As String = ""
' Dim _LineCount As Long = File.ReadAllLines(_DeliveryNoteInType.PDAPath).Length
' _StreamFile.Seek(0, SeekOrigin.Begin)
' _StrBuffer = _StreamReader.ReadToEnd()
' _StreamReader.Close()
' _StreamFile.Close()
' File.Delete(_DeliveryNoteInType.PDAPath)
' Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", False)
' Using parser As New TextFieldParser(New StringReader(_StrBuffer))
' parser.TextFieldType = FieldType.Delimited
' parser.SetDelimiters(",")
' RaiseEvent InitWork(1, 1, _LineCount)
' While Not parser.EndOfData
' Try
' RaiseEvent DoWork()
' Dim columns As String() = parser.ReadFields()
' _Products = _onew.FindObject(Of Products)(CriteriaOperator.Parse("ProductNumber=?", columns(2).ToString))
' If _Products IsNot Nothing Then
' Dim _StoragePDACollectionRows As StoragePDACollectionRows
' _StoragePDACollectionRows = _onew.CreateObject(Of StoragePDACollectionRows)()
' _StoragePDACollectionRows.StoragePDACollectionHeader = _onew.GetObject(_StoragePDACollectionHeader)
' _StoragePDACollectionRows.Products = _onew.GetObject(_Products)
' _StoragePDACollectionRows.QTT = Val(columns(4))
' _StoragePDACollectionRows.QTT_Processed = 0
' _onew.CommitChanges()
' End If
' Catch ex As MalformedLineException
' 'MsgBox(ex.Message, MsgBoxStyle.Critical + MsgBoxStyle.OkOnly)
' End Try
' End While
' End Using
' _onew.CommitChanges()
' Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", True)
' End If
'Catch ex As Exception
' MsgBox(ex.Message, MsgBoxStyle.Critical + MsgBoxStyle.OkOnly)
'Finally
' RaiseEvent FinalWork()
' GLOBAL_HAS_Audit = True
' Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
'End Try
End Sub
Private Sub aToTable_StoragePDA_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aToTable_StoragePDA.Execute
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _StoragePDACollectionHeader As StoragePDACollectionHeader = TryCast(View.SelectedObjects(0), StoragePDACollectionHeader)
Dim _Start As String
'Dim watch As Stopwatch = Stopwatch.StartNew()
If _StoragePDACollectionHeader.row_Products IsNot Nothing Then
Dim _StoragePDACollectionRows As StoragePDACollectionRows
_StoragePDACollectionRows = _onew.CreateObject(Of StoragePDACollectionRows)()
_StoragePDACollectionRows.StoragePDACollectionHeader = _onew.GetObject(_StoragePDACollectionHeader)
_StoragePDACollectionRows.Barcode = ""
_StoragePDACollectionRows.Products = _onew.GetObjectByKey(Of Products)(_StoragePDACollectionHeader.row_Products.Oid)
If _StoragePDACollectionHeader.row_QTT < 0 Then
_StoragePDACollectionRows.QTT = 1
Else
_StoragePDACollectionRows.QTT = _StoragePDACollectionHeader.row_QTT
End If
_StoragePDACollectionRows.QTT_Processed = 0
_onew.CommitChanges()
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
End If
'watch.Stop()
'MsgBox(watch.Elapsed.TotalMilliseconds)
End Sub
Private Sub aToTableD_StoragePDA_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aToTableD_StoragePDA.Execute
' a kiválasztott sorokat törli -----------------------------------------------
'Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _StoragePDACollectionHeader As StoragePDACollectionHeader = _onew.GetObject(TryCast(View.SelectedObjects(0), StoragePDACollectionHeader))
Dim _StoragePDACollectionRows_Collection As ArrayList = New ArrayList
Dim _StoragePDACollectionRows_ListEditor As ListPropertyEditor
Try
GLOBAL_HAS_Audit = False
_StoragePDACollectionRows_ListEditor = TryCast(View, DetailView).FindItem("StoragePDACollectionRows")
For Each _StoragePDACollectionRows As StoragePDACollectionRows In _StoragePDACollectionRows_ListEditor.ListView.SelectedObjects
_StoragePDACollectionRows_Collection.Add(_onew.GetObject(_StoragePDACollectionRows))
Next
_onew.Delete(_StoragePDACollectionRows_Collection)
_onew.CommitChanges()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical + MsgBoxStyle.OkOnly)
Finally
GLOBAL_HAS_Audit = True
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
End Try
End Sub
Private Sub aToTable_StoragePDA_ocur_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aToTable_StoragePDA_ocur.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _StoragePDACollectionHeader As StoragePDACollectionHeader = TryCast(View.SelectedObjects(0), StoragePDACollectionHeader)
If _StoragePDACollectionHeader.row_Products IsNot Nothing Then
Dim _StoragePDACollectionRows As StoragePDACollectionRows
_StoragePDACollectionRows = _ocur.CreateObject(Of StoragePDACollectionRows)()
_StoragePDACollectionRows.StoragePDACollectionHeader = _ocur.GetObject(_StoragePDACollectionHeader)
_StoragePDACollectionRows.Barcode = ""
_StoragePDACollectionRows.Products = _ocur.GetObjectByKey(Of Products)(_StoragePDACollectionHeader.row_Products.Oid)
_StoragePDACollectionRows.RowIndex = _StoragePDACollectionHeader.StoragePDACollectionRows.Count + 1
If _StoragePDACollectionHeader.row_QTT < 0 Then
_StoragePDACollectionRows.QTT = 1
Else
_StoragePDACollectionRows.QTT = _StoragePDACollectionHeader.row_QTT
End If
_StoragePDACollectionRows.QTT_Processed = 0
End If
End Sub
Private Sub aToTableD_StoragePDA_ocur_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aToTableD_StoragePDA_ocur.Execute
' a kiválasztott sorokat törli -----------------------------------------------
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _StoragePDACollectionHeader As StoragePDACollectionHeader = TryCast(View.SelectedObjects(0), StoragePDACollectionHeader)
Dim _StoragePDACollectionRows_Collection As ArrayList = New ArrayList
Dim _StoragePDACollectionRows_ListEditor As ListPropertyEditor
Try
_StoragePDACollectionRows_ListEditor = TryCast(View, DetailView).FindItem("StoragePDACollectionRows")
For Each _StoragePDACollectionRows As StoragePDACollectionRows In _StoragePDACollectionRows_ListEditor.ListView.SelectedObjects
_StoragePDACollectionRows_Collection.Add(_ocur.GetObject(_StoragePDACollectionRows))
Next
_ocur.Delete(_StoragePDACollectionRows_Collection)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical + MsgBoxStyle.OkOnly)
Finally
End Try
End Sub
Private Sub aGetBarcodeStoragePDA_ocur_Execute(sender As Object, e As ParametrizedActionExecuteEventArgs) Handles aGetBarcodeStoragePDA_ocur.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _StoragePDACollectionHeader As StoragePDACollectionHeader = TryCast(View.SelectedObjects(0), StoragePDACollectionHeader)
Dim _Barcode As String = TryCast(e.ParameterCurrentValue, String)
TryCast(sender, ParametrizedAction).Value = Nothing
If LTrim(RTrim(_Barcode)) <> "" Then
Dim _ProductsBarcodes As ProductsBarcodes = _ocur.FindObject(Of ProductsBarcodes)(CriteriaOperator.Parse("StartsWith([Barcode], ?)", _Barcode), True)
If _ProductsBarcodes IsNot Nothing Then
Dim _StoragePDACollectionRows As StoragePDACollectionRows
_StoragePDACollectionRows = _ocur.CreateObject(Of StoragePDACollectionRows)()
_StoragePDACollectionRows.StoragePDACollectionHeader = _StoragePDACollectionHeader
_StoragePDACollectionRows.Barcode = _Barcode
_StoragePDACollectionRows.Products = _ProductsBarcodes.Products
_StoragePDACollectionRows.RowIndex = _StoragePDACollectionHeader.StoragePDACollectionRows.Count + 1
If _StoragePDACollectionHeader.row_QTT <= 0 Then
_StoragePDACollectionRows.QTT = 1
Else
_StoragePDACollectionRows.QTT = _StoragePDACollectionHeader.row_QTT
End If
_StoragePDACollectionRows.QTT_Processed = 0
End If
End If
End Sub
Private Sub aImportPDA_StoragePDA_ocur_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aImportPDA_StoragePDA_ocur.Execute
''Megnyitja a PDA-t és beemeli a sorokat
'Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
'Dim _StoragePDACollectionHeader As StoragePDACollectionHeader = TryCast(View.SelectedObjects(0), StoragePDACollectionHeader)
'Dim _Products As Products
'Try
' Dim _DeliveryNoteInType As DeliveryNoteInType = _ocur.FindObject(Of DeliveryNoteInType)(CriteriaOperator.Parse("IsNull(PDAPath)=False and PDAPath !=''"), True)
' If File.Exists(_DeliveryNoteInType.PDAPath) Then
' Dim _StreamFile = New FileStream(_DeliveryNoteInType.PDAPath, FileMode.Open, FileAccess.Read)
' Dim _StreamReader As New StreamReader(_StreamFile)
' Dim _StrBuffer As String = ""
' Dim _LineCount As Long = File.ReadAllLines(_DeliveryNoteInType.PDAPath).Length
' _StreamFile.Seek(0, SeekOrigin.Begin)
' _StrBuffer = _StreamReader.ReadToEnd()
' _StreamReader.Close()
' _StreamFile.Close()
' File.Delete(_DeliveryNoteInType.PDAPath)
' Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", False)
' Using parser As New TextFieldParser(New StringReader(_StrBuffer))
' parser.TextFieldType = FieldType.Delimited
' parser.SetDelimiters(",")
' RaiseEvent InitWork(1, 1, _LineCount)
' While Not parser.EndOfData
' Try
' RaiseEvent DoWork()
' Dim columns As String() = parser.ReadFields()
' _Products = _ocur.FindObject(Of Products)(CriteriaOperator.Parse("ProductNumber=?", columns(2).ToString))
' If _Products IsNot Nothing Then
' Dim _StoragePDACollectionRows As StoragePDACollectionRows
' _StoragePDACollectionRows = _ocur.CreateObject(Of StoragePDACollectionRows)()
' _StoragePDACollectionRows.StoragePDACollectionHeader = _ocur.GetObject(_StoragePDACollectionHeader)
' _StoragePDACollectionRows.Products = _ocur.GetObject(_Products)
' _StoragePDACollectionRows.QTT = Val(columns(4))
' _StoragePDACollectionRows.QTT_Processed = 0
' _StoragePDACollectionRows.RowIndex = _StoragePDACollectionHeader.StoragePDACollectionRows.Count + 1
' End If
' Catch ex As MalformedLineException
' 'MsgBox(ex.Message, MsgBoxStyle.Critical + MsgBoxStyle.OkOnly)
' End Try
' End While
' End Using
' End If
'Catch ex As Exception
' MsgBox(ex.Message, MsgBoxStyle.Critical + MsgBoxStyle.OkOnly)
'Finally
' RaiseEvent FinalWork()
'End Try
End Sub
Private Sub aGeneratePDARowsByPricingActionHeader_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aGeneratePDARowsByPricingActionHeader.CustomizePopupWindowParams
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _StoragePDACollectionProductSelectPopup As StoragePDACollectionProductSelectPopup = _onew.CreateObject(Of StoragePDACollectionProductSelectPopup)()
Dim _PricingActionHeader_Collection As New XPCollection(Of PricingActionHeader)(_onew.Session, CriteriaOperator.Parse("PricingActionType=2"))
Dim _PricingActionHeader As PricingActionHeader
_StoragePDACollectionProductSelectPopup.DateExecution = Now
For Each _PricingActionHeader In _PricingActionHeader_Collection
_StoragePDACollectionProductSelectPopup.PricingActionHeader.Add(_PricingActionHeader)
Next
e.View = Application.CreateDetailView(_onew, "StoragePDACollectionProductSelectPopup_DetailView", True, _StoragePDACollectionProductSelectPopup)
End Sub
Private Sub aGeneratePDARowsByPricingActionHeader_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aGeneratePDARowsByPricingActionHeader.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _StoragePDACollectionHeader As StoragePDACollectionHeader = TryCast(View.SelectedObjects(0), StoragePDACollectionHeader)
Dim _StoragePDACollectionProductSelectPopup As StoragePDACollectionProductSelectPopup = TryCast(e.PopupWindow.View.SelectedObjects(0), StoragePDACollectionProductSelectPopup)
Dim _ListPropertyEditor As ListPropertyEditor = TryCast(e.PopupWindow.View, DetailView).FindItem("PricingActionHeader")
If _ListPropertyEditor IsNot Nothing Then
For Each _PricinhActionHeader As PricingActionHeader In _ListPropertyEditor.ListView.SelectedObjects
Dim _textStreamReader As StreamReader
Dim _assembly As [Assembly]
Dim _SQL As String
Try
_assembly = [Assembly].GetExecutingAssembly()
_textStreamReader = New StreamReader(_assembly.GetManifestResourceStream("Nuvolar.Module.StoragePDAGenerateDatafromPricingActionHeader.sql"))
_SQL = _textStreamReader.ReadToEnd
_SQL = String.Format(_SQL, _PricinhActionHeader.Oid.ToString, _StoragePDACollectionHeader.Oid.ToString, Format(_StoragePDACollectionProductSelectPopup.DateExecution.Date, "yyyy-MM-dd"), _StoragePDACollectionProductSelectPopup.IsOvverides.ToString)
_ocur.Session.ExecuteNonQuery(_SQL)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical)
End Try
Next
End If
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
End Sub
Private Sub aGeneratePDARowsByDiscount_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aGeneratePDARowsByDiscount.CustomizePopupWindowParams
'Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
'Dim _PricingProductsBarcodeCustomers_CollectionSource = New CollectionSource(_onew, GetType(PricingProductsBarcodeCustomers))
'_PricingProductsBarcodeCustomers_CollectionSource.BeginUpdateCriteria()
'_PricingProductsBarcodeCustomers_CollectionSource.Criteria("Criteria") = CriteriaOperator.Parse("StartsWith([Barcode], '99') And [ExpirationDate] >= LocalDateTimeNow() And [ActualDate] <= LocalDateTimeNow() And (BarcodeType='' or IsNull(BarcodeType)=True)")
'_PricingProductsBarcodeCustomers_CollectionSource.EndUpdateCriteria()
'e.View = Application.CreateListView("PricingProductsBarcodeCustomers_ListView_Select", _PricingProductsBarcodeCustomers_CollectionSource, True)
End Sub
Private Sub aGeneratePDARowsByDiscount_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aGeneratePDARowsByDiscount.Execute
'Dim _StoragePDACollectionHeader As StoragePDACollectionHeader = TryCast(View.SelectedObjects(0), StoragePDACollectionHeader)
'Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
'RaiseEvent InitWork(1, 1, TryCast(e.PopupWindow.View, ListView).CollectionSource.List.Count)
'For Each _PricingProductsBarcodeCustomers As PricingProductsBarcodeCustomers In TryCast(e.PopupWindow.View, ListView).CollectionSource.List
' RaiseEvent DoWork()
' If _PricingProductsBarcodeCustomers.NonPersistent_QTT > 0 Then
' Dim _StoragePDACollectionRows As StoragePDACollectionRows = _onew.CreateObject(Of StoragePDACollectionRows)()
' _StoragePDACollectionRows.StoragePDACollectionHeader = _onew.GetObject(_StoragePDACollectionHeader)
' _StoragePDACollectionRows.Barcode = _PricingProductsBarcodeCustomers.Barcode
' _StoragePDACollectionRows.Products = _onew.GetObject(_PricingProductsBarcodeCustomers.Products)
' _StoragePDACollectionRows.QTT = _PricingProductsBarcodeCustomers.NonPersistent_QTT
' _StoragePDACollectionRows.RowIndex = 0
' _onew.CommitChanges()
' End If
'Next
'RaiseEvent FinalWork()
'Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
End Sub
End Class
@@ -0,0 +1,28 @@
Imports System.Linq
Imports DevExpress.Xpo
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
<DefaultClassOptions(), NonPersistent> _
Public Class StoragePDACollectionProductSelectPopup
Inherits BaseObject
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
_PricingActionHeader_List = New List(Of PricingActionHeader)
IsOvverides = False
End Sub
Private _PricingActionHeader_List As IList(Of PricingActionHeader)
Property DateExecution As Date
Property IsOvverides As Boolean
ReadOnly Property PricingActionHeader As IList(Of PricingActionHeader)
Get
Return _PricingActionHeader_List
End Get
End Property
End Class
@@ -0,0 +1,149 @@
Imports System.ComponentModel
Imports DevExpress.Xpo
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation
<DefaultClassOptions()> _
<NavigationItem(False), CreatableItem(False)> _
<DeferredDeletion(False)> _
Public Class StoragePDACollectionRows
Inherits BaseObject
Private _StoragePDACollectionHeader As StoragePDACollectionHeader
Private _RowIndex As Long 'Sor index, ami alapján látszik, mi lett beolvasva utoljára
Private _Barcode As String 'Termék vonalkódja
Private _Products As Products 'Termék
Private _QTT As Double 'Mennyiség
Private _QTT_Processed As Double 'Szándék
Private _Description As String 'Leírás
Private _StorageLocation As StorageLocation 'Raktári lokáció
Private _DateModified As Date 'Módosítás dátuma
Private _ConnectOid As Guid
Private _PacketNumber As String 'Kötegszám
Private _SerialNumber As String 'Sorozatszám
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
Me.QTT = 0
End Sub
Protected Overrides Sub OnSaving()
MyBase.OnSaving()
If Session.IsNewObject(Me) Then
If Me.RowIndex = 0 Then
Dim _MaxRowIndex As Long = Val(Session.ExecuteScalar(String.Format("select max(RowIndex) from StoragePDACollectionRows Where StoragePDACollectionHeader='{0}'", _StoragePDACollectionHeader.Oid)))
Me.RowIndex = _MaxRowIndex + 1
End If
End If
End Sub
Protected Overrides Sub OnDeleting()
MyBase.OnDeleting()
Session.ExecuteNonQuery(String.Format("update StoragePDACollectionRows set RowIndex=RowIndex-1 where RowIndex>{0} and StoragePDACollectionHeader='{1}'", Me.RowIndex, _StoragePDACollectionHeader.Oid))
End Sub
<RuleRequiredField("StoragePDACollectionRows-StoragePDACollectionHeader", DefaultContexts.Save)> _
<Association("StoragePDACollectionHeader-StoragePDACollectionRows", GetType(StoragePDACollectionHeader))> _
Property StoragePDACollectionHeader As StoragePDACollectionHeader
Get
Return _StoragePDACollectionHeader
End Get
Set(value As StoragePDACollectionHeader)
SetPropertyValue("StoragePDACollectionHeader", _StoragePDACollectionHeader, value)
End Set
End Property
Property RowIndex As Long
Get
Return _RowIndex
End Get
Set(value As Long)
SetPropertyValue("RowIndex", _RowIndex, value)
End Set
End Property
Property Barcode As String
Get
Return _Barcode
End Get
Set(value As String)
SetPropertyValue("Barcode", _Barcode, value)
End Set
End Property
<RuleRequiredField("StoragePDACollectionRows-Products", DefaultContexts.Save)> _
<NoForeignKey> _
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 _QTT
End Get
Set(value As Double)
SetPropertyValue("QTT", _QTT, value)
End Set
End Property
Property QTT_Processed As Double
Get
Return _QTT_Processed
End Get
Set(value As Double)
SetPropertyValue("QTT_Processed", _QTT_Processed, 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
Property StorageLocation As StorageLocation
Get
Return _StorageLocation
End Get
Set(value As StorageLocation)
SetPropertyValue("StorageLocation", _StorageLocation, value)
End Set
End Property
Property DateModified As Date
Get
Return _DateModified
End Get
Set(value As Date)
SetPropertyValue("DateModified", _DateModified, value)
End Set
End Property
<Browsable(False)> _
Property ConnectOid As Guid
Get
Return _ConnectOid
End Get
Set(value As Guid)
SetPropertyValue("ConnectOid", _ConnectOid, value)
End Set
End Property
Property PacketNumber As String
Get
Return _PacketNumber
End Get
Set(value As String)
SetPropertyValue("PacketNumber", _PacketNumber, value)
End Set
End Property
Property SerialNumber As String
Get
Return _SerialNumber
End Get
Set(value As String)
SetPropertyValue("SerialNumber", _SerialNumber, value)
End Set
End Property
End Class
@@ -0,0 +1,86 @@
set nocount on
declare @StoragePDACollectionHeader uniqueidentifier
declare @StoragePDACollectionRows uniqueidentifier
declare @Barcode nvarchar(50)
declare @Barcode2 nvarchar(50)
declare @MasterKey uniqueidentifier
declare @PriceBruttoHUF float
declare @PriceDiscountHUF float
declare @Products uniqueidentifier
declare @ActualDate datetime
declare @ExpirationDate datetime
declare @PricingCodeDescription nvarchar(255)
declare @QTT int
declare @J int
set @StoragePDACollectionHeader='{0}'
set @MasterKey='{1}'
begin tran
delete from PricingProductsBarcodePrint Where MasterKey=@MasterKey
declare CSPDAR cursor local fast_forward for
select Oid,Products,ltrim(rtrim(isnull(Barcode,''))),convert(int,QTT)
from StoragePDACollectionRows
where StoragePDACollectionHeader=@StoragePDACollectionHeader
order by RowIndex
open CSPDAR
fetch next from CSPDAR into @StoragePDACollectionRows,@Products,@Barcode,@QTT
while @@FETCH_STATUS=0
begin
-- Eladási ár meghatározása
set @PriceBruttoHUF=0
if @Barcode=''
begin
select top 1 @Barcode2=Barcode,@PriceBruttoHUF=PriceBruttoHUF,@ActualDate=ActualDate,@ExpirationDate=ExpirationDate,@PricingCodeDescription=PricingCodeDescription
from PricingProductsBarcodeCustomers
where Products=@Products and ActualDate<=getdate() and convert(varchar(10),getdate(),111)<=convert(varchar(10),ExpirationDate,111) and Barcode not like '28%' and len(Barcode)>4
order by IsAction desc,ActualDate desc
end
else
begin
select top 1 @Barcode2=Barcode,@PriceBruttoHUF=PriceBruttoHUF,@ActualDate=ActualDate,@ExpirationDate=ExpirationDate,@PricingCodeDescription=PricingCodeDescription
from PricingProductsBarcodeCustomers
where Barcode=@Barcode and ActualDate<=getdate() and convert(varchar(10),getdate(),111)<=convert(varchar(10),ExpirationDate,111) and Barcode not like '28%' and len(Barcode)>4
order by IsAction desc,ActualDate desc
end
set @PriceDiscountHUF=@PriceBruttoHUF
if substring(@Barcode,1,2)='99'
begin
select top 1 @PriceBruttoHUF=PriceBruttoHUF
from PricingProductsBarcodeCustomers
where Products=@Products and ActualDate<=getdate() and convert(varchar(10),getdate(),111)<=convert(varchar(10),ExpirationDate,111) and Barcode not like '28%' and len(Barcode)>4
and Barcode not like '99%'
order by IsAction desc,ActualDate desc
end
set @J=0
while @J<@QTT
begin
if isnull(@Barcode,'')=''
begin
insert PricingProductsBarcodePrint ( Oid, MasterKey, Products, RowIndex, Barcode, PriceBruttoHUF, PriceDiscountHUF)
select NEWID(),'{1}',t1.Products,t1.RowIndex,@Barcode2,@PriceBruttoHUF,@PriceBruttoHUF
from StoragePDACollectionRows t1
where Oid=@StoragePDACollectionRows
end
else
begin
insert PricingProductsBarcodePrint ( Oid, MasterKey, Products, RowIndex, Barcode, PriceBruttoHUF, PriceDiscountHUF,ActualDate,ExpirationDate,PricingCodeDescription)
select NEWID(),'{1}',t1.Products,t1.RowIndex,@Barcode,@PriceBruttoHUF,@PriceDiscountHUF,@ActualDate,@ExpirationDate,@PricingCodeDescription
from StoragePDACollectionRows t1
where Oid=@StoragePDACollectionRows
end
set @J=@J+1
end
fetch next from CSPDAR into @StoragePDACollectionRows,@Products,@Barcode,@QTT
end
close CSPDAR
deallocate CSPDAR
commit
@@ -0,0 +1,53 @@
set nocount on
declare @StoragePDACollectionHeader uniqueidentifier
declare @PricingActionHeader uniqueidentifier
declare @PricingActionRows uniqueidentifier
declare @DateExecution datetime
declare @PriceBruttoHUF float
declare @Products uniqueidentifier
declare @Barcode nvarchar(50)
declare @RowIndex int
declare @IsOverrides nvarchar(10)
set @PricingActionHeader='{0}'
set @StoragePDACollectionHeader='{1}'
set @DateExecution='{2}'
set @IsOverrides='{3}'
if @IsOverrides='True'
begin
delete from StoragePDACollectionRows where StoragePDACollectionHeader=@StoragePDACollectionHeader
end
declare CGU cursor fast_forward local for
select t1.Oid,t1.Products,t1.RowIndex
from pcs_whs.dbo.PricingActionRows t1
where t1.PricingActionHeader=@PricingActionHeader
order by t1.RowIndex
open CGU
fetch next from CGU into @PricingActionRows,@Products,@RowIndex
while @@FETCH_STATUS=0
begin
set @PriceBruttoHUF=0
select top 1 @Barcode=Barcode,@PriceBruttoHUF=PriceBruttoHUF
from PricingProductsBarcodeCustomers
where Products=@Products and ActualDate<=getdate() and convert(varchar(10),getdate(),111)<=convert(varchar(10),ExpirationDate,111) and Barcode not like '28%' and len(Barcode)>4
order by IsAction desc,ActualDate desc
insert StoragePDACollectionRows ( Oid, StoragePDACollectionHeader, Products, QTT,RowIndex, Barcode)
select NEWID(),@StoragePDACollectionHeader,@Products,1,@RowIndex,@Barcode
fetch next from CGU into @PricingActionRows,@Products,@RowIndex
end
close CGU
deallocate CGU
@@ -0,0 +1,114 @@
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()> _
<NavigationItem("PDA"), CreatableItem(False)> _
<DefaultProperty("NumberGenerator")> _
<Appearance("Disable ObjectCreated UserCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated;UserCreated", Enabled:=False)> _
Public Class StoragePDAParameters
Inherits BaseObject
Private _UserCreated As User
Private _ObjectCreated As Date
Private _NumberGenerator As NumberGenerator
Private _CustomersFrom As CustomersFrom
Private _ShortName As String
Private _ReportLocationIn As ReportData ' -- Nyomtatvány betárolás
Private _ReportLocationOut As ReportData ' -- Nyomtatvány kitárolás
Private _ImportPath As String 'Importálás utvonala (Könyvtár)
Private _DeleteAfterImport As Boolean 'Törölje-e a beimportált filet.
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
Me.ObjectCreated = GetSQLTime(Session)
Me.UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
DeleteAfterImport = False
End Sub
Property ShortName As String
Get
Return _ShortName
End Get
Set(value As String)
SetPropertyValue("ShortName", _ShortName, 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
<RuleRequiredField("StoragePDAParameters-NumberGenerator", DefaultContexts.Save)> _
Property NumberGenerator As NumberGenerator
Get
Return _NumberGenerator
End Get
Set(value As NumberGenerator)
SetPropertyValue("NumberGenerator", _NumberGenerator, value)
End Set
End Property
<RuleRequiredField("StoragePDAParameters-CustomersFrom", DefaultContexts.Save)> _
Property CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
End Set
End Property
Property ReportLocationIn As ReportData
Get
Return _ReportLocationIn
End Get
Set(value As ReportData)
SetPropertyValue("ReportLocationIn", _ReportLocationIn, value)
End Set
End Property
Property ReportLocationOut As ReportData
Get
Return _ReportLocationOut
End Get
Set(value As ReportData)
SetPropertyValue("ReportLocationOut", _ReportLocationOut, value)
End Set
End Property
<Size(-1)> _
Property ImportPath As String
Get
Return _ImportPath
End Get
Set(value As String)
SetPropertyValue("ImportPath", _ImportPath, value)
End Set
End Property
Property DeleteAfterImport As Boolean
Get
Return _DeleteAfterImport
End Get
Set(value As Boolean)
SetPropertyValue("DeleteAfterImport", _DeleteAfterImport, value)
End Set
End Property
End Class
@@ -0,0 +1,7 @@
Public Enum eStoragePDACollectionHeaderStatus
eOpen = 0
eClosed = 1
eReady = 2
End Enum
@@ -0,0 +1,8 @@
Public Enum eStoragePDACollectionType
eIsInventory = 0
eIsLocationIn = 1 'Lokációra berakás
eIsLocationOut = 2 'Lokációról kiszedés
eInventorySurplus = 3 'Többletet tartalmazó, a betároláshoz
eInventoryWant = 4 'Hiányt tartalmazó, a kitároláshoz
End Enum