First Testable Version

This commit is contained in:
Jonathan Jenne 2021-08-27 15:20:35 +02:00
parent b99627359a
commit f45540a283
14 changed files with 612 additions and 141 deletions

View File

@ -187,6 +187,12 @@
<Compile Include="Reports\OrderReport.vb"> <Compile Include="Reports\OrderReport.vb">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
<Compile Include="frmWaitForm.Designer.vb">
<DependentUpon>frmWaitForm.vb</DependentUpon>
</Compile>
<Compile Include="frmWaitForm.vb">
<SubType>Form</SubType>
</Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="frmMain.resx"> <EmbeddedResource Include="frmMain.resx">
@ -205,6 +211,9 @@
<EmbeddedResource Include="Reports\OrderReport.resx"> <EmbeddedResource Include="Reports\OrderReport.resx">
<DependentUpon>OrderReport.vb</DependentUpon> <DependentUpon>OrderReport.vb</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="frmWaitForm.resx">
<DependentUpon>frmWaitForm.vb</DependentUpon>
</EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="My Project\Application.myapp"> <None Include="My Project\Application.myapp">

View File

@ -14,8 +14,8 @@ Public Class PositionData
End Sub End Sub
Public Function Load(pMandator As Mandator, pData As Orders.Input.MESOWebService, pDataOriginal As Orders.Input.MESOWebService) As List(Of Position) Public Function Load(pMandator As Mandator, pData As Orders.Input.MESOWebService, pDataOriginal As Orders.Input.MESOWebService) As List(Of Position)
Dim oPositions = Orders.Helpers.GetOrderPositions(pData) Dim oPositions = Orders.Helpers.GetOrderPositions(Of Orders.Input.MESOWebServiceEXIMVRG_ordersT026)(pData)
Dim oPositionsOriginal = Orders.Helpers.GetOrderPositions(pDataOriginal) Dim oPositionsOriginal = Orders.Helpers.GetOrderPositions(Of Orders.Input.MESOWebServiceEXIMVRG_ordersT026)(pDataOriginal)
Dim oPositionList As New List(Of Position) Dim oPositionList As New List(Of Position)
For Each oPosition In oPositions For Each oPosition In oPositions

View File

@ -39,9 +39,9 @@ Partial Class frmMain
Me.btnReportPreview = New DevExpress.XtraBars.BarButtonItem() Me.btnReportPreview = New DevExpress.XtraBars.BarButtonItem()
Me.btnReloadDocument = New DevExpress.XtraBars.BarButtonItem() Me.btnReloadDocument = New DevExpress.XtraBars.BarButtonItem()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonGroupDataLoading = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonGroupData = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonGroupDataTransmission = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonGroupDocument = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonGroupDocument = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonGroupPositions = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonGroupPositions = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
@ -53,8 +53,7 @@ Partial Class frmMain
Me.SplitContainerControl1 = New DevExpress.XtraEditors.SplitContainerControl() Me.SplitContainerControl1 = New DevExpress.XtraEditors.SplitContainerControl()
Me.SplitContainerControl2 = New DevExpress.XtraEditors.SplitContainerControl() Me.SplitContainerControl2 = New DevExpress.XtraEditors.SplitContainerControl()
Me.LayoutControlHead = New DevExpress.XtraLayout.LayoutControl() Me.LayoutControlHead = New DevExpress.XtraLayout.LayoutControl()
Me.txtOrderIssuer = New DevExpress.XtraEditors.TextEdit() Me.txtInfoText = New DevExpress.XtraEditors.MemoEdit()
Me.MemoEdit1 = New DevExpress.XtraEditors.MemoEdit()
Me.txtOrderNumber = New DevExpress.XtraEditors.TextEdit() Me.txtOrderNumber = New DevExpress.XtraEditors.TextEdit()
Me.txtStreetName = New DevExpress.XtraEditors.TextEdit() Me.txtStreetName = New DevExpress.XtraEditors.TextEdit()
Me.txtPlace = New DevExpress.XtraEditors.TextEdit() Me.txtPlace = New DevExpress.XtraEditors.TextEdit()
@ -70,12 +69,14 @@ Partial Class frmMain
Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView() Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView()
Me.cmbDeliveryAddress = New DevExpress.XtraEditors.SearchLookUpEdit() Me.cmbDeliveryAddress = New DevExpress.XtraEditors.SearchLookUpEdit()
Me.GridView2 = New DevExpress.XtraGrid.Views.Grid.GridView() Me.GridView2 = New DevExpress.XtraGrid.Views.Grid.GridView()
Me.cmbYears = New DevExpress.XtraEditors.ComboBoxEdit() Me.cmbYear = New DevExpress.XtraEditors.ComboBoxEdit()
Me.txtCustomerGLN = New DevExpress.XtraEditors.TextEdit() Me.txtCustomerGLN = New DevExpress.XtraEditors.TextEdit()
Me.txtDeliveryAddressGLN = New DevExpress.XtraEditors.TextEdit() Me.txtDeliveryAddressGLN = New DevExpress.XtraEditors.TextEdit()
Me.txtDocumentReference = New DevExpress.XtraEditors.MemoEdit()
Me.txtName = New DevExpress.XtraEditors.TextEdit() Me.txtName = New DevExpress.XtraEditors.TextEdit()
Me.cmbDocumentKind = New DevExpress.XtraEditors.ComboBoxEdit() Me.cmbDocumentKind = New DevExpress.XtraEditors.ComboBoxEdit()
Me.cmbOrderIssuer = New DevExpress.XtraEditors.SearchLookUpEdit()
Me.GridView3 = New DevExpress.XtraGrid.Views.Grid.GridView()
Me.colContactName = New DevExpress.XtraGrid.Columns.GridColumn()
Me.Root = New DevExpress.XtraLayout.LayoutControlGroup() Me.Root = New DevExpress.XtraLayout.LayoutControlGroup()
Me.TabbedControlGroup2 = New DevExpress.XtraLayout.TabbedControlGroup() Me.TabbedControlGroup2 = New DevExpress.XtraLayout.TabbedControlGroup()
Me.LayoutControlGroup2 = New DevExpress.XtraLayout.LayoutControlGroup() Me.LayoutControlGroup2 = New DevExpress.XtraLayout.LayoutControlGroup()
@ -88,7 +89,6 @@ Partial Class frmMain
Me.LayoutControlItem13 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem13 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem1 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem1 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem4 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem4 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem14 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItemRunningNumber = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItemRunningNumber = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem11 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem11 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem3 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem3 = New DevExpress.XtraLayout.LayoutControlItem()
@ -102,6 +102,7 @@ Partial Class frmMain
Me.GridViewPositions = New DevExpress.XtraGrid.Views.Grid.GridView() Me.GridViewPositions = New DevExpress.XtraGrid.Views.Grid.GridView()
Me.SplitContainerControl3 = New DevExpress.XtraEditors.SplitContainerControl() Me.SplitContainerControl3 = New DevExpress.XtraEditors.SplitContainerControl()
Me.RichEditXml = New DevExpress.XtraRichEdit.RichEditControl() Me.RichEditXml = New DevExpress.XtraRichEdit.RichEditControl()
Me.SplashScreenManager1 = New DevExpress.XtraSplashScreen.SplashScreenManager(Me, GetType(Global.ImporterForm.frmWaitForm), True, True)
CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.ApplicationMenu1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.ApplicationMenu1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridControlFiles, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridControlFiles, System.ComponentModel.ISupportInitialize).BeginInit()
@ -112,8 +113,7 @@ Partial Class frmMain
Me.SplitContainerControl2.SuspendLayout() Me.SplitContainerControl2.SuspendLayout()
CType(Me.LayoutControlHead, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlHead, System.ComponentModel.ISupportInitialize).BeginInit()
Me.LayoutControlHead.SuspendLayout() Me.LayoutControlHead.SuspendLayout()
CType(Me.txtOrderIssuer.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.txtInfoText.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.MemoEdit1.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.txtOrderNumber.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.txtOrderNumber.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.txtStreetName.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.txtStreetName.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.txtPlace.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.txtPlace.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
@ -128,12 +128,13 @@ Partial Class frmMain
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.cmbDeliveryAddress.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.cmbDeliveryAddress.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridView2, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridView2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.cmbYears.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.cmbYear.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.txtCustomerGLN.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.txtCustomerGLN.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.txtDeliveryAddressGLN.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.txtDeliveryAddressGLN.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.txtDocumentReference.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.txtName.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.txtName.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.cmbDocumentKind.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.cmbDocumentKind.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.cmbOrderIssuer.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridView3, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Root, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.Root, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TabbedControlGroup2, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TabbedControlGroup2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlGroup2, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlGroup2, System.ComponentModel.ISupportInitialize).BeginInit()
@ -146,7 +147,6 @@ Partial Class frmMain
CType(Me.LayoutControlItem13, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem13, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem14, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItemRunningNumber, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItemRunningNumber, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem11, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem11, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).BeginInit()
@ -292,16 +292,16 @@ Partial Class frmMain
' '
'RibbonPage1 'RibbonPage1
' '
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2, Me.RibbonGroupData, Me.RibbonGroupDocument, Me.RibbonGroupPositions}) Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonGroupDataLoading, Me.RibbonPageGroup2, Me.RibbonGroupDataTransmission, Me.RibbonGroupDocument, Me.RibbonGroupPositions})
Me.RibbonPage1.Name = "RibbonPage1" Me.RibbonPage1.Name = "RibbonPage1"
Me.RibbonPage1.Text = "Start" Me.RibbonPage1.Text = "Start"
' '
'RibbonPageGroup1 'RibbonGroupDataLoading
' '
Me.RibbonPageGroup1.ItemLinks.Add(Me.btnLoadDocuments) Me.RibbonGroupDataLoading.ItemLinks.Add(Me.btnLoadDocuments)
Me.RibbonPageGroup1.ItemLinks.Add(Me.btnReloadDocument) Me.RibbonGroupDataLoading.ItemLinks.Add(Me.btnReloadDocument)
Me.RibbonPageGroup1.Name = "RibbonPageGroup1" Me.RibbonGroupDataLoading.Name = "RibbonGroupDataLoading"
Me.RibbonPageGroup1.Text = "Daten laden" Me.RibbonGroupDataLoading.Text = "Daten laden"
' '
'RibbonPageGroup2 'RibbonPageGroup2
' '
@ -313,13 +313,13 @@ Partial Class frmMain
Me.RibbonPageGroup2.Name = "RibbonPageGroup2" Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
Me.RibbonPageGroup2.Text = "Konfiguration" Me.RibbonPageGroup2.Text = "Konfiguration"
' '
'RibbonGroupData 'RibbonGroupDataTransmission
' '
Me.RibbonGroupData.Enabled = False Me.RibbonGroupDataTransmission.Enabled = False
Me.RibbonGroupData.ItemLinks.Add(Me.BarButtonItem4) Me.RibbonGroupDataTransmission.ItemLinks.Add(Me.BarButtonItem4)
Me.RibbonGroupData.ItemLinks.Add(Me.BarButtonItem5) Me.RibbonGroupDataTransmission.ItemLinks.Add(Me.BarButtonItem5)
Me.RibbonGroupData.Name = "RibbonGroupData" Me.RibbonGroupDataTransmission.Name = "RibbonGroupDataTransmission"
Me.RibbonGroupData.Text = "Daten übermitteln" Me.RibbonGroupDataTransmission.Text = "Daten übermitteln"
' '
'RibbonGroupDocument 'RibbonGroupDocument
' '
@ -425,8 +425,7 @@ Partial Class frmMain
' '
'LayoutControlHead 'LayoutControlHead
' '
Me.LayoutControlHead.Controls.Add(Me.txtOrderIssuer) Me.LayoutControlHead.Controls.Add(Me.txtInfoText)
Me.LayoutControlHead.Controls.Add(Me.MemoEdit1)
Me.LayoutControlHead.Controls.Add(Me.txtOrderNumber) Me.LayoutControlHead.Controls.Add(Me.txtOrderNumber)
Me.LayoutControlHead.Controls.Add(Me.txtStreetName) Me.LayoutControlHead.Controls.Add(Me.txtStreetName)
Me.LayoutControlHead.Controls.Add(Me.txtPlace) Me.LayoutControlHead.Controls.Add(Me.txtPlace)
@ -437,12 +436,12 @@ Partial Class frmMain
Me.LayoutControlHead.Controls.Add(Me.cmbMandator) Me.LayoutControlHead.Controls.Add(Me.cmbMandator)
Me.LayoutControlHead.Controls.Add(Me.cmbCustomer) Me.LayoutControlHead.Controls.Add(Me.cmbCustomer)
Me.LayoutControlHead.Controls.Add(Me.cmbDeliveryAddress) Me.LayoutControlHead.Controls.Add(Me.cmbDeliveryAddress)
Me.LayoutControlHead.Controls.Add(Me.cmbYears) Me.LayoutControlHead.Controls.Add(Me.cmbYear)
Me.LayoutControlHead.Controls.Add(Me.txtCustomerGLN) Me.LayoutControlHead.Controls.Add(Me.txtCustomerGLN)
Me.LayoutControlHead.Controls.Add(Me.txtDeliveryAddressGLN) Me.LayoutControlHead.Controls.Add(Me.txtDeliveryAddressGLN)
Me.LayoutControlHead.Controls.Add(Me.txtDocumentReference)
Me.LayoutControlHead.Controls.Add(Me.txtName) Me.LayoutControlHead.Controls.Add(Me.txtName)
Me.LayoutControlHead.Controls.Add(Me.cmbDocumentKind) Me.LayoutControlHead.Controls.Add(Me.cmbDocumentKind)
Me.LayoutControlHead.Controls.Add(Me.cmbOrderIssuer)
Me.LayoutControlHead.Dock = System.Windows.Forms.DockStyle.Fill Me.LayoutControlHead.Dock = System.Windows.Forms.DockStyle.Fill
Me.LayoutControlHead.Enabled = False Me.LayoutControlHead.Enabled = False
Me.LayoutControlHead.Location = New System.Drawing.Point(0, 0) Me.LayoutControlHead.Location = New System.Drawing.Point(0, 0)
@ -453,23 +452,14 @@ Partial Class frmMain
Me.LayoutControlHead.TabIndex = 0 Me.LayoutControlHead.TabIndex = 0
Me.LayoutControlHead.Text = "LayoutControl1" Me.LayoutControlHead.Text = "LayoutControl1"
' '
'txtOrderIssuer 'txtInfoText
' '
Me.txtOrderIssuer.Location = New System.Drawing.Point(123, 170) Me.txtInfoText.Location = New System.Drawing.Point(123, 200)
Me.txtOrderIssuer.MenuManager = Me.RibbonControl Me.txtInfoText.MenuManager = Me.RibbonControl
Me.txtOrderIssuer.Name = "txtOrderIssuer" Me.txtInfoText.Name = "txtInfoText"
Me.txtOrderIssuer.Size = New System.Drawing.Size(402, 20) Me.txtInfoText.Size = New System.Drawing.Size(912, 90)
Me.txtOrderIssuer.StyleController = Me.LayoutControlHead Me.txtInfoText.StyleController = Me.LayoutControlHead
Me.txtOrderIssuer.TabIndex = 6 Me.txtInfoText.TabIndex = 12
'
'MemoEdit1
'
Me.MemoEdit1.Location = New System.Drawing.Point(631, 200)
Me.MemoEdit1.MenuManager = Me.RibbonControl
Me.MemoEdit1.Name = "MemoEdit1"
Me.MemoEdit1.Size = New System.Drawing.Size(404, 90)
Me.MemoEdit1.StyleController = Me.LayoutControlHead
Me.MemoEdit1.TabIndex = 12
' '
'txtOrderNumber 'txtOrderNumber
' '
@ -521,6 +511,7 @@ Partial Class frmMain
Me.txtRunningNumber.Location = New System.Drawing.Point(123, 50) Me.txtRunningNumber.Location = New System.Drawing.Point(123, 50)
Me.txtRunningNumber.MenuManager = Me.RibbonControl Me.txtRunningNumber.MenuManager = Me.RibbonControl
Me.txtRunningNumber.Name = "txtRunningNumber" Me.txtRunningNumber.Name = "txtRunningNumber"
Me.txtRunningNumber.Properties.ReadOnly = True
Me.txtRunningNumber.Size = New System.Drawing.Size(402, 20) Me.txtRunningNumber.Size = New System.Drawing.Size(402, 20)
Me.txtRunningNumber.StyleController = Me.LayoutControlHead Me.txtRunningNumber.StyleController = Me.LayoutControlHead
Me.txtRunningNumber.TabIndex = 2 Me.txtRunningNumber.TabIndex = 2
@ -612,15 +603,15 @@ Partial Class frmMain
Me.GridView2.OptionsSelection.EnableAppearanceFocusedCell = False Me.GridView2.OptionsSelection.EnableAppearanceFocusedCell = False
Me.GridView2.OptionsView.ShowGroupPanel = False Me.GridView2.OptionsView.ShowGroupPanel = False
' '
'cmbYears 'cmbYear
' '
Me.cmbYears.Location = New System.Drawing.Point(631, 80) Me.cmbYear.Location = New System.Drawing.Point(631, 80)
Me.cmbYears.MenuManager = Me.RibbonControl Me.cmbYear.MenuManager = Me.RibbonControl
Me.cmbYears.Name = "cmbYears" Me.cmbYear.Name = "cmbYear"
Me.cmbYears.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) Me.cmbYear.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.cmbYears.Size = New System.Drawing.Size(404, 20) Me.cmbYear.Size = New System.Drawing.Size(404, 20)
Me.cmbYears.StyleController = Me.LayoutControlHead Me.cmbYear.StyleController = Me.LayoutControlHead
Me.cmbYears.TabIndex = 15 Me.cmbYear.TabIndex = 15
' '
'txtCustomerGLN 'txtCustomerGLN
' '
@ -640,15 +631,6 @@ Partial Class frmMain
Me.txtDeliveryAddressGLN.StyleController = Me.LayoutControlHead Me.txtDeliveryAddressGLN.StyleController = Me.LayoutControlHead
Me.txtDeliveryAddressGLN.TabIndex = 17 Me.txtDeliveryAddressGLN.TabIndex = 17
' '
'txtDocumentReference
'
Me.txtDocumentReference.Location = New System.Drawing.Point(123, 200)
Me.txtDocumentReference.MenuManager = Me.RibbonControl
Me.txtDocumentReference.Name = "txtDocumentReference"
Me.txtDocumentReference.Size = New System.Drawing.Size(402, 90)
Me.txtDocumentReference.StyleController = Me.LayoutControlHead
Me.txtDocumentReference.TabIndex = 19
'
'txtName 'txtName
' '
Me.txtName.Location = New System.Drawing.Point(123, 50) Me.txtName.Location = New System.Drawing.Point(123, 50)
@ -669,6 +651,34 @@ Partial Class frmMain
Me.cmbDocumentKind.StyleController = Me.LayoutControlHead Me.cmbDocumentKind.StyleController = Me.LayoutControlHead
Me.cmbDocumentKind.TabIndex = 18 Me.cmbDocumentKind.TabIndex = 18
' '
'cmbOrderIssuer
'
Me.cmbOrderIssuer.Location = New System.Drawing.Point(123, 170)
Me.cmbOrderIssuer.MenuManager = Me.RibbonControl
Me.cmbOrderIssuer.Name = "cmbOrderIssuer"
Me.cmbOrderIssuer.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.cmbOrderIssuer.Properties.NullText = ""
Me.cmbOrderIssuer.Properties.PopupView = Me.GridView3
Me.cmbOrderIssuer.Size = New System.Drawing.Size(402, 20)
Me.cmbOrderIssuer.StyleController = Me.LayoutControlHead
Me.cmbOrderIssuer.TabIndex = 6
'
'GridView3
'
Me.GridView3.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colContactName})
Me.GridView3.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus
Me.GridView3.Name = "GridView3"
Me.GridView3.OptionsSelection.EnableAppearanceFocusedCell = False
Me.GridView3.OptionsView.ShowGroupPanel = False
'
'colContactName
'
Me.colContactName.Caption = "Name"
Me.colContactName.FieldName = "Name"
Me.colContactName.Name = "colContactName"
Me.colContactName.Visible = True
Me.colContactName.VisibleIndex = 0
'
'Root 'Root
' '
Me.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] Me.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True]
@ -688,7 +698,7 @@ Partial Class frmMain
' '
'LayoutControlGroup2 'LayoutControlGroup2
' '
Me.LayoutControlGroup2.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem5, Me.LayoutControlItem2, Me.LayoutItemOrderIssuer, Me.LayoutItemOrderNumber, Me.LayoutItemOrderDate, Me.LayoutControlItem12, Me.LayoutControlItem13, Me.LayoutControlItem1, Me.LayoutControlItem4, Me.LayoutControlItem14, Me.LayoutControlItemRunningNumber, Me.LayoutControlItem11, Me.LayoutControlItem3}) Me.LayoutControlGroup2.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem5, Me.LayoutControlItem2, Me.LayoutItemOrderIssuer, Me.LayoutItemOrderNumber, Me.LayoutItemOrderDate, Me.LayoutControlItem12, Me.LayoutControlItem13, Me.LayoutControlItem1, Me.LayoutControlItem4, Me.LayoutControlItemRunningNumber, Me.LayoutControlItem11, Me.LayoutControlItem3})
Me.LayoutControlGroup2.Location = New System.Drawing.Point(0, 0) Me.LayoutControlGroup2.Location = New System.Drawing.Point(0, 0)
Me.LayoutControlGroup2.Name = "LayoutControlGroup2" Me.LayoutControlGroup2.Name = "LayoutControlGroup2"
Me.LayoutControlGroup2.Size = New System.Drawing.Size(1018, 250) Me.LayoutControlGroup2.Size = New System.Drawing.Size(1018, 250)
@ -716,12 +726,12 @@ Partial Class frmMain
' '
'LayoutItemOrderIssuer 'LayoutItemOrderIssuer
' '
Me.LayoutItemOrderIssuer.Control = Me.txtOrderIssuer Me.LayoutItemOrderIssuer.Control = Me.cmbOrderIssuer
Me.LayoutItemOrderIssuer.Location = New System.Drawing.Point(0, 120) Me.LayoutItemOrderIssuer.Location = New System.Drawing.Point(0, 120)
Me.LayoutItemOrderIssuer.Name = "LayoutItemOrderIssuer" Me.LayoutItemOrderIssuer.Name = "LayoutItemOrderIssuer"
Me.LayoutItemOrderIssuer.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5) Me.LayoutItemOrderIssuer.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
Me.LayoutItemOrderIssuer.Size = New System.Drawing.Size(508, 30) Me.LayoutItemOrderIssuer.Size = New System.Drawing.Size(508, 30)
Me.LayoutItemOrderIssuer.Text = "Besteller" Me.LayoutItemOrderIssuer.Text = "Ansprechpartner"
Me.LayoutItemOrderIssuer.TextSize = New System.Drawing.Size(93, 13) Me.LayoutItemOrderIssuer.TextSize = New System.Drawing.Size(93, 13)
' '
'LayoutItemOrderNumber 'LayoutItemOrderNumber
@ -776,7 +786,7 @@ Partial Class frmMain
' '
'LayoutControlItem4 'LayoutControlItem4
' '
Me.LayoutControlItem4.Control = Me.cmbYears Me.LayoutControlItem4.Control = Me.cmbYear
Me.LayoutControlItem4.Location = New System.Drawing.Point(508, 30) Me.LayoutControlItem4.Location = New System.Drawing.Point(508, 30)
Me.LayoutControlItem4.Name = "LayoutControlItem4" Me.LayoutControlItem4.Name = "LayoutControlItem4"
Me.LayoutControlItem4.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5) Me.LayoutControlItem4.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
@ -784,16 +794,6 @@ Partial Class frmMain
Me.LayoutControlItem4.Text = "Wirtschaftsjahr" Me.LayoutControlItem4.Text = "Wirtschaftsjahr"
Me.LayoutControlItem4.TextSize = New System.Drawing.Size(93, 13) Me.LayoutControlItem4.TextSize = New System.Drawing.Size(93, 13)
' '
'LayoutControlItem14
'
Me.LayoutControlItem14.Control = Me.txtDocumentReference
Me.LayoutControlItem14.Location = New System.Drawing.Point(0, 150)
Me.LayoutControlItem14.Name = "LayoutControlItem14"
Me.LayoutControlItem14.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
Me.LayoutControlItem14.Size = New System.Drawing.Size(508, 100)
Me.LayoutControlItem14.Text = "Auftragsreferenz"
Me.LayoutControlItem14.TextSize = New System.Drawing.Size(93, 13)
'
'LayoutControlItemRunningNumber 'LayoutControlItemRunningNumber
' '
Me.LayoutControlItemRunningNumber.Control = Me.txtRunningNumber Me.LayoutControlItemRunningNumber.Control = Me.txtRunningNumber
@ -816,11 +816,11 @@ Partial Class frmMain
' '
'LayoutControlItem3 'LayoutControlItem3
' '
Me.LayoutControlItem3.Control = Me.MemoEdit1 Me.LayoutControlItem3.Control = Me.txtInfoText
Me.LayoutControlItem3.Location = New System.Drawing.Point(508, 150) Me.LayoutControlItem3.Location = New System.Drawing.Point(0, 150)
Me.LayoutControlItem3.Name = "LayoutControlItem3" Me.LayoutControlItem3.Name = "LayoutControlItem3"
Me.LayoutControlItem3.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5) Me.LayoutControlItem3.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
Me.LayoutControlItem3.Size = New System.Drawing.Size(510, 100) Me.LayoutControlItem3.Size = New System.Drawing.Size(1018, 100)
Me.LayoutControlItem3.Text = "Freitext" Me.LayoutControlItem3.Text = "Freitext"
Me.LayoutControlItem3.TextSize = New System.Drawing.Size(93, 13) Me.LayoutControlItem3.TextSize = New System.Drawing.Size(93, 13)
' '
@ -927,6 +927,10 @@ Partial Class frmMain
Me.RichEditXml.Size = New System.Drawing.Size(0, 0) Me.RichEditXml.Size = New System.Drawing.Size(0, 0)
Me.RichEditXml.TabIndex = 0 Me.RichEditXml.TabIndex = 0
' '
'SplashScreenManager1
'
Me.SplashScreenManager1.ClosingDelay = 500
'
'frmMain 'frmMain
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@ -950,8 +954,7 @@ Partial Class frmMain
Me.SplitContainerControl2.ResumeLayout(False) Me.SplitContainerControl2.ResumeLayout(False)
CType(Me.LayoutControlHead, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlHead, System.ComponentModel.ISupportInitialize).EndInit()
Me.LayoutControlHead.ResumeLayout(False) Me.LayoutControlHead.ResumeLayout(False)
CType(Me.txtOrderIssuer.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.txtInfoText.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.MemoEdit1.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.txtOrderNumber.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.txtOrderNumber.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.txtStreetName.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.txtStreetName.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.txtPlace.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.txtPlace.Properties, System.ComponentModel.ISupportInitialize).EndInit()
@ -966,12 +969,13 @@ Partial Class frmMain
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.cmbDeliveryAddress.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.cmbDeliveryAddress.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.GridView2, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.GridView2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.cmbYears.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.cmbYear.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.txtCustomerGLN.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.txtCustomerGLN.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.txtDeliveryAddressGLN.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.txtDeliveryAddressGLN.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.txtDocumentReference.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.txtName.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.txtName.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.cmbDocumentKind.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.cmbDocumentKind.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.cmbOrderIssuer.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.GridView3, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Root, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.Root, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.TabbedControlGroup2, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TabbedControlGroup2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlGroup2, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlGroup2, System.ComponentModel.ISupportInitialize).EndInit()
@ -984,7 +988,6 @@ Partial Class frmMain
CType(Me.LayoutControlItem13, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem13, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem14, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItemRunningNumber, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItemRunningNumber, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem11, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem11, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).EndInit()
@ -1005,15 +1008,14 @@ Partial Class frmMain
Friend WithEvents RibbonControl As DevExpress.XtraBars.Ribbon.RibbonControl Friend WithEvents RibbonControl As DevExpress.XtraBars.Ribbon.RibbonControl
Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage
Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents RibbonGroupDataLoading As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents RibbonStatusBar As DevExpress.XtraBars.Ribbon.RibbonStatusBar Friend WithEvents RibbonStatusBar As DevExpress.XtraBars.Ribbon.RibbonStatusBar
Friend WithEvents GridControlFiles As DevExpress.XtraGrid.GridControl Friend WithEvents GridControlFiles As DevExpress.XtraGrid.GridControl
Friend WithEvents GridViewFiles As DevExpress.XtraGrid.Views.Grid.GridView Friend WithEvents GridViewFiles As DevExpress.XtraGrid.Views.Grid.GridView
Friend WithEvents SplitContainerControl1 As DevExpress.XtraEditors.SplitContainerControl Friend WithEvents SplitContainerControl1 As DevExpress.XtraEditors.SplitContainerControl
Friend WithEvents SplitContainerControl2 As DevExpress.XtraEditors.SplitContainerControl Friend WithEvents SplitContainerControl2 As DevExpress.XtraEditors.SplitContainerControl
Friend WithEvents LayoutControlHead As DevExpress.XtraLayout.LayoutControl Friend WithEvents LayoutControlHead As DevExpress.XtraLayout.LayoutControl
Friend WithEvents txtOrderIssuer As DevExpress.XtraEditors.TextEdit Friend WithEvents txtInfoText As DevExpress.XtraEditors.MemoEdit
Friend WithEvents MemoEdit1 As DevExpress.XtraEditors.MemoEdit
Friend WithEvents txtOrderNumber As DevExpress.XtraEditors.TextEdit Friend WithEvents txtOrderNumber As DevExpress.XtraEditors.TextEdit
Friend WithEvents Root As DevExpress.XtraLayout.LayoutControlGroup Friend WithEvents Root As DevExpress.XtraLayout.LayoutControlGroup
Friend WithEvents GridControlPositions As DevExpress.XtraGrid.GridControl Friend WithEvents GridControlPositions As DevExpress.XtraGrid.GridControl
@ -1043,13 +1045,13 @@ Partial Class frmMain
Friend WithEvents cmbDeliveryAddress As DevExpress.XtraEditors.SearchLookUpEdit Friend WithEvents cmbDeliveryAddress As DevExpress.XtraEditors.SearchLookUpEdit
Friend WithEvents GridView2 As DevExpress.XtraGrid.Views.Grid.GridView Friend WithEvents GridView2 As DevExpress.XtraGrid.Views.Grid.GridView
Friend WithEvents BarButtonItem5 As DevExpress.XtraBars.BarButtonItem Friend WithEvents BarButtonItem5 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonGroupData As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents RibbonGroupDataTransmission As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents txtVersion As DevExpress.XtraBars.BarStaticItem Friend WithEvents txtVersion As DevExpress.XtraBars.BarStaticItem
Friend WithEvents btnDeletePosition As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnDeletePosition As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonGroupPositions As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents RibbonGroupPositions As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents BarButtonItem7 As DevExpress.XtraBars.BarButtonItem Friend WithEvents BarButtonItem7 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents colSelected As DevExpress.XtraGrid.Columns.GridColumn Friend WithEvents colSelected As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents cmbYears As DevExpress.XtraEditors.ComboBoxEdit Friend WithEvents cmbYear As DevExpress.XtraEditors.ComboBoxEdit
Friend WithEvents TabbedControlGroup2 As DevExpress.XtraLayout.TabbedControlGroup Friend WithEvents TabbedControlGroup2 As DevExpress.XtraLayout.TabbedControlGroup
Friend WithEvents LayoutControlGroup2 As DevExpress.XtraLayout.LayoutControlGroup Friend WithEvents LayoutControlGroup2 As DevExpress.XtraLayout.LayoutControlGroup
Friend WithEvents LayoutControlItemRunningNumber As DevExpress.XtraLayout.LayoutControlItem Friend WithEvents LayoutControlItemRunningNumber As DevExpress.XtraLayout.LayoutControlItem
@ -1074,8 +1076,6 @@ Partial Class frmMain
Friend WithEvents btnPreviewReport As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnPreviewReport As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonGroupDocument As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents RibbonGroupDocument As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents LayoutControlItem11 As DevExpress.XtraLayout.LayoutControlItem Friend WithEvents LayoutControlItem11 As DevExpress.XtraLayout.LayoutControlItem
Friend WithEvents txtDocumentReference As DevExpress.XtraEditors.MemoEdit
Friend WithEvents LayoutControlItem14 As DevExpress.XtraLayout.LayoutControlItem
Friend WithEvents btnReportPreview As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnReportPreview As DevExpress.XtraBars.BarButtonItem
Friend WithEvents btnReloadDocument As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnReloadDocument As DevExpress.XtraBars.BarButtonItem
Friend WithEvents colId As DevExpress.XtraGrid.Columns.GridColumn Friend WithEvents colId As DevExpress.XtraGrid.Columns.GridColumn
@ -1084,4 +1084,8 @@ Partial Class frmMain
Friend WithEvents LayoutControlItem15 As DevExpress.XtraLayout.LayoutControlItem Friend WithEvents LayoutControlItem15 As DevExpress.XtraLayout.LayoutControlItem
Friend WithEvents cmbDocumentKind As DevExpress.XtraEditors.ComboBoxEdit Friend WithEvents cmbDocumentKind As DevExpress.XtraEditors.ComboBoxEdit
Friend WithEvents ApplicationMenu1 As DevExpress.XtraBars.Ribbon.ApplicationMenu Friend WithEvents ApplicationMenu1 As DevExpress.XtraBars.Ribbon.ApplicationMenu
Friend WithEvents cmbOrderIssuer As DevExpress.XtraEditors.SearchLookUpEdit
Friend WithEvents GridView3 As DevExpress.XtraGrid.Views.Grid.GridView
Friend WithEvents colContactName As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents SplashScreenManager1 As DevExpress.XtraSplashScreen.SplashScreenManager
End Class End Class

View File

@ -74,8 +74,8 @@ Public Class frmMain
cmbMandator.Properties.DataSource = Winline.Mandators cmbMandator.Properties.DataSource = Winline.Mandators
cmbYears.Properties.Items.AddRange(Winline.Years) cmbYear.Properties.Items.AddRange(Winline.Years)
cmbYears.SelectedItem = ConfigManager.Config.GetYear() cmbYear.SelectedItem = ConfigManager.Config.GetYear()
' Initialize Grids ' Initialize Grids
GridBuilder = New GridBuilder(New List(Of GridView) From {GridViewFiles, GridViewPositions}) GridBuilder = New GridBuilder(New List(Of GridView) From {GridViewFiles, GridViewPositions})
@ -127,7 +127,7 @@ Public Class frmMain
Try Try
If DocumentLoader.LoadFiles(ConfigManager.Config.InputDirectory) = True Then If DocumentLoader.LoadFiles(ConfigManager.Config.InputDirectory) = True Then
RibbonGroupData.Enabled = True RibbonGroupDataTransmission.Enabled = True
RibbonGroupDocument.Enabled = True RibbonGroupDocument.Enabled = True
RibbonGroupPositions.Enabled = True RibbonGroupPositions.Enabled = True
@ -210,8 +210,8 @@ Public Class frmMain
Dim oData As Orders.Input.MESOWebService = DirectCast(pDocument.Data, Orders.Input.MESOWebService) Dim oData As Orders.Input.MESOWebService = DirectCast(pDocument.Data, Orders.Input.MESOWebService)
Dim oDataOriginal As Orders.Input.MESOWebService = DirectCast(pDocument.DataOriginal, Orders.Input.MESOWebService) Dim oDataOriginal As Orders.Input.MESOWebService = DirectCast(pDocument.DataOriginal, Orders.Input.MESOWebService)
Dim oHead = Orders.Helpers.GetOrderHead(oData) Dim oHead = Orders.Helpers.GetOrderHead(Of Orders.Input.MESOWebServiceEXIMVRG_ordersT025)(oData)
Dim oHeadOriginal = Orders.Helpers.GetOrderHead(oDataOriginal) Dim oHeadOriginal = Orders.Helpers.GetOrderHead(Of Orders.Input.MESOWebServiceEXIMVRG_ordersT025)(oDataOriginal)
' --- Head Data -------------------------------------------------------------------------------------- ' --- Head Data --------------------------------------------------------------------------------------
@ -221,10 +221,9 @@ Public Class frmMain
' Regular Data from EDI ' Regular Data from EDI
txtRunningNumber.Text = oHead.Laufnummer txtRunningNumber.Text = oHead.Laufnummer
txtOrderIssuer.Text = oHead.Fakt_Ansprechpartner cmbOrderIssuer.Text = oHead.Fakt_Ansprechpartner
txtOrderNumber.Text = oHead.AuftragsBestellnummer txtOrderNumber.Text = oHead.Auftragsreferenz
txtInfoText.Text = oHead.Infotext
txtDocumentReference.Text = oHead.Auftragsreferenz
dateOrderDate.EditValue = oHead.Datum_AuftragBestellung dateOrderDate.EditValue = oHead.Datum_AuftragBestellung
' --- Find Mandator -------------------------------------------------------------------------------------- ' --- Find Mandator --------------------------------------------------------------------------------------
@ -245,7 +244,13 @@ Public Class frmMain
cmbDocumentKind.Properties.Items.Clear() cmbDocumentKind.Properties.Items.Clear()
cmbDocumentKind.Properties.Items.AddRange(oMandatorKinds) cmbDocumentKind.Properties.Items.AddRange(oMandatorKinds)
cmbDocumentKind.SelectedItem = oSelectedKind
If oSelectedKind Is Nothing Then
cmbDocumentKind.ErrorText = "Es wurde keine passende Belegart gefunden."
cmbDocumentKind.SelectedItem = Nothing
Else
cmbDocumentKind.SelectedItem = oSelectedKind
End If
' --- Find Accounts -------------------------------------------------------------------------------------- ' --- Find Accounts --------------------------------------------------------------------------------------
@ -275,6 +280,13 @@ Public Class frmMain
End If End If
End If End If
' CONTACTS
If cmbCustomer.EditValue IsNot Nothing Then
Dim oContacts = Winline.GetContacts(oHead.Fakt_Kontonummer, oMandator)
cmbOrderIssuer.Properties.DataSource = oContacts
End If
' DEVLIERY ' DEVLIERY
If oHead.Lief_Kontonummer = oHeadOriginal.Lief_Kontonummer Then If oHead.Lief_Kontonummer = oHeadOriginal.Lief_Kontonummer Then
If oHeadOriginal.Lief_Kontonummer = String.Empty Then If oHeadOriginal.Lief_Kontonummer = String.Empty Then
@ -291,15 +303,14 @@ Public Class frmMain
Where(Function(oAccount) oAccount.Id = oHead.Lief_Kontonummer) Where(Function(oAccount) oAccount.Id = oHead.Lief_Kontonummer)
If oMatchingAccounts.Count() > 1 Then If oMatchingAccounts.Count() > 1 Then
cmbCustomer.EditValue = Nothing cmbDeliveryAddress.EditValue = Nothing
cmbCustomer.ErrorText = "Für die Kontonummer wurden mehrere Konten gefunden." cmbDeliveryAddress.ErrorText = "Für die Kontonummer wurden mehrere Konten gefunden."
ElseIf oMatchingAccounts.Count() = 0 Then ElseIf oMatchingAccounts.Count() = 0 Then
cmbCustomer.EditValue = Nothing cmbDeliveryAddress.EditValue = Nothing
cmbCustomer.ErrorText = "Für die Kontonummer wurde kein Konto gefunden." cmbDeliveryAddress.ErrorText = "Für die Kontonummer wurde kein Konto gefunden."
Else Else
cmbCustomer.EditValue = oMatchingAccounts.SingleOrDefault() cmbDeliveryAddress.EditValue = oMatchingAccounts.SingleOrDefault()
End If End If
End If End If
' --- Find Positions ------------------------------------------------------------------------------------ ' --- Find Positions ------------------------------------------------------------------------------------
@ -329,32 +340,106 @@ Public Class frmMain
End Sub End Sub
Private Async Sub BarButtonItem4_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem4.ItemClick Private Async Sub BarButtonItem4_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem4.ItemClick
Dim oMessageText As String = ""
Dim oMessageStyle As MsgBoxStyle = MsgBoxStyle.Critical
Dim oDocument As Document = GetFocusedDocument() Dim oDocument As Document = GetFocusedDocument()
If oDocument Is Nothing Then If oDocument Is Nothing Then
Exit Sub Exit Sub
End If End If
SplashScreenManager1.ShowWaitForm()
ChangeUIState(False)
Try Try
Dim oFinalDocument As Document = TransferChangesToDocument(oDocument) Dim oFinalDocument As Document = TransferChangesToDocument(oDocument)
Dim oResult = Await WebService.TransferDocumentToWinLine(oFinalDocument) Dim oResult = Await WebService.TransferDocumentToWinLine(oFinalDocument)
oMessageText = "Beleg wurde erfolgreich übertragen!"
oMessageStyle = MsgBoxStyle.Information
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
Dim oMessage = $"Fehler beim Übertragen des Dokuments:{vbNewLine}{vbNewLine}{ex.Message}"
MsgBox(oMessage, MsgBoxStyle.Critical, Text) oMessageText = $"Fehler beim Übertragen des Dokuments:{vbNewLine}{vbNewLine}{ex.Message}"
oMessageStyle = MsgBoxStyle.Critical
Finally
SplashScreenManager1.CloseWaitForm()
ChangeUIState(True)
MsgBox(oMessageText, oMessageStyle, Text)
End Try End Try
End Sub End Sub
Private Sub ChangeUIState(pEnabled As Boolean)
GridControlPositions.Enabled = pEnabled
GridControlFiles.Enabled = pEnabled
LayoutControlHead.Enabled = pEnabled
RibbonGroupDataTransmission.Enabled = pEnabled
RibbonGroupDataLoading.Enabled = pEnabled
RibbonGroupDocument.Enabled = pEnabled
RibbonGroupPositions.Enabled = pEnabled
End Sub
Private Function TransferChangesToDocument(pDocument As Document) Private Function TransferChangesToDocument(pDocument As Document)
Dim oData As Orders.Input.MESOWebService = pDocument.Data
Try
Orders.Helpers.SetOrderHead(Of Orders.Input.MESOWebServiceEXIMVRG_ordersT025)(oData, AddressOf UpdateOrderHead)
Catch ex As Exception
Logger.Error(ex)
Throw ex
End Try
Return pDocument Return pDocument
End Function End Function
Private Function UpdateOrderHead(pObject As Orders.Input.MESOWebServiceEXIMVRG_ordersT025) As Orders.Input.MESOWebServiceEXIMVRG_ordersT025
' Update DocumentKind
If cmbDocumentKind.EditValue IsNot Nothing AndAlso TypeOf cmbDocumentKind.EditValue Is DocumentKind Then
pObject.Belegart = DirectCast(cmbDocumentKind.EditValue, DocumentKind).Id
End If
' Update Talking Person lol
If cmbOrderIssuer.EditValue IsNot Nothing AndAlso TypeOf cmbOrderIssuer.EditValue Is Contact Then
pObject.Fakt_Ansprechpartner = DirectCast(cmbOrderIssuer.EditValue, Contact).Id
End If
' Update Delivery Address
If cmbDeliveryAddress.EditValue IsNot Nothing AndAlso TypeOf cmbDeliveryAddress.EditValue Is Account Then
pObject.Lief_Kontonummer = DirectCast(cmbDeliveryAddress.EditValue, Account)?.Id
End If
' Update Order Number
If txtOrderNumber.EditValue IsNot Nothing AndAlso txtOrderNumber.EditValue <> String.Empty Then
pObject.Auftragsreferenz = txtOrderNumber.EditValue
End If
' Update Order Date
If dateOrderDate IsNot Nothing Then
pObject.Datum_AuftragBestellung = DirectCast(dateOrderDate.EditValue, Date).ToString("yyyy-MM-dd")
End If
' Update Extra Address
pObject.Lief_Name = txtName.EditValue
pObject.Lief_Ort = txtPlace.EditValue
pObject.Lief_PLZ = txtZIP.EditValue
pObject.Lief_Strasse = txtStreetName.EditValue
Return pObject
End Function
Private Sub BarButtonItem8_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem8.ItemClick Private Sub BarButtonItem8_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem8.ItemClick
TryOpenDirectory(LogConfig.LogDirectory, "Logverzeichnis") TryOpenDirectory(LogConfig.LogDirectory, "Logverzeichnis")
End Sub End Sub
Private Sub cmbAccount_Validating(sender As BaseEdit, e As System.ComponentModel.CancelEventArgs) Handles cmbCustomer.Validating, cmbDeliveryAddress.Validating Private Sub cmbCustomer_Validating(sender As BaseEdit, e As System.ComponentModel.CancelEventArgs) Handles cmbCustomer.Validating, cmbDocumentKind.Validating, cmbMandator.Validating, cmbYear.Validating
If sender.EditValue Is Nothing Then If sender.EditValue Is Nothing Then
sender.ErrorText = "Dieses Feld muss ausgefüllt werden!" sender.ErrorText = "Dieses Feld muss ausgefüllt werden"
Else Else
sender.ErrorText = "" sender.ErrorText = ""
End If End If
@ -368,8 +453,8 @@ Public Class frmMain
Dim oReport As New OrderReport() Dim oReport As New OrderReport()
Dim oDataSource = New DevExpress.DataAccess.ObjectBinding.ObjectDataSource With { Dim oDataSource = New DevExpress.DataAccess.ObjectBinding.ObjectDataSource With {
.DataSource = New Orders.ReportSource With { .DataSource = New Orders.ReportSource With {
.Head = Orders.Helpers.GetOrderHead(oDocument.Data), .Head = Orders.Helpers.GetOrderHead(Of Orders.Input.MESOWebServiceEXIMVRG_ordersT025)(oDocument.Data),
.Positions = Orders.Helpers.GetOrderPositions(oDocument.Data) .Positions = Orders.Helpers.GetOrderPositions(Of Orders.Input.MESOWebServiceEXIMVRG_ordersT025)(oDocument.Data)
} }
} }
oDataSource.Fill() oDataSource.Fill()

View File

@ -0,0 +1,83 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmWaitForm
Inherits DevExpress.XtraWaitForm.WaitForm
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.progressPanel1 = New DevExpress.XtraWaitForm.ProgressPanel()
Me.tableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
Me.tableLayoutPanel1.SuspendLayout()
Me.SuspendLayout()
'
'progressPanel1
'
Me.progressPanel1.Appearance.BackColor = System.Drawing.Color.Transparent
Me.progressPanel1.Appearance.Options.UseBackColor = True
Me.progressPanel1.AppearanceCaption.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.progressPanel1.AppearanceCaption.Options.UseFont = True
Me.progressPanel1.AppearanceDescription.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.progressPanel1.AppearanceDescription.Options.UseFont = True
Me.progressPanel1.Dock = System.Windows.Forms.DockStyle.Fill
Me.progressPanel1.ImageHorzOffset = 20
Me.progressPanel1.Location = New System.Drawing.Point(0, 17)
Me.progressPanel1.Margin = New System.Windows.Forms.Padding(0, 3, 0, 3)
Me.progressPanel1.Name = "progressPanel1"
Me.progressPanel1.Size = New System.Drawing.Size(246, 39)
Me.progressPanel1.TabIndex = 0
Me.progressPanel1.Text = "progressPanel1"
'
'tableLayoutPanel1
'
Me.tableLayoutPanel1.AutoSize = True
Me.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent
Me.tableLayoutPanel1.ColumnCount = 1
Me.tableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
Me.tableLayoutPanel1.Controls.Add(Me.progressPanel1, 0, 0)
Me.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
Me.tableLayoutPanel1.Location = New System.Drawing.Point(0, 0)
Me.tableLayoutPanel1.Name = "tableLayoutPanel1"
Me.tableLayoutPanel1.Padding = New System.Windows.Forms.Padding(0, 14, 0, 14)
Me.tableLayoutPanel1.RowCount = 1
Me.tableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
Me.tableLayoutPanel1.Size = New System.Drawing.Size(246, 73)
Me.tableLayoutPanel1.TabIndex = 1
'
'Form1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.AutoSize = True
Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.ClientSize = New System.Drawing.Size(246, 73)
Me.Controls.Add(Me.tableLayoutPanel1)
Me.DoubleBuffered = True
Me.Name = "Form1"
Me.StartPosition = FormStartPosition.Manual
Me.Text = "Form1"
Me.tableLayoutPanel1.ResumeLayout(false)
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Private WithEvents progressPanel1 As DevExpress.XtraWaitForm.ProgressPanel
Private WithEvents tableLayoutPanel1 As System.Windows.Forms.TableLayoutPanel
End Class

View File

@ -0,0 +1,120 @@
<?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:import>
<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:element>
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string"></xsd:attribute>
<xsd:attribute name="type" type="xsd:string"></xsd:attribute>
<xsd:attribute name="mimetype" type="xsd:string"></xsd:attribute>
<xsd:attribute ref="xml:space"></xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string"></xsd:attribute>
<xsd:attribute name="name" type="xsd:string"></xsd:attribute>
</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>
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"></xsd:element>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"></xsd:attribute>
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"></xsd:attribute>
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"></xsd:attribute>
<xsd:attribute ref="xml:space"></xsd:attribute>
</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:element>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,24 @@
Public Class frmWaitForm
Sub New
InitializeComponent()
Me.progressPanel1.AutoHeight = True
End Sub
Public Overrides Sub SetCaption(ByVal caption As String)
MyBase.SetCaption(caption)
Me.progressPanel1.Caption = caption
End Sub
Public Overrides Sub SetDescription(ByVal description As String)
MyBase.SetDescription(description)
Me.progressPanel1.Description = description
End Sub
Public Overrides Sub ProcessCommand(ByVal cmd As System.Enum, ByVal arg As Object)
MyBase.ProcessCommand(cmd, arg)
End Sub
Public Enum WaitFormCommand
SomeCommandId
End Enum
End Class

View File

@ -10,6 +10,8 @@
Public Property BaseUrl As String = "http://127.0.0.1/EWL" Public Property BaseUrl As String = "http://127.0.0.1/EWL"
Public Property Username As String = "Username" Public Property Username As String = "Username"
Public Property Password As String = "Password" Public Property Password As String = "Password"
Public Property ImportBasePath As String = ""
Public Property ImportRelativePath As String = ""
End Class End Class
Public Class MandatorConfig Public Class MandatorConfig

View File

@ -121,6 +121,7 @@
<Compile Include="Serializer.vb" /> <Compile Include="Serializer.vb" />
<Compile Include="Winline\Entities\Account.vb" /> <Compile Include="Winline\Entities\Account.vb" />
<Compile Include="Winline\Data.vb" /> <Compile Include="Winline\Data.vb" />
<Compile Include="Winline\Entities\Contact.vb" />
<Compile Include="Winline\Entities\DocumentKind.vb" /> <Compile Include="Winline\Entities\DocumentKind.vb" />
<Compile Include="Winline\Entities\Mandator.vb" /> <Compile Include="Winline\Entities\Mandator.vb" />
<Compile Include="Winline\WebService.vb" /> <Compile Include="Winline\WebService.vb" />

View File

@ -1,16 +1,26 @@
Namespace Schemas.Orders Namespace Schemas.Orders
Public Class Helpers Public Class Helpers
Public Shared Function GetOrderHead(pData As Input.MESOWebService) As Input.MESOWebServiceEXIMVRG_ordersT025 Public Shared Function GetOrderHead(Of T)(pData As IMesoWebservice) As T
Dim oHead As Input.MESOWebServiceEXIMVRG_ordersT025 = pData.Items. Dim oHead As T = pData.Items.
Where(Function(i) TypeOf i Is Input.MESOWebServiceEXIMVRG_ordersT025). Where(Function(i) TypeOf i Is T).
FirstOrDefault() FirstOrDefault()
Return oHead Return oHead
End Function End Function
Public Shared Function GetOrderPositions(pData As Input.MESOWebService) As List(Of Input.MESOWebServiceEXIMVRG_ordersT026) Public Shared Sub SetOrderHead(Of T)(pData As IMesoWebservice, pUpdateFunction As Action(Of T))
Dim oPositions As List(Of Input.MESOWebServiceEXIMVRG_ordersT026) = pData.Items. Dim oHead As T = pData.Items.
Where(Function(i) TypeOf i Is Input.MESOWebServiceEXIMVRG_ordersT026). Where(Function(i) TypeOf i Is T).
Select(Of Input.MESOWebServiceEXIMVRG_ordersT026)(Function(i) i). SetValue(Sub(pObject As T)
pUpdateFunction(pObject)
End Sub).
FirstOrDefault()
End Sub
Public Shared Function GetOrderPositions(Of T)(pData As IMesoWebservice) As List(Of T)
Dim oPositions As List(Of T) = pData.Items.
Where(Function(i) TypeOf i Is T).
Select(Of T)(Function(i) i).
ToList() ToList()
Return oPositions Return oPositions
End Function End Function

View File

@ -29,7 +29,7 @@ Namespace Schemas
Private overallSuccessField As Boolean Private overallSuccessField As Boolean
Private resultDetailsField As MESOWebServiceResultResultDetails Private resultDetailsField As MESOWebServiceResultResultDetails()
'''<remarks/> '''<remarks/>
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
@ -44,7 +44,7 @@ Namespace Schemas
'''<remarks/> '''<remarks/>
<System.Xml.Serialization.XmlElementAttribute("ResultDetails", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> <System.Xml.Serialization.XmlElementAttribute("ResultDetails", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
Public Property ResultDetails() As MESOWebServiceResultResultDetails Public Property ResultDetails() As MESOWebServiceResultResultDetails()
Get Get
Return Me.resultDetailsField Return Me.resultDetailsField
End Get End Get
@ -68,6 +68,10 @@ Namespace Schemas
Private errorTextField As String Private errorTextField As String
Private keyValueField As String
Private voucherNumberField As String
'''<remarks/> '''<remarks/>
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
Public Property Success() As Boolean Public Property Success() As Boolean
@ -100,5 +104,27 @@ Namespace Schemas
Me.errorTextField = value Me.errorTextField = value
End Set End Set
End Property End Property
'''<remarks/>
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
Public Property KeyValue() As String
Get
Return Me.keyValueField
End Get
Set
Me.keyValueField = Value
End Set
End Property
'''<remarks/>
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
Public Property VoucherNumber() As String
Get
Return Me.voucherNumberField
End Get
Set
Me.voucherNumberField = Value
End Set
End Property
End Class End Class
End Namespace End Namespace

View File

@ -25,6 +25,10 @@ Namespace Winline
Public Const V50_ACCOUNTNUMBER = "c002" Public Const V50_ACCOUNTNUMBER = "c002"
Public Const V50_ACCOUNTNAME = "c003" Public Const V50_ACCOUNTNAME = "c003"
Public Const T45_KEY = "c000"
Public Const T45_NAME = "c001"
Public Const T45_CONTACTNUMBER = "c063"
Public Const V05_ACCOUNTID = "c002" Public Const V05_ACCOUNTID = "c002"
Public Const V05_ACCOUNTNAME = "c003" Public Const V05_ACCOUNTNAME = "c003"
@ -258,6 +262,42 @@ Namespace Winline
End Try End Try
End Function End Function
Public Function GetContacts(pAccountNumber As String, pMandator As Mandator) As List(Of Contact)
Try
Dim oContacts As New List(Of Contact)
Dim oYear As Integer = GetWinLineYear()
Dim oSQL As String = $"
SELECT
[c000], -- Key
[c001], -- Name
[c063] -- Kontaktnummer
FROM [{pMandator.Database}].[dbo].[t045]
WHERE [c063] LIKE '{pAccountNumber}-%'
AND [mesocomp] = '{pMandator.Id}' AND [mesoyear] = {oYear}"
Dim oTable As DataTable = Database.GetDatatable(oSQL)
' Contact not found in this Mandator, continue to next one
If oTable.Rows.Count = 0 Then
Logger.Debug("Contact for Account [{0}] was not found in Mandator: [{1}]", pAccountNumber, pMandator.Id)
Return Nothing
End If
For Each oRow In oTable.Rows
oContacts.Add(New Contact With {
.Id = Utils.NotNull(oRow.Item(T45_KEY), Nothing),
.Name = Utils.NotNull(oRow.Item(T45_NAME), Nothing),
.Number = Utils.NotNull(oRow.Item(T45_CONTACTNUMBER), Nothing)
})
Next
Return oContacts
Catch ex As Exception
Logger.Error(ex)
Return Nothing
End Try
End Function
Public Function GetReplacementArticleNumber(pArticleNumber As String, pMandator As Mandator) Public Function GetReplacementArticleNumber(pArticleNumber As String, pMandator As Mandator)
Try Try
Dim oYear As Integer = GetWinLineYear() Dim oYear As Integer = GetWinLineYear()
@ -295,6 +335,7 @@ Namespace Winline
Return GetReplacementArticleNumber(oReplacementArticleNumber, pMandator) Return GetReplacementArticleNumber(oReplacementArticleNumber, pMandator)
Catch ex As Exception Catch ex As Exception
Logger.Error(ex)
Return Nothing Return Nothing
End Try End Try
End Function End Function

View File

@ -0,0 +1,12 @@
Namespace Winline
Public Class Contact
Public Property Id As Integer
Public Property Number As String
Public Property Name As String
Public Overrides Function ToString() As String
Return Name
End Function
End Class
End Namespace

View File

@ -38,26 +38,59 @@ Namespace Winline
Dim oWS As Config.WebServiceConfig = Config.Webservice Dim oWS As Config.WebServiceConfig = Config.Webservice
' --- Get and create path for request/response files ' --- Get and create path for request/response files
Dim oBaseFileName As String = GetBaseFilenameForRequest()
Dim oPath As String = GetBaseWebServicePath() Dim oPath As String = GetBaseWebServicePath()
If IO.Directory.Exists(oPath) = False Then If IO.Directory.Exists(oPath) = False Then
IO.Directory.CreateDirectory(oPath) IO.Directory.CreateDirectory(oPath)
End If End If
' --- Build all teh filenamez and pathz
Dim oBaseFileName As String = GetBaseFilenameForRequest()
Dim oFileName = GetXmlFilenameWithSuffix(oBaseFileName, "Request", "xml")
' Relative Path for Webservice Call
Dim oImportRelativeFilePath = IO.Path.Combine(GetDateSubDirectoryPath(Config.Webservice.ImportRelativePath), oFileName)
' Absolute Path to copy Request file
Dim oImportAbsolutePath = IO.Path.Combine(Config.Webservice.ImportBasePath, Config.Webservice.ImportRelativePath)
Dim oImportAbsoluteFilePath = IO.Path.Combine(GetDateSubDirectoryPath(oImportAbsolutePath), oFileName)
' --- Serialize Data into XML string ' --- Serialize Data into XML string
Dim oXmlString = SerializeOrder(oOrderOutput, oBaseFileName)
Dim oReplacedXmlString = oXmlString.Replace("&amp;", "").Replace("ß", "ss") Dim oOutputFilePath = SerializeOrder(oOrderOutput, oFileName)
'Dim oEscapedString = Uri.EscapeUriString(oXmlString)
' --- Copy file to Winline Import Directory
Try
IO.File.Copy(oOutputFilePath, oImportAbsoluteFilePath, True)
Catch ex As Exception
Logger.Error(ex)
Throw ex
End Try
' --- Prepare URL and HTTP Client ' --- Prepare URL and HTTP Client
Dim oURL As String = $"{oWS.BaseUrl}/ewlservice/import?User={oWS.Username}&Password={oWS.Password}&Company={pDocument.Mandator}&Type=30&Vorlage=EXIM-VRG_orders&ActionCode=1&Byref=0&Data={oXmlString}" Dim oTemplateType = 30
Dim oTemplateName = "EXIM-VRG_orders"
' ActionCode: Should this be a test or not?
' 0 = Testcall
' 1 = Real call
Dim oActionCode = 1
' Byref: Should data be supplied as file or as string?
' 0 = As String
' 1 = As File (relative to Winline Server directory)
Dim oByref = 1
Dim oURL As String = $"{oWS.BaseUrl}/ewlservice/import?User={oWS.Username}&Password={oWS.Password}&Company={pDocument.Mandator}&Type={oTemplateType}&Vorlage={oTemplateName}&ActionCode={oActionCode}&Byref={oByref}&Data={oImportRelativeFilePath}"
Dim oClient As New HttpClient() Dim oClient As New HttpClient()
Logger.Info("Creating HTTP Request to [{0}]", oWS.BaseUrl) Logger.Info("Creating HTTP Request to [{0}]", oWS.BaseUrl)
' --- Bring the action! ' --- Bring the action!
Try Try
Dim oResponse As HttpResponseMessage = Await oClient.PostAsync(New Uri(oURL), New StringContent(String.Empty)) Dim oResponse As HttpResponseMessage = Await oClient.GetAsync(oURL)
Await HandleResponse(oResponse, oPath, oBaseFileName) Await HandleResponse(oResponse, oPath, oBaseFileName)
Return True Return True
@ -83,12 +116,23 @@ Namespace Winline
Using oStream As New IO.MemoryStream(oBytes) Using oStream As New IO.MemoryStream(oBytes)
Dim oResponseObject As Schemas.MESOWebServiceResult = oSerializer.Deserialize(oStream) Dim oResponseObject As Schemas.MESOWebServiceResult = oSerializer.Deserialize(oStream)
For Each oDetails As Schemas.MESOWebServiceResultResultDetails In oResponseObject.ResultDetails
If oDetails.Success = True Then
Logger.Info("KeyValue: [{0}]", oDetails.KeyValue)
Logger.Info("VoucherNumber: [{0}]", oDetails.VoucherNumber)
Else
Logger.Warn("ErrorCode: [{0}]", oDetails.ErrorCode)
Logger.Warn("ErrorText: [{0}]", oDetails.ErrorText)
End If
Next
If oResponseObject.OverallSuccess = False Then If oResponseObject.OverallSuccess = False Then
Throw New ApplicationException(oResponseObject.ResultDetails.ErrorText) Throw New ApplicationException("Request to Webservice was unsuccessful. Please check the logs.")
End If End If
End Using End Using
Case "text/plain" Case "text/html"
WriteResponseFile(pPath, pBaseFileNAme, oResponseBody, "txt") WriteResponseFile(pPath, pBaseFileNAme, oResponseBody, "txt")
Throw New ApplicationException(oResponseBody) Throw New ApplicationException(oResponseBody)
@ -129,23 +173,16 @@ Namespace Winline
Return oResult Return oResult
End Function End Function
Private Function SerializeOrder(pData As Schemas.Orders.Output.MESOWebService, pBaseFileName As String) As String Private Function SerializeOrder(pData As Schemas.Orders.Output.MESOWebService, pFileName As String) As String
Dim oSerializer = Serializer.GetSerializer(GetType(Schemas.Orders.Output.MESOWebService)) Dim oSerializer = Serializer.GetSerializer(GetType(Schemas.Orders.Output.MESOWebService))
Dim oPath As String = GetBaseWebServicePath() Dim oPath As String = GetBaseWebServicePath()
Dim oFilePath As String = IO.Path.Combine(oPath, pFileName)
Dim oRequestFileName As String = GetXmlFilenameWithSuffix(pBaseFileName, "Request", "xml")
Dim oFilePath As String = IO.Path.Combine(oPath, oRequestFileName)
Using oWriter = XmlWriter.Create(oFilePath, New XmlWriterSettings With {.Indent = True}) Using oWriter = XmlWriter.Create(oFilePath, New XmlWriterSettings With {.Indent = True})
oSerializer.Serialize(oWriter, pData) oSerializer.Serialize(oWriter, pData)
End Using End Using
Using oStringWriter As New IO.StringWriter() Return oFilePath
Using oXmlWriter = XmlWriter.Create(oStringWriter, New XmlWriterSettings With {.Indent = False})
oSerializer.Serialize(oXmlWriter, pData)
Return oStringWriter.ToString()
End Using
End Using
End Function End Function
Private Function GetBaseWebServicePath() As String Private Function GetBaseWebServicePath() As String
@ -160,6 +197,23 @@ Namespace Winline
Return $"{pBaseString}-{pSuffix}.{pExtension}" Return $"{pBaseString}-{pSuffix}.{pExtension}"
End Function End Function
Private Function GetDateSubDirectoryPath(pBasePath As String)
Dim oDirectoryPath As String = Now.ToString("yyyy\\MM\\dd")
Dim oFullPath As String = IO.Path.Combine(pBasePath, oDirectoryPath)
If IO.Directory.Exists(oFullPath) = False Then
Try
IO.Directory.CreateDirectory(oFullPath)
Return oFullPath
Catch ex As Exception
Logger.Error(ex)
Return Nothing
End Try
Else
Return oFullPath
End If
End Function
End Class End Class
End Namespace End Namespace