Reconfigure for GIT

This commit is contained in:
2017-03-26 20:00:03 +02:00
commit 00637826ab
8056 changed files with 535977 additions and 0 deletions
@@ -0,0 +1,70 @@
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.aInventoryParameters_CreateProductsListInSpread = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aInventoryHeader_UpdateInventorySpread = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
'
'aInventoryHeader_LoadSpreadFromParameters
'
'
'aInventoryParameters_CreateProductsListInSpread
'
Me.aInventoryParameters_CreateProductsListInSpread.Caption = "aInventoryParameters_CreateProductsListInSpread"
Me.aInventoryParameters_CreateProductsListInSpread.ConfirmationMessage = Nothing
Me.aInventoryParameters_CreateProductsListInSpread.Id = "aInventoryParameters_CreateProductsListInSpread"
Me.aInventoryParameters_CreateProductsListInSpread.ImageName = Nothing
Me.aInventoryParameters_CreateProductsListInSpread.Shortcut = Nothing
Me.aInventoryParameters_CreateProductsListInSpread.Tag = Nothing
Me.aInventoryParameters_CreateProductsListInSpread.TargetObjectsCriteria = Nothing
Me.aInventoryParameters_CreateProductsListInSpread.TargetObjectType = GetType(SISBusiness.[Module].InventoryParameters)
Me.aInventoryParameters_CreateProductsListInSpread.TargetViewId = Nothing
Me.aInventoryParameters_CreateProductsListInSpread.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aInventoryParameters_CreateProductsListInSpread.ToolTip = Nothing
Me.aInventoryParameters_CreateProductsListInSpread.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aInventoryHeader_UpdateInventorySpread
'
Me.aInventoryHeader_UpdateInventorySpread.Caption = "aInventoryHeader_UpdateInventorySpread"
Me.aInventoryHeader_UpdateInventorySpread.Category = "aInventoryHeader_UpdateInventorySpread"
Me.aInventoryHeader_UpdateInventorySpread.ConfirmationMessage = Nothing
Me.aInventoryHeader_UpdateInventorySpread.Id = "aInventoryHeader_UpdateInventorySpread"
Me.aInventoryHeader_UpdateInventorySpread.ImageName = Nothing
Me.aInventoryHeader_UpdateInventorySpread.Shortcut = Nothing
Me.aInventoryHeader_UpdateInventorySpread.Tag = Nothing
Me.aInventoryHeader_UpdateInventorySpread.TargetObjectsCriteria = Nothing
Me.aInventoryHeader_UpdateInventorySpread.TargetObjectType = GetType(SISBusiness.[Module].InventoryHeader)
Me.aInventoryHeader_UpdateInventorySpread.TargetViewId = Nothing
Me.aInventoryHeader_UpdateInventorySpread.ToolTip = Nothing
Me.aInventoryHeader_UpdateInventorySpread.TypeOfView = Nothing
End Sub
Friend WithEvents aInventoryParameters_CreateProductsListInSpread As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aInventoryHeader_UpdateInventorySpread As DevExpress.ExpressApp.Actions.SimpleAction
End Class
@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="aInventoryHeader_LoadSpreadFromParameters.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>342, 95</value>
</metadata>
<metadata name="aInventoryParameters_CreateProductsListInSpread.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="aInventoryHeader_UpdateInventorySpread.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 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,381 @@
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 FarPoint.Win.Spread
Imports DevExpress.ExpressApp.SystemModule
Imports DevExpress.ExpressApp.CloneObject
Imports System.IO
Imports DevExpress.ExpressApp.Editors
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering
Public Class InventoryVC
Inherits SISBusiness.Module.InventoryVC
Private _FpSpread As FpSpread
Dim _WaitFormClass As New WaitFormClass
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
AddHandler DoWork, AddressOf _WaitFormClass.DoWork
AddHandler InitWork, AddressOf _WaitFormClass.Initwork
AddHandler FinalWork, AddressOf _WaitFormClass.Finalwork
If View.Id = "InventoryHeader_DetailView" Then
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
AddHandler Frame.GetController(Of ModificationsController)().SaveAction.Executing, AddressOf InventoryHeader_DetailView_SaveAction_Executing
AddHandler Frame.GetController(Of ModificationsController)().SaveAndCloseAction.Executing, AddressOf InventoryHeader_DetailView_SaveAction_Executing
AddHandler Frame.GetController(Of ModificationsController)().SaveAndNewAction.Executing, AddressOf InventoryHeader_DetailView_SaveAction_Executing
Dim _InventoryHeader As InventoryHeader = TryCast(View.SelectedObjects(0), InventoryHeader)
AddHandler _InventoryHeader.Changed, AddressOf InventoryHeader_DetailView_SetWorksheetTemplateXLS_Changed
End If
If View.Id = "InventoryParameters_DetailView" Then
AddHandler Frame.GetController(Of ModificationsController)().SaveAction.Executing, AddressOf InventoryHeader_DetailView_SaveAction_Executing
AddHandler Frame.GetController(Of ModificationsController)().SaveAndCloseAction.Executing, AddressOf InventoryHeader_DetailView_SaveAction_Executing
AddHandler Frame.GetController(Of ModificationsController)().SaveAndNewAction.Executing, AddressOf InventoryHeader_DetailView_SaveAction_Executing
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
RemoveHandler DoWork, AddressOf _WaitFormClass.DoWork
RemoveHandler InitWork, AddressOf _WaitFormClass.Initwork
RemoveHandler FinalWork, AddressOf _WaitFormClass.Finalwork
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)
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAction.Executing, AddressOf InventoryHeader_DetailView_SaveAction_Executing
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAndCloseAction.Executing, AddressOf InventoryHeader_DetailView_SaveAction_Executing
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAndNewAction.Executing, AddressOf InventoryHeader_DetailView_SaveAction_Executing
End If
If View.Id = "InventoryParameters_DetailView" Then
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAction.Executing, AddressOf InventoryHeader_DetailView_SaveAction_Executing
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAndCloseAction.Executing, AddressOf InventoryHeader_DetailView_SaveAction_Executing
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAndNewAction.Executing, AddressOf InventoryHeader_DetailView_SaveAction_Executing
End If
End Sub
Protected Overrides Sub OnViewControlsCreated()
MyBase.OnViewControlsCreated()
If View.Id = "InventoryHeader_DetailView" Or View.Id = "InventoryParameters_DetailView" Then
Dim _DetailView As DetailView = TryCast(View, DetailView)
Dim _ExcelControlViewItem As ViewItem
If _DetailView IsNot Nothing Then
If _DetailView.GetItems(Of ExcelPropertyEditor).Count > 0 Then
_ExcelControlViewItem = _DetailView.GetItems(Of ExcelPropertyEditor)(0)
If _ExcelControlViewItem IsNot Nothing Then
AddHandler _ExcelControlViewItem.ControlCreated, AddressOf ExcelControlViewItem_ControlCreated
End If
End If
End If
End If
End Sub
Private Sub InventoryHeader_DetailView_SaveAction_Executing(sender As Object, e As CancelEventArgs)
Dim _FileName As String = Path.GetTempPath & "InSpread.xml"
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
If View.Id = "InventoryHeader_DetailView" Then
Dim _InventoryHeader As InventoryHeader = TryCast(View.SelectedObjects(0), InventoryHeader)
If _InventoryHeader IsNot Nothing Then
If _FpSpread IsNot Nothing Then
If Not String.IsNullOrEmpty(_InventoryHeader.DocumentNumber) Then
_FpSpread.Save(_StreamFile, False)
_StreamFile.Close()
Dim _StreamFile2 As New FileStream(_FileName, FileMode.Open)
_InventoryHeader.ExcelFile = New FileData(_ocur.Session)
_InventoryHeader.ExcelFile.LoadFromStream("Excel worksheet.xls", _StreamFile2)
_InventoryHeader.Save()
_StreamFile2.Close()
End If
End If
End If
End If
If View.Id = "InventoryParameters_DetailView" Then
Dim _InventoryParameters As InventoryParameters = TryCast(View.SelectedObjects(0), InventoryParameters)
If _InventoryParameters IsNot Nothing Then
If _FpSpread IsNot Nothing Then
_FpSpread.Save(_StreamFile, False)
_StreamFile.Close()
Dim _StreamFile2 As New FileStream(_FileName, FileMode.Open)
_InventoryParameters.ExcelFile = New FileData(_ocur.Session)
_InventoryParameters.ExcelFile.LoadFromStream("Excel worksheet.xls", _StreamFile2)
_InventoryParameters.Save()
_StreamFile2.Close()
End If
End If
End If
End Sub
Private Sub ExcelControlViewItem_ControlCreated(sender As Object, e As EventArgs)
Dim itemControl As Object = (CType(sender, ViewItem)).Control
_FpSpread = TryCast(itemControl, ExcelUserControl).FpSpreadControl
Dim _FileName As String = Path.GetTempPath & "OutSpread.xml"
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
If View.Id = "InventoryHeader_DetailView" Then
Dim _InventoryHeader As InventoryHeader = TryCast(View.SelectedObjects(0), InventoryHeader)
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
If Not _ocur.Session.IsNewObject(_InventoryHeader) Then
If _InventoryHeader IsNot Nothing Then
If _InventoryHeader.ExcelFile IsNot Nothing Then
_InventoryHeader.ExcelFile.SaveToStream(_StreamFile)
_StreamFile.Close()
_FpSpread.Open(_FileName)
End If
End If
End If
End If
If View.Id = "InventoryParameters_DetailView" Then
Dim _InventoryParameters As InventoryParameters = TryCast(View.SelectedObjects(0), InventoryParameters)
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
If Not _ocur.Session.IsNewObject(_InventoryParameters) Then
If _InventoryParameters IsNot Nothing Then
If _InventoryParameters.ExcelFile IsNot Nothing Then
_InventoryParameters.ExcelFile.SaveToStream(_StreamFile)
_StreamFile.Close()
_FpSpread.Open(_FileName)
End If
End If
End If
End If
End Sub
Private Sub InventoryHeader_DetailView_SetWorksheetTemplateXLS_Changed(sender As Object, e As DevExpress.Xpo.ObjectChangeEventArgs)
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _InventoryHeader As InventoryHeader = TryCast(View.SelectedObjects(0), InventoryHeader)
If _InventoryHeader.ExcelFile Is Nothing Then
If _InventoryHeader.InventoryParameters.ExcelFile IsNot Nothing Then
_InventoryHeader.ExcelFile = _InventoryHeader.InventoryParameters.ExcelFile
If _InventoryHeader.ExcelFile IsNot Nothing Then
Dim _FileName As String = Path.GetTempPath & "Temp.xls"
Dim _StreamFile As FileStream = Nothing
_StreamFile = File.Create(_FileName)
_InventoryHeader.ExcelFile.SaveToStream(_StreamFile)
If TryCast(View, DetailView).GetItems(Of ExcelPropertyEditor)(0).ExcelUserControl IsNot Nothing Then
_FpSpread = TryCast(View, DetailView).GetItems(Of ExcelPropertyEditor)(0).ExcelUserControl.FpSpreadControl
_StreamFile.Close()
_FpSpread.OpenExcel(_FileName)
End If
End If
End If
End If
End Sub
Private Sub aInventoryParameters_CreateProductsListInSpread_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aInventoryParameters_CreateProductsListInSpread.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _Products_Collection As New XPCollection(Of Products)(_ocur.Session, CriteriaOperator.Parse("DangerClass<>0"))
_Products_Collection.Sorting.Add(New SortProperty("ShortName", DB.SortingDirection.Ascending))
If _FpSpread IsNot Nothing Then
_FpSpread.Reset()
_FpSpread.ActiveSheet.ColumnCount = 11
_FpSpread.ActiveSheet.RowCount = 4 + _Products_Collection.Count
_FpSpread.AllowDragFill = True
_FpSpread.AllowColumnMove = True
_FpSpread.AllowRowMove = True
LoadXLSHeader()
_FpSpread.ActiveSheet.Columns(1).AllowAutoFilter = True
'_FpSpread.ActiveSheet.GroupBarInfo.Visible = True
'_FpSpread.ActiveSheet.AllowGroup = True
Dim _RowIndex As Integer = 4 '5. sor
For Each _Products As Products In _Products_Collection
_FpSpread.ActiveSheet.Cells(_RowIndex, 0).Text = _Products.Oid.ToString
_FpSpread.ActiveSheet.Cells(_RowIndex, 1).Text = _Products.ShortName.Replace(vbNewLine, " ")
_RowIndex += 1
Next
_FpSpread.Refresh()
End If
End Sub
Private Sub LoadXLSHeader()
_FpSpread.ActiveSheet.AddSpanCell(0, 0, 1, 11)
With _FpSpread.ActiveSheet.Cells(0, 0)
.Text = "A/2 adatlap: ÜZEMADATOK-VESZÉLYES ANYAGOK"
.HorizontalAlignment = CellHorizontalAlignment.Center
.VerticalAlignment = CellVerticalAlignment.Center
End With
_FpSpread.ActiveSheet.AddSpanCell(1, 0, 2, 1)
With _FpSpread.ActiveSheet.Cells(1, 0)
.Text = "Termék OID"
.HorizontalAlignment = CellHorizontalAlignment.Center
.VerticalAlignment = CellVerticalAlignment.Justify
.Row.Height = 40
End With
_FpSpread.ActiveSheet.AddSpanCell(1, 1, 2, 1)
With _FpSpread.ActiveSheet.Cells(1, 1)
.Text = "A nem nevesített veszélyes anyag megnevezése (az 1. melléklet 2. táblázat alapján)"
.HorizontalAlignment = CellHorizontalAlignment.Center
.VerticalAlignment = CellVerticalAlignment.Justify
End With
_FpSpread.ActiveSheet.AddSpanCell(1, 2, 1, 4)
With _FpSpread.ActiveSheet.Cells(1, 2)
.Text = "Nemzetközileg elfogadott egyértelmû azonosítása (CAS-szám, szükség szerint IUPAC név, kereskedelmi megnevezés, empirikus formula)"
.HorizontalAlignment = CellHorizontalAlignment.Center
.VerticalAlignment = CellVerticalAlignment.Justify
End With
_FpSpread.ActiveSheet.AddSpanCell(1, 6, 1, 3)
With _FpSpread.ActiveSheet.Cells(1, 6)
.Text = "A veszélyes anyag 1. melléklet 2. táblázat 1. oszlopa szerinti veszélyességi osztályba sorolása az R mondatok és az ADR szerinti osztályozás feltüntetésével"
.HorizontalAlignment = CellHorizontalAlignment.Center
.VerticalAlignment = CellVerticalAlignment.Justify
End With
_FpSpread.ActiveSheet.AddSpanCell(1, 9, 2, 1)
With _FpSpread.ActiveSheet.Cells(1, 9)
.Text = "Jelen lévõ maximális mennyisége (tonna)"
.HorizontalAlignment = CellHorizontalAlignment.Center
.VerticalAlignment = CellVerticalAlignment.Justify
End With
_FpSpread.ActiveSheet.AddSpanCell(1, 10, 2, 1)
With _FpSpread.ActiveSheet.Cells(1, 10)
.Text = "A besorolásnál figyelembe vett küszöbmennyiség (tonna)"
.HorizontalAlignment = CellHorizontalAlignment.Center
.VerticalAlignment = CellVerticalAlignment.Justify
End With
With _FpSpread.ActiveSheet.Cells(2, 2)
.Text = "CAS szám"
.HorizontalAlignment = CellHorizontalAlignment.Center
.VerticalAlignment = CellVerticalAlignment.Justify
.Row.Height = 40
End With
With _FpSpread.ActiveSheet.Cells(2, 3)
.Text = "IUPAC név"
.HorizontalAlignment = CellHorizontalAlignment.Center
.VerticalAlignment = CellVerticalAlignment.Justify
End With
With _FpSpread.ActiveSheet.Cells(2, 4)
.Text = "kereskedelmi megnevezés"
.HorizontalAlignment = CellHorizontalAlignment.Center
.VerticalAlignment = CellVerticalAlignment.Justify
End With
With _FpSpread.ActiveSheet.Cells(2, 5)
.Text = "empirikus formula"
.HorizontalAlignment = CellHorizontalAlignment.Center
.VerticalAlignment = CellVerticalAlignment.Justify
End With
With _FpSpread.ActiveSheet.Cells(2, 6)
.Text = "R mondatok"
.HorizontalAlignment = CellHorizontalAlignment.Center
.VerticalAlignment = CellVerticalAlignment.Justify
End With
With _FpSpread.ActiveSheet.Cells(2, 7)
.Text = "ADR osztály"
.HorizontalAlignment = CellHorizontalAlignment.Center
.VerticalAlignment = CellVerticalAlignment.Justify
End With
With _FpSpread.ActiveSheet.Cells(2, 8)
.Text = "Az 1. melléklet 2. táblázat 1. oszlopa szerinti osztályba sorolás"
.HorizontalAlignment = CellHorizontalAlignment.Center
.VerticalAlignment = CellVerticalAlignment.Justify
End With
For ik = 0 To 5
With _FpSpread.ActiveSheet.Cells(3, ik)
.Text = ik.ToString + "."
.HorizontalAlignment = CellHorizontalAlignment.Center
.VerticalAlignment = CellVerticalAlignment.Center
End With
Next
For ik = 9 To 10
With _FpSpread.ActiveSheet.Cells(3, ik)
.Text = (ik - 2).ToString + "."
.HorizontalAlignment = CellHorizontalAlignment.Center
.VerticalAlignment = CellVerticalAlignment.Center
End With
Next
_FpSpread.ActiveSheet.AddSpanCell(3, 6, 1, 3)
With _FpSpread.ActiveSheet.Cells(3, 6)
.Text = "6."
.HorizontalAlignment = CellHorizontalAlignment.Center
.VerticalAlignment = CellVerticalAlignment.Center
End With
End Sub
Private Sub aInventoryHeader_LoadSpreadFromParameters_Execute_1(sender As Object, e As SimpleActionExecuteEventArgs) Handles aInventoryHeader_LoadSpreadFromParameters.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _InventoryHeader As InventoryHeader = TryCast(View.SelectedObjects(0), InventoryHeader)
If _InventoryHeader IsNot Nothing Then
If _InventoryHeader.InventoryParameters IsNot Nothing Then
If _InventoryHeader.InventoryParameters.ExcelFile IsNot Nothing Then
_InventoryHeader.ExcelFile = _InventoryHeader.InventoryParameters.ExcelFile
End If
End If
End If
_ocur.CommitChanges()
Dim _FileName As String = Path.GetTempPath & "InSpread.xls"
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
_InventoryHeader.ExcelFile.SaveToStream(_StreamFile)
_StreamFile.Close()
_FpSpread.Open(_FileName)
_FpSpread.Refresh()
End Sub
Private Sub aInventoryHeader_UpdateInventorySpread_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aInventoryHeader_UpdateInventorySpread.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _InventoryHeader As InventoryHeader = TryCast(View.SelectedObjects(0), InventoryHeader)
If _FpSpread IsNot Nothing Then
_WaitFormClass.Initwork(1, 1, _FpSpread.ActiveSheet.RowCount - 1)
For ik = 4 To _FpSpread.ActiveSheet.RowCount - 1
_WaitFormClass.DoWork()
Dim _InventorySC As InventorySC = _ocur.FindObject(Of InventorySC)(CriteriaOperator.Parse("InventoryHeader=? AND Products.Oid=?", _InventoryHeader, _FpSpread.ActiveSheet.Cells(ik, 0).Text))
If _InventorySC IsNot Nothing Then
Select Case UCase(_InventorySC.Products.Units.ShortName)
Case "KG"
_FpSpread.ActiveSheet.Cells(ik, 9).Value = Format(_InventorySC.QTT / 1000, "#,##0.0000")
Case "T"
_FpSpread.ActiveSheet.Cells(ik, 9).Value = Format(_InventorySC.QTT, "#,##0.0000")
Case "L", "I"
_FpSpread.ActiveSheet.Cells(ik, 9).Value = Format(_InventorySC.QTT / 1000, "#,##0.0000")
Case Else
_FpSpread.ActiveSheet.Cells(ik, 9).Value = Format(0, "#,##0.0000")
End Select
End If
Next
_FpSpread.Refresh()
_Waitformclass.FinalWork()
End If
End Sub
End Class
@@ -0,0 +1,32 @@
Partial Class InventoryVC_ListView
<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()
components = New System.ComponentModel.Container()
End Sub
End Class
@@ -0,0 +1,62 @@
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.Win.Editors
Public Class InventoryVC_ListView
Inherits DevExpress.ExpressApp.ViewController(Of ListView)
Private _GridListEditor As GridListEditor
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnViewControlsCreated()
MyBase.OnViewControlsCreated()
If View.Id = "InventoryHeader_InventorySC_ListView" Then
_GridListEditor = TryCast(View.Editor, GridListEditor)
If _GridListEditor IsNot Nothing Then
AddHandler _GridListEditor.GridView.CellValueChanged, AddressOf InventoryHeader_InventorySC_ListView_CellValueChanged
End If
'If _GridListEditor IsNot Nothing Then
' _GridListEditor.AllowEdit = True
' For i As Integer = 0 To _GridListEditor.Columns.Count - 1
' If _GridListEditor.GridView.Columns(i).FieldName <> "QTT_Found" Then
' _GridListEditor.GridView.Columns(i).OptionsColumn.ReadOnly = True
' _GridListEditor.GridView.Columns(i).OptionsColumn.AllowEdit = False
' _GridListEditor.GridView.Columns(i).OptionsColumn.TabStop = False
' End If
' Next i
'End If
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "InventoryHeader_InventorySC_ListView" Then
If _GridListEditor IsNot Nothing Then
RemoveHandler _GridListEditor.GridView.CellValueChanged, AddressOf InventoryHeader_InventorySC_ListView_CellValueChanged
End If
End If
End Sub
Private Sub InventoryHeader_InventorySC_ListView_CellValueChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs)
Dim nestedFrame As NestedFrame = TryCast(Frame, NestedFrame)
If nestedFrame IsNot Nothing Then
Dim parentView As View = nestedFrame.View
parentView.ObjectSpace.CommitChanges()
parentView.ObjectSpace.Refresh()
End If
End Sub
End Class
@@ -0,0 +1,32 @@
Partial Class StorageMoveEventsVC
<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()
components = New System.ComponentModel.Container()
End Sub
End Class
@@ -0,0 +1,48 @@
Imports Microsoft.VisualBasic
Imports System
Imports System.Linq
Imports System.Text
Imports DevExpress.ExpressApp
Imports DevExpress.Data.Filtering
Imports System.Collections.Generic
Imports DevExpress.Persistent.Base
Imports DevExpress.ExpressApp.Utils
Imports DevExpress.ExpressApp.Layout
Imports DevExpress.ExpressApp.Actions
Imports DevExpress.ExpressApp.Editors
Imports DevExpress.ExpressApp.Templates
Imports DevExpress.Persistent.Validation
Imports DevExpress.ExpressApp.SystemModule
Imports DevExpress.ExpressApp.Model.NodeGenerators
' For more typical usage scenarios, be sure to check out http://documentation.devexpress.com/#Xaf/clsDevExpressExpressAppViewControllertopic.
Partial Public Class StorageMoveEventsVC
Inherits SISBusiness.Module.StorageMoveEventsVC
Dim _WaitFormClass As New WaitFormClass
Public Sub New()
InitializeComponent()
RegisterActions(components)
' Target required Views (via the TargetXXX properties) and create their Actions.
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
' Perform various tasks depending on the target View.
AddHandler DoWork, AddressOf _WaitFormClass.DoWork
AddHandler InitWork, AddressOf _WaitFormClass.Initwork
AddHandler FinalWork, AddressOf _WaitFormClass.Finalwork
End Sub
Protected Overrides Sub OnViewControlsCreated()
MyBase.OnViewControlsCreated()
' Access and customize the target View control.
End Sub
Protected Overrides Sub OnDeactivated()
' Unsubscribe from previously subscribed events and release other references and resources.
RemoveHandler DoWork, AddressOf _WaitFormClass.DoWork
RemoveHandler InitWork, AddressOf _WaitFormClass.Initwork
RemoveHandler FinalWork, AddressOf _WaitFormClass.Finalwork
MyBase.OnDeactivated()
End Sub
End Class
@@ -0,0 +1,32 @@
Partial Class StorageComputedVC
<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()
components = New System.ComponentModel.Container()
End Sub
End Class
@@ -0,0 +1,37 @@
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
Public Class StorageComputedVC
Inherits SISBusiness.Module.StorageComputedVC
Dim _WaitFormClass As New WaitFormClass
Public Sub New()
MyBase.New()
'This call is required by the Component Designer.
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
AddHandler DoWork, AddressOf _WaitFormClass.DoWork
AddHandler InitWork, AddressOf _WaitFormClass.Initwork
AddHandler FinalWork, AddressOf _WaitFormClass.Finalwork
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
RemoveHandler DoWork, AddressOf _WaitFormClass.DoWork
RemoveHandler InitWork, AddressOf _WaitFormClass.Initwork
RemoveHandler FinalWork, AddressOf _WaitFormClass.Finalwork
End Sub
End Class
@@ -0,0 +1,32 @@
Partial Class StorageDateVC
<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()
components = New System.ComponentModel.Container()
End Sub
End Class
@@ -0,0 +1,36 @@
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
Public Class StorageDateVC
Inherits SISBusiness.Module.StorageDateVC
Private _WaitFormClass As WaitFormClass
Public Sub New()
MyBase.New()
'This call is required by the Component Designer.
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
_WaitFormClass = New WaitFormClass
AddHandler DoWork, AddressOf _WaitFormClass.DoWork
AddHandler InitWork, AddressOf _WaitFormClass.Initwork
AddHandler FinalWork, AddressOf _WaitFormClass.FinalWork
End Sub
Protected Overrides Sub OnDeactivated()
RemoveHandler DoWork, AddressOf _WaitFormClass.DoWork
RemoveHandler InitWork, AddressOf _WaitFormClass.Initwork
RemoveHandler FinalWork, AddressOf _WaitFormClass.FinalWork
MyBase.OnDeactivated()
End Sub
End Class
@@ -0,0 +1,32 @@
Partial Class StorageIn_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()
components = New System.ComponentModel.Container()
End Sub
End Class
@@ -0,0 +1,146 @@
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.Win.Editors
Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering
Imports DevExpress.ExpressApp.SystemModule
Imports DevExpress.XtraGrid.Columns
Public Class StorageIn_VC
Inherits DevExpress.ExpressApp.ViewController
Private _GridListEditor As GridListEditor
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
If View.Id = "StorageInHeader_DetailView" Then
AddHandler View.ControlsCreated, AddressOf StorageInHeader_DetailView_ControlCreated
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "StorageInHeader_StorageInRows_ListView" Then
If _GridListEditor IsNot Nothing Then
RemoveHandler _GridListEditor.GridView.CellValueChanged, AddressOf StorageInHeader_StorageInRows_ListView_CellValueChanged
End If
End If
End Sub
Protected Overrides Sub OnViewControlsCreated()
MyBase.OnViewControlsCreated()
If View.Id = "StorageInRows_ListView" Or _
View.Id = "StorageInHeader_StorageInRows_ListView" Then
_GridListEditor = TryCast(TryCast(View, ListView).Editor, GridListEditor)
If _GridListEditor IsNot Nothing Then
AddHandler _GridListEditor.GridView.CellValueChanged, AddressOf StorageInHeader_StorageInRows_ListView_CellValueChanged
End If
'If _GridListEditor IsNot Nothing Then
' _GridListEditor.AllowEdit = True
' For i As Integer = 0 To _GridListEditor.Columns.Count - 1
' If _GridListEditor.GridView.Columns(i).FieldName <> "QTT_Will" Then
' _GridListEditor.GridView.Columns(i).OptionsColumn.ReadOnly = True
' _GridListEditor.GridView.Columns(i).OptionsColumn.AllowEdit = False
' _GridListEditor.GridView.Columns(i).OptionsColumn.TabStop = False
' End If
' Next i
'End If
End If
End Sub
Private Sub StorageInHeader_StorageInRows_ListView_CellValueChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs)
If TryCast(e.Column, GridColumn).FieldName = "QTT_Will" Then
Dim nestedFrame As NestedFrame = TryCast(Frame, NestedFrame)
If nestedFrame IsNot Nothing Then
Try
Dim parentView As View = nestedFrame.View
Dim _uow As New UnitOfWork(TryCast(parentView.ObjectSpace, Xpo.XPObjectSpace).Session.DataLayer)
Dim _StorageInRows As StorageInRows = _uow.GetObjectByKey(Of StorageInRows)(TryCast(View.SelectedObjects(0), StorageInRows).Oid)
If _StorageInRows.StorageInHeader.IsStorno = False Then
Dim _StorageComputed As StorageComputed = _uow.FindObject(Of StorageComputed)(CriteriaOperator.Parse("Storage=? AND Products=?", _StorageInRows.StorageInHeader.Storage, _StorageInRows.Products))
Dim _FullResource As Double = _StorageComputed.QTTFree + _StorageComputed.QTTReservedIn
Dim _StorageInRows_QTT_Will_Sum As Double = 0
_StorageInRows.QTT_Will = e.Value
_StorageInRows.Save()
Dim _StorageInRows_Collection As New XPCollection(Of StorageInRows)(PersistentCriteriaEvaluationBehavior.InTransaction, TryCast(_uow, Session), CriteriaOperator.Parse("Products=? AND StorageInHeader.Storage=?", _StorageInRows.Products, _StorageInRows.StorageInHeader.Storage))
For Each _StorageInRows_Collection_Item As StorageInRows In _StorageInRows_Collection
_StorageInRows_QTT_Will_Sum += _StorageInRows_Collection_Item.QTT_Will
Next
_StorageComputed.QTTReservedIn = _StorageInRows_QTT_Will_Sum
_uow.CommitChanges()
If Frame.GetController(Of RefreshController).RefreshAction.Active Then
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
End If
End If
Catch exp As Exception
MsgBox(exp.Message)
End Try
End If
End If
End Sub
Private Sub StorageInHeader_DetailView_ControlCreated(sender As Object, e As EventArgs)
If View.Id = "StorageInHeader_DetailView" Then
Dim _row_Products_Editor As DevExpress.ExpressApp.Win.Editors.LookupPropertyEditor
_row_Products_Editor = TryCast(View, DetailView).FindItem("row_Products")
AddHandler _row_Products_Editor.ControlValueChanged, AddressOf _row_Products_Editor_ControlValueChanged
End If
End Sub
Private Sub _row_Products_Editor_ControlValueChanged(sender As Object, e As EventArgs)
Dim _row_QTT As DevExpress.ExpressApp.Win.Editors.DoublePropertyEditor
_row_QTT = TryCast(View, DetailView).FindItem("row_QTT_WILL")
If _row_QTT IsNot Nothing Then
Dim _row_Products_Editor As DevExpress.ExpressApp.Win.Editors.LookupPropertyEditor
_row_Products_Editor = TryCast(View, DetailView).FindItem("row_Products")
If _row_Products_Editor IsNot Nothing Then
Dim _Products As SISBusiness.Module.Products = TryCast(_row_Products_Editor.ControlValue, SISBusiness.Module.Products)
If _Products IsNot Nothing Then
Dim _SpinEdit As DevExpress.XtraEditors.SpinEdit
_SpinEdit = TryCast(_row_QTT.Control, DevExpress.XtraEditors.SpinEdit)
If _SpinEdit IsNot Nothing Then
Select Case _Products.DecimalIn
Case 0
_SpinEdit.Properties.Mask.EditMask = "#,##0"
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
Case 1
_SpinEdit.Properties.Mask.EditMask = "#,##0.0"
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
Case 2
_SpinEdit.Properties.Mask.EditMask = "#,##0.00"
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
Case 3
_SpinEdit.Properties.Mask.EditMask = "#,##0.000"
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
Case 4
_SpinEdit.Properties.Mask.EditMask = "#,##0.0000"
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
Case Else
_SpinEdit.Properties.Mask.EditMask = ""
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = False
End Select
End If
End If
End If
End If
End Sub
End Class
@@ -0,0 +1,32 @@
Partial Class StorageOut_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()
components = New System.ComponentModel.Container()
End Sub
End Class
@@ -0,0 +1,80 @@
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
Public Class StorageOut_VC
Inherits DevExpress.ExpressApp.ViewController
Public Sub New()
MyBase.New()
'This call is required by the Component Designer.
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
If View.Id = "StorageOutHeader_DetailView" Then
AddHandler View.ControlsCreated, AddressOf StorageOutHeader_DetailView_ControlCreated
End If
End Sub
Private Sub StorageOutHeader_DetailView_ControlCreated(sender As Object, e As EventArgs)
If View.Id = "StorageOutHeader_DetailView" Then
Dim _row_StorageComputed_Editor As DevExpress.ExpressApp.Win.Editors.LookupPropertyEditor
_row_StorageComputed_Editor = TryCast(View, DetailView).FindItem("row_StorageComputed")
AddHandler _row_StorageComputed_Editor.ControlValueChanged, AddressOf _row_StorageComputed_Editor_ControlValueChanged
End If
End Sub
Private Sub _row_StorageComputed_Editor_ControlValueChanged(sender As Object, e As EventArgs)
Dim _row_QTT As DevExpress.ExpressApp.Win.Editors.DoublePropertyEditor
Dim _OrderInHeader As OrderInHeader = TryCast(View.SelectedObjects(0), OrderInHeader)
_row_QTT = TryCast(View, DetailView).FindItem("row_QTT")
If _row_QTT IsNot Nothing Then
Dim _row_StorageComputed_Editor As DevExpress.ExpressApp.Win.Editors.LookupPropertyEditor
_row_StorageComputed_Editor = TryCast(View, DetailView).FindItem("row_StorageComputed")
If _row_StorageComputed_Editor IsNot Nothing Then
Dim _StorageComputed As SISBusiness.Module.StorageComputed = TryCast(_row_StorageComputed_Editor.ControlValue, SISBusiness.Module.StorageComputed)
If _StorageComputed IsNot Nothing Then
If _StorageComputed.Products IsNot Nothing Then
Dim _SpinEdit As DevExpress.XtraEditors.SpinEdit
_SpinEdit = TryCast(_row_QTT.Control, DevExpress.XtraEditors.SpinEdit)
If _SpinEdit IsNot Nothing Then
Select Case _StorageComputed.Products.DecimalOut
Case 0
_SpinEdit.Properties.Mask.EditMask = "#,##0"
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
Case 1
_SpinEdit.Properties.Mask.EditMask = "#,##0.0"
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
Case 2
_SpinEdit.Properties.Mask.EditMask = "#,##0.00"
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
Case 3
_SpinEdit.Properties.Mask.EditMask = "#,##0.000"
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
Case 4
_SpinEdit.Properties.Mask.EditMask = "#,##0.0000"
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
Case Else
_SpinEdit.Properties.Mask.EditMask = ""
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = False
End Select
End If
End If
End If
End If
End If
End Sub
End Class
@@ -0,0 +1,32 @@
Partial Class StorageTransactionIn_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()
components = New System.ComponentModel.Container()
End Sub
End Class
@@ -0,0 +1,36 @@
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
Public Class StorageTransactionIn_VC
Inherits SISBusiness.Module.StorageTransactionsInVC
Dim _WaitFormClass As New WaitFormClass
Public Sub New()
MyBase.New()
'This call is required by the Component Designer.
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
AddHandler DoWork, AddressOf _WaitFormClass.DoWork
AddHandler InitWork, AddressOf _WaitFormClass.Initwork
AddHandler FinalWork, AddressOf _WaitFormClass.Finalwork
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
RemoveHandler DoWork, AddressOf _WaitFormClass.DoWork
RemoveHandler InitWork, AddressOf _WaitFormClass.Initwork
RemoveHandler FinalWork, AddressOf _WaitFormClass.Finalwork
End Sub
End Class
@@ -0,0 +1,32 @@
Partial Class StorageTransactionsVC
<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()
End Sub
End Class
@@ -0,0 +1,123 @@
<?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="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>
@@ -0,0 +1,81 @@
Imports System
Imports System.ComponentModel
Imports System.Collections.Generic
Imports System.Diagnostics
Imports System.Text
Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Actions
Imports DevExpress.Persistent.Base
Imports DevExpress.Xpo
Imports DevExpress.ExpressApp.Win.Editors
Imports DevExpress.XtraGrid.Columns
Imports DevExpress.XtraGrid.Views.Grid
Imports DevExpress.XtraEditors.Controls
Imports DevExpress.XtraEditors.Repository
Imports DevExpress.Data
Imports DevExpress.ExpressApp.Editors
Public Class StorageTransactionsVC
Inherits DevExpress.ExpressApp.ViewController(Of ListView) ' FIGYELNI!!!! CSAK LISTVIEW
Private _GridListEditor As GridListEditor
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnViewControlsCreated()
MyBase.OnViewControlsCreated()
If View.Id = "StorageMoveInfo_ProductFinderInfo_ListView" Then
Dim _GLE As GridListEditor = TryCast(View.Editor, GridListEditor)
If _GLE IsNot Nothing Then
If _GLE.GridView IsNot Nothing Then
_GLE.GridView.OptionsView.RowAutoHeight = True
'_GLE.GridView.OptionsView.ShowColumnHeaders = False
'_GLE.GridView.OptionsView.ShowVerticalLines = False
End If
End If
End If
End Sub
'Sub InitGridView()
' For i As Integer = 0 To _GridListEditor.Columns.Count - 1
' If _GridListEditor.GridView.Columns(i).FieldName <> "QTT_Will" Then
' _GridListEditor.GridView.Columns(i).OptionsColumn.ReadOnly = True
' _GridListEditor.GridView.Columns(i).OptionsColumn.AllowEdit = False
' _GridListEditor.GridView.Columns(i).OptionsColumn.TabStop = False
' End If
' Next i
'End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
If View.Id Like "Storage*Header_DetailView" Then
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.WinModificationsController).ModificationsHandlingMode = SystemModule.ModificationsHandlingMode.AutoCommit
End If
If View.Id = "StorageInHeader_StorageInRows_ListView" Then
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.OpenObjectController)().Active.SetItemValue("", False)
End If
If View.Id = "StorageOutHeader_StorageOutRows_ListView" Then
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.OpenObjectController)().Active.SetItemValue("", False)
End If
If View.Id = "StorageOutRows_ListView_Order" Then
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.OpenObjectController)().Active.SetItemValue("", False)
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "StorageInHeader_StorageInRows_ListView" Then
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.OpenObjectController)().Active.SetItemValue("", True)
End If
If View.Id = "StorageOutHeader_StorageOutRows_ListView" Then
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.OpenObjectController)().Active.SetItemValue("", True)
End If
If View.Id = "StorageOutRows_ListView_Order" Then
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.OpenObjectController)().Active.SetItemValue("", True)
End If
End Sub
End Class