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,48 @@
Partial Class StorageOperation_VC
<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.aResetStorageForTest = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
'
'aResetStorageForTest
'
Me.aResetStorageForTest.Caption = "aReset Storage For Test"
Me.aResetStorageForTest.ConfirmationMessage = Nothing
Me.aResetStorageForTest.Id = "aResetStorageForTest"
Me.aResetStorageForTest.ImageName = "data_delete"
Me.aResetStorageForTest.Shortcut = Nothing
Me.aResetStorageForTest.Tag = Nothing
Me.aResetStorageForTest.TargetObjectsCriteria = Nothing
Me.aResetStorageForTest.TargetViewId = Nothing
Me.aResetStorageForTest.ToolTip = Nothing
Me.aResetStorageForTest.TypeOfView = Nothing
End Sub
Friend WithEvents aResetStorageForTest As DevExpress.ExpressApp.Actions.SimpleAction
End Class
@@ -0,0 +1,126 @@
<?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="aResetStorageForTest.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>173, 133</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,186 @@
Imports System
Imports System.ComponentModel
Imports System.Collections.Generic
Imports System.Diagnostics
Imports System.Text
Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Actions
Imports DevExpress.Persistent.Base
Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering
Public Class StorageOperation_VC
Inherits DevExpress.ExpressApp.ViewController
Dim _WaitFormClass As New WaitFormClass
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
Frame.GetController(Of StorageOperation_VC)().aResetStorageForTest.Active.SetItemValue("", False)
If View.Id = "ResetObjects_DetailView" Then
Frame.GetController(Of StorageOperation_VC)().aResetStorageForTest.Active.SetItemValue("", True)
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "ResetObjects_DetailView" Then
Frame.GetController(Of StorageOperation_VC)().aResetStorageForTest.Active.SetItemValue("", False)
End If
End Sub
Private Sub aResetStorageForTest_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aResetStorageForTest.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
Dim _StorageOutHeader_Collection As New XPCollection(Of StorageOutHeader)(_uow)
Dim _StorageOutRows_Collection As New XPCollection(Of StorageOutRows)(_uow)
Dim _StorageInHeader_Collection As New XPCollection(Of StorageInHeader)(_uow)
Dim _StorageInRows_Collection As New XPCollection(Of StorageInRows)(_uow)
Dim _StorageComputed_Collection As New XPCollection(Of StorageComputed)(_uow)
Dim _StorageMoveEvents_Collection As New XPCollection(Of StorageMoveEvents)(_uow)
Dim _StorageOutRowsInRows_Collection As New XPCollection(Of StorageOutRowsInRows)(_uow)
Dim _OrderInHeader_Collection As New XPCollection(Of OrderInHeader)(_uow)
Dim _OrderInRows_Collection As New XPCollection(Of OrderInRows)(_uow)
Dim _DeliveryNoteOutHeader_Collection As New XPCollection(Of DeliveryNoteOutHeader)(_uow)
Dim _DeliveryNoteOutRows_Collection As New XPCollection(Of DeliveryNoteOutRows)(_uow)
Dim _DeliveryNoteInHeader_Collection As New XPCollection(Of DeliveryNoteInHeader)(_uow)
Dim _DeliveryNoteInRows_Collection As New XPCollection(Of DeliveryNoteInRows)(_uow)
Dim _StorageComputedLocations_Collection As New XPCollection(Of StorageComputedLocations)(_uow)
Dim _StoragePDACollectionHeader_Collection As New XPCollection(Of StoragePDACollectionHeader)(_uow)
Dim _StoragePDACollectionRows_Collection As New XPCollection(Of StoragePDACollectionRows)(_uow)
_WaitFormClass.InitWork(1, 1, 16)
_WaitFormClass.DoWork()
_uow.Delete(_StorageComputed_Collection)
_WaitFormClass.DoWork()
_uow.Delete(_StorageInHeader_Collection)
_WaitFormClass.DoWork()
_uow.Delete(_StorageInRows_Collection)
_WaitFormClass.DoWork()
_uow.Delete(_StorageMoveEvents_Collection)
_WaitFormClass.DoWork()
_uow.Delete(_StorageOutHeader_Collection)
_WaitFormClass.DoWork()
_uow.Delete(_StorageOutRows_Collection)
_WaitFormClass.DoWork()
_uow.Delete(_StorageOutRowsInRows_Collection)
_WaitFormClass.DoWork()
_uow.Delete(_OrderInHeader_Collection)
_WaitFormClass.DoWork()
_uow.Delete(_OrderInRows_Collection)
_WaitFormClass.DoWork()
_uow.Delete(_DeliveryNoteInHeader_Collection)
_WaitFormClass.DoWork()
_uow.Delete(_DeliveryNoteInRows_Collection)
_WaitFormClass.DoWork()
_uow.Delete(_DeliveryNoteOutHeader_Collection)
_WaitFormClass.DoWork()
_uow.Delete(_DeliveryNoteOutRows_Collection)
_WaitFormClass.DoWork()
_uow.Delete(_StorageComputedLocations_Collection)
'_WaitFormClass.DoWork()
'_uow.Delete(_StoragePDACollectionHeader_Collection)
'_WaitFormClass.DoWork()
'_uow.Delete(_StoragePDACollectionRows_Collection)
_WaitFormClass.Finalwork
_uow.CommitChanges()
Dim _Products_Collection As New XPCollection(Of Products)(_uow)
Dim _Storage As Storage = _uow.FindObject(Of Storage)(CriteriaOperator.Parse("CustomersFrom.IsDefault=True"))
'_Storage = _uow.FindObject(Of Storage)(CriteriaOperator.Parse("ShortName=?", "Input anyag raktár"))
Dim _StorageInHeader As New StorageInHeader(_uow)
Dim _Rnd As New Random
_StorageInHeader.Storage = _Storage
_StorageInHeader.DocumentNumber = _Storage.NumberGeneratorIn.GetNewNumber(_Storage.NumberGeneratorIn)
_StorageInHeader.StorageMoveType = _uow.FindObject(Of StorageMoveType)(CriteriaOperator.Parse("MoveType=?", eMoveType.NormalInput))
_WaitFormClass.InitWork(1, 1, 10)
For ik = 1 To 100
_WaitFormClass.DoWork()
Dim _StorageInRows As New StorageInRows(_uow)
Dim _StorageComputed As StorageComputed
_StorageInRows.StorageInHeader = _StorageInHeader
_StorageInRows.Products = _Products_Collection(_Rnd.Next(0, _Products_Collection.Count))
_StorageInRows.QTT_Will = _Rnd.Next(1, 1000)
_StorageInRows.RowIndex = _StorageInHeader.StorageInRows.Count
_StorageComputed = _uow.FindObject(Of StorageComputed)(CriteriaOperator.Parse("Products=? and Storage=?", _StorageInRows.Products, _Storage))
If _StorageComputed Is Nothing Then
_StorageComputed = New StorageComputed(_uow)
_StorageComputed.Storage = _Storage
_StorageComputed.Products = _StorageInRows.Products
End If
_StorageComputed.QTTReservedIn += _StorageInRows.QTT_Will
Next
_WaitFormClass.Finalwork
_uow.CommitChanges()
_WaitFormClass.InitWork(1, 1, 3)
For ik = 0 To 3
_WaitFormClass.DoWork()
Dim _StorageInRows_ReNew As New StorageInRows(_uow)
Dim _StorageInHeader_ReNew As New StorageInHeader(_uow)
_StorageInRows_ReNew.StorageInHeader = _StorageInHeader_ReNew
_StorageInRows_ReNew.Products = _StorageInHeader.StorageInRows(ik).Products
_StorageInRows_ReNew.QTT_Will = _Rnd.Next(1, 1000)
_StorageInRows_ReNew.RowIndex = _StorageInHeader_ReNew.StorageInRows.Count
_StorageInHeader_ReNew.Storage = _StorageInHeader.Storage
_StorageInHeader_ReNew.DocumentNumber = _StorageInHeader.Storage.NumberGeneratorIn.GetNewNumber(_Storage.NumberGeneratorIn)
_StorageInHeader_ReNew.StorageMoveType = _StorageInHeader.StorageMoveType
Dim _StorageComputed_ReNew As StorageComputed = _uow.FindObject(Of StorageComputed)(CriteriaOperator.Parse("Products=? and Storage=?", _StorageInRows_ReNew.Products, _StorageInHeader_ReNew.Storage))
If _StorageComputed_ReNew Is Nothing Then
_StorageComputed_ReNew = New StorageComputed(_uow)
_StorageComputed_ReNew.Storage = _Storage
_StorageComputed_ReNew.Products = _StorageInRows_ReNew.Products
End If
_StorageComputed_ReNew.QTTReservedIn += _StorageInRows_ReNew.QTT_Will
Next ik
_WaitFormClass.Finalwork
_uow.CommitChanges()
Dim _OrderInHeader As New OrderInHeader(_uow)
Dim _Customers_Collection As New XPCollection(Of Customers)(_uow)
Dim _Contacts As Contacts = Nothing
_OrderInHeader.CustomersFrom = _uow.GetObjectByKey(Of CustomersFrom)(_StorageInHeader.Storage.CustomersFrom.Oid)
_OrderInHeader.Customers = _Customers_Collection(_Rnd.Next(0, _Customers_Collection.Count))
If _Contacts Is Nothing Then
_Contacts = New Contacts(_uow)
_Contacts.FirstName = "Tamás"
_Contacts.LastName = "Teszt"
End If
_OrderInHeader.Contacts = _Contacts
_OrderInHeader.OrderInParameters = _uow.FindObject(Of OrderInParameters)(CriteriaOperator.Parse("CustomersFrom=?", _OrderInHeader.CustomersFrom))
_OrderInHeader.DocumentNumber = _OrderInHeader.OrderInParameters.NumberGenerator.GetNewNumber(_OrderInHeader.OrderInParameters.NumberGenerator)
_OrderInHeader.PaymentOption = _uow.FindObject(Of PaymentOption)(CriteriaOperator.Parse("DefaultForBusinnes=True"))
_OrderInHeader.ShipmentOption = _uow.FindObject(Of ShipmentOption)(CriteriaOperator.Parse("1=1"))
Dim _StorageOutHeader As New StorageOutHeader(_uow)
_StorageOutHeader.CustomersFrom = _uow.GetObjectByKey(Of CustomersFrom)(_StorageInHeader.Storage.CustomersFrom.Oid)
_StorageOutHeader.Customers = _Customers_Collection(_Rnd.Next(0, _Customers_Collection.Count))
_StorageOutHeader.Storage = _StorageInHeader.Storage
_StorageOutHeader.DocumentNumber = _Storage.NumberGeneratorOut.GetNewNumber(_Storage.NumberGeneratorOut)
_StorageOutHeader.StorageMoveType = _uow.FindObject(Of StorageMoveType)(CriteriaOperator.Parse("Storage=? AND MoveType=?", _StorageOutHeader.Storage, eMoveType.Sales))
_uow.CommitChanges()
End Sub
End Class