WIP
This commit is contained in:
parent
a32b87ca6b
commit
2db5039123
@ -2,4 +2,9 @@
|
||||
Public Property ConnectionString As String = ""
|
||||
Public Property InputDirectory As String = ""
|
||||
Public Property OutputDirectory As String = ""
|
||||
Public Property Webservice As New WebServiceConfig()
|
||||
|
||||
Public Class WebServiceConfig
|
||||
Public Property BaseUrl As String
|
||||
End Class
|
||||
End Class
|
||||
|
||||
@ -8,10 +8,10 @@ Imports EDIDocumentImport.DocumentInfo
|
||||
Public Class FileLoader
|
||||
Inherits Base
|
||||
|
||||
Public Config As MSSQLServer
|
||||
Public Config As Config
|
||||
Public Files As New List(Of FileInfo)
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pConfig As MSSQLServer)
|
||||
Public Sub New(pLogConfig As LogConfig, pConfig As Config)
|
||||
MyBase.New(pLogConfig, pLogConfig.GetLogger())
|
||||
Config = pConfig
|
||||
End Sub
|
||||
|
||||
@ -17,8 +17,8 @@ Public Class WinLineInfo
|
||||
Database = pDatabase
|
||||
End Sub
|
||||
|
||||
Public Sub LoadWinlineMandators()
|
||||
Dim oSQL = "SELECT * FROM v005 WHERE c0139 IS NULL"
|
||||
Public Sub LoadMandators()
|
||||
Dim oSQL = "SELECT * FROM v005 WHERE c139 IS NULL"
|
||||
Dim oTable = Database.GetDatatable(oSQL)
|
||||
|
||||
Mandators.Clear()
|
||||
|
||||
139
EDIDocumentImport/frmMain.Designer.vb
generated
139
EDIDocumentImport/frmMain.Designer.vb
generated
@ -49,6 +49,10 @@ Partial Class frmMain
|
||||
Me.txtBELEGKEY = New DevExpress.XtraEditors.TextEdit()
|
||||
Me.txtRunningNumber = New DevExpress.XtraEditors.TextEdit()
|
||||
Me.dateOrderDate = New DevExpress.XtraEditors.DateEdit()
|
||||
Me.cmbMandator = New DevExpress.XtraEditors.SearchLookUpEdit()
|
||||
Me.SearchLookUpEdit1View = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||
Me.cmbCustomer = New DevExpress.XtraEditors.SearchLookUpEdit()
|
||||
Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||
Me.Root = New DevExpress.XtraLayout.LayoutControlGroup()
|
||||
Me.LayoutItemOrderIssuer = New DevExpress.XtraLayout.LayoutControlItem()
|
||||
Me.LayoutControlItem3 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||
@ -62,16 +66,12 @@ Partial Class frmMain
|
||||
Me.LayoutControlItem8 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||
Me.LayoutControlItem7 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||
Me.LayoutControlItem1 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||
Me.LayoutControlItem5 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||
Me.SimpleSeparator1 = New DevExpress.XtraLayout.SimpleSeparator()
|
||||
Me.LayoutControlItem5 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||
Me.GridControlPositions = New DevExpress.XtraGrid.GridControl()
|
||||
Me.GridViewPositions = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||
Me.SplitContainerControl3 = New DevExpress.XtraEditors.SplitContainerControl()
|
||||
Me.RichEditXml = New DevExpress.XtraRichEdit.RichEditControl()
|
||||
Me.txtMandator = New DevExpress.XtraEditors.SearchLookUpEdit()
|
||||
Me.SearchLookUpEdit1View = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||
Me.txtCustomer = New DevExpress.XtraEditors.SearchLookUpEdit()
|
||||
Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||
CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.GridControlFiles, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.GridViewFiles, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@ -93,6 +93,10 @@ Partial Class frmMain
|
||||
CType(Me.txtRunningNumber.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.dateOrderDate.Properties.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.dateOrderDate.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.cmbMandator.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.SearchLookUpEdit1View, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.cmbCustomer.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.Root, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.LayoutItemOrderIssuer, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@ -106,16 +110,12 @@ Partial Class frmMain
|
||||
CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.LayoutControlItem7, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.SimpleSeparator1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.GridControlPositions, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.GridViewPositions, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.SplitContainerControl3, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainerControl3.SuspendLayout()
|
||||
CType(Me.txtMandator.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.SearchLookUpEdit1View, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.txtCustomer.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'RibbonControl
|
||||
@ -279,8 +279,8 @@ Partial Class frmMain
|
||||
Me.LayoutControl1.Controls.Add(Me.txtBELEGKEY)
|
||||
Me.LayoutControl1.Controls.Add(Me.txtRunningNumber)
|
||||
Me.LayoutControl1.Controls.Add(Me.dateOrderDate)
|
||||
Me.LayoutControl1.Controls.Add(Me.txtMandator)
|
||||
Me.LayoutControl1.Controls.Add(Me.txtCustomer)
|
||||
Me.LayoutControl1.Controls.Add(Me.cmbMandator)
|
||||
Me.LayoutControl1.Controls.Add(Me.cmbCustomer)
|
||||
Me.LayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.LayoutControl1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.LayoutControl1.Name = "LayoutControl1"
|
||||
@ -392,6 +392,47 @@ Partial Class frmMain
|
||||
Me.dateOrderDate.StyleController = Me.LayoutControl1
|
||||
Me.dateOrderDate.TabIndex = 8
|
||||
'
|
||||
'cmbMandator
|
||||
'
|
||||
Me.cmbMandator.Location = New System.Drawing.Point(87, 45)
|
||||
Me.cmbMandator.MenuManager = Me.RibbonControl
|
||||
Me.cmbMandator.Name = "cmbMandator"
|
||||
Me.cmbMandator.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
|
||||
Me.cmbMandator.Properties.NullText = ""
|
||||
Me.cmbMandator.Properties.PopupView = Me.SearchLookUpEdit1View
|
||||
Me.cmbMandator.Properties.ValueMember = "Id"
|
||||
Me.cmbMandator.Size = New System.Drawing.Size(608, 20)
|
||||
Me.cmbMandator.StyleController = Me.LayoutControl1
|
||||
Me.cmbMandator.TabIndex = 4
|
||||
'
|
||||
'SearchLookUpEdit1View
|
||||
'
|
||||
Me.SearchLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus
|
||||
Me.SearchLookUpEdit1View.Name = "SearchLookUpEdit1View"
|
||||
Me.SearchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = False
|
||||
Me.SearchLookUpEdit1View.OptionsView.ShowGroupPanel = False
|
||||
'
|
||||
'cmbCustomer
|
||||
'
|
||||
Me.cmbCustomer.Location = New System.Drawing.Point(87, 75)
|
||||
Me.cmbCustomer.MenuManager = Me.RibbonControl
|
||||
Me.cmbCustomer.Name = "cmbCustomer"
|
||||
Me.cmbCustomer.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
|
||||
Me.cmbCustomer.Properties.DisplayMember = "Name"
|
||||
Me.cmbCustomer.Properties.NullText = ""
|
||||
Me.cmbCustomer.Properties.PopupView = Me.GridView1
|
||||
Me.cmbCustomer.Properties.ValueMember = "Id"
|
||||
Me.cmbCustomer.Size = New System.Drawing.Size(608, 20)
|
||||
Me.cmbCustomer.StyleController = Me.LayoutControl1
|
||||
Me.cmbCustomer.TabIndex = 10
|
||||
'
|
||||
'GridView1
|
||||
'
|
||||
Me.GridView1.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus
|
||||
Me.GridView1.Name = "GridView1"
|
||||
Me.GridView1.OptionsSelection.EnableAppearanceFocusedCell = False
|
||||
Me.GridView1.OptionsView.ShowGroupPanel = False
|
||||
'
|
||||
'Root
|
||||
'
|
||||
Me.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True]
|
||||
@ -513,7 +554,7 @@ Partial Class frmMain
|
||||
'
|
||||
'LayoutControlItem1
|
||||
'
|
||||
Me.LayoutControlItem1.Control = Me.txtMandator
|
||||
Me.LayoutControlItem1.Control = Me.cmbMandator
|
||||
Me.LayoutControlItem1.Location = New System.Drawing.Point(0, 30)
|
||||
Me.LayoutControlItem1.Name = "LayoutControlItem1"
|
||||
Me.LayoutControlItem1.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
|
||||
@ -521,16 +562,6 @@ Partial Class frmMain
|
||||
Me.LayoutControlItem1.Text = "Mandant"
|
||||
Me.LayoutControlItem1.TextSize = New System.Drawing.Size(69, 13)
|
||||
'
|
||||
'LayoutControlItem5
|
||||
'
|
||||
Me.LayoutControlItem5.Control = Me.txtCustomer
|
||||
Me.LayoutControlItem5.Location = New System.Drawing.Point(0, 60)
|
||||
Me.LayoutControlItem5.Name = "LayoutControlItem5"
|
||||
Me.LayoutControlItem5.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
|
||||
Me.LayoutControlItem5.Size = New System.Drawing.Size(690, 30)
|
||||
Me.LayoutControlItem5.Text = "Kunde"
|
||||
Me.LayoutControlItem5.TextSize = New System.Drawing.Size(69, 13)
|
||||
'
|
||||
'SimpleSeparator1
|
||||
'
|
||||
Me.SimpleSeparator1.AllowHotTrack = False
|
||||
@ -538,6 +569,16 @@ Partial Class frmMain
|
||||
Me.SimpleSeparator1.Name = "SimpleSeparator1"
|
||||
Me.SimpleSeparator1.Size = New System.Drawing.Size(1, 255)
|
||||
'
|
||||
'LayoutControlItem5
|
||||
'
|
||||
Me.LayoutControlItem5.Control = Me.cmbCustomer
|
||||
Me.LayoutControlItem5.Location = New System.Drawing.Point(0, 60)
|
||||
Me.LayoutControlItem5.Name = "LayoutControlItem5"
|
||||
Me.LayoutControlItem5.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
|
||||
Me.LayoutControlItem5.Size = New System.Drawing.Size(690, 30)
|
||||
Me.LayoutControlItem5.Text = "Kunde"
|
||||
Me.LayoutControlItem5.TextSize = New System.Drawing.Size(69, 13)
|
||||
'
|
||||
'GridControlPositions
|
||||
'
|
||||
Me.GridControlPositions.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
@ -583,44 +624,6 @@ Partial Class frmMain
|
||||
Me.RichEditXml.Size = New System.Drawing.Size(0, 0)
|
||||
Me.RichEditXml.TabIndex = 0
|
||||
'
|
||||
'txtMandator
|
||||
'
|
||||
Me.txtMandator.Location = New System.Drawing.Point(87, 45)
|
||||
Me.txtMandator.MenuManager = Me.RibbonControl
|
||||
Me.txtMandator.Name = "txtMandator"
|
||||
Me.txtMandator.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
|
||||
Me.txtMandator.Properties.NullText = ""
|
||||
Me.txtMandator.Properties.PopupView = Me.SearchLookUpEdit1View
|
||||
Me.txtMandator.Size = New System.Drawing.Size(608, 20)
|
||||
Me.txtMandator.StyleController = Me.LayoutControl1
|
||||
Me.txtMandator.TabIndex = 4
|
||||
'
|
||||
'SearchLookUpEdit1View
|
||||
'
|
||||
Me.SearchLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus
|
||||
Me.SearchLookUpEdit1View.Name = "SearchLookUpEdit1View"
|
||||
Me.SearchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = False
|
||||
Me.SearchLookUpEdit1View.OptionsView.ShowGroupPanel = False
|
||||
'
|
||||
'txtCustomer
|
||||
'
|
||||
Me.txtCustomer.Location = New System.Drawing.Point(87, 75)
|
||||
Me.txtCustomer.MenuManager = Me.RibbonControl
|
||||
Me.txtCustomer.Name = "txtCustomer"
|
||||
Me.txtCustomer.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
|
||||
Me.txtCustomer.Properties.NullText = ""
|
||||
Me.txtCustomer.Properties.PopupView = Me.GridView1
|
||||
Me.txtCustomer.Size = New System.Drawing.Size(608, 20)
|
||||
Me.txtCustomer.StyleController = Me.LayoutControl1
|
||||
Me.txtCustomer.TabIndex = 10
|
||||
'
|
||||
'GridView1
|
||||
'
|
||||
Me.GridView1.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus
|
||||
Me.GridView1.Name = "GridView1"
|
||||
Me.GridView1.OptionsSelection.EnableAppearanceFocusedCell = False
|
||||
Me.GridView1.OptionsView.ShowGroupPanel = False
|
||||
'
|
||||
'frmMain
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@ -654,6 +657,10 @@ Partial Class frmMain
|
||||
CType(Me.txtRunningNumber.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.dateOrderDate.Properties.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.dateOrderDate.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.cmbMandator.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.SearchLookUpEdit1View, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.cmbCustomer.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.Root, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.LayoutItemOrderIssuer, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
@ -667,16 +674,12 @@ Partial Class frmMain
|
||||
CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.LayoutControlItem7, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.SimpleSeparator1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.GridControlPositions, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.GridViewPositions, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.SplitContainerControl3, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainerControl3.ResumeLayout(False)
|
||||
CType(Me.txtMandator.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.SearchLookUpEdit1View, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.txtCustomer.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
@ -731,8 +734,8 @@ Partial Class frmMain
|
||||
Friend WithEvents RichEditXml As DevExpress.XtraRichEdit.RichEditControl
|
||||
Friend WithEvents checkShowXml As DevExpress.XtraBars.BarCheckItem
|
||||
Friend WithEvents RibbonPageGroup3 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
Friend WithEvents txtMandator As DevExpress.XtraEditors.SearchLookUpEdit
|
||||
Friend WithEvents cmbMandator As DevExpress.XtraEditors.SearchLookUpEdit
|
||||
Friend WithEvents SearchLookUpEdit1View As DevExpress.XtraGrid.Views.Grid.GridView
|
||||
Friend WithEvents txtCustomer As DevExpress.XtraEditors.SearchLookUpEdit
|
||||
Friend WithEvents cmbCustomer As DevExpress.XtraEditors.SearchLookUpEdit
|
||||
Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView
|
||||
End Class
|
||||
|
||||
@ -24,7 +24,7 @@ Public Class frmMain
|
||||
Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
Try
|
||||
LogConfig = New LogConfig(LogConfig.PathType.AppData, Nothing, Nothing, "Digital Data", "EDI Document Importer")
|
||||
ConfigManager = New ConfigManager(Of Config)(LogConfig, Application.UserAppDataPath)
|
||||
ConfigManager = New ConfigManager(Of Config)(LogConfig, Application.UserAppDataPath, Application.CommonAppDataPath, Application.StartupPath)
|
||||
Logger = LogConfig.GetLogger()
|
||||
|
||||
' If ConnectionString does not exist, show SQL Config Form
|
||||
@ -41,8 +41,13 @@ Public Class frmMain
|
||||
End If
|
||||
|
||||
' Initialize Database
|
||||
Database = New MSSQLServer(LogConfig, ConfigManager.Config.ConnectionString)
|
||||
Dim oConnectionString = MSSQLServer.DecryptConnectionString(ConfigManager.Config.ConnectionString)
|
||||
Database = New MSSQLServer(LogConfig, oConnectionString)
|
||||
Winline = New WinLineInfo(LogConfig, Database)
|
||||
Winline.LoadMandators()
|
||||
|
||||
cmbMandator.Properties.DataSource = Winline.Mandators
|
||||
cmbCustomer.Properties.DataSource = Winline.Mandators
|
||||
|
||||
' Initialize Grids
|
||||
GridBuilder = New GridBuilder(New List(Of GridView) From {GridViewFiles, GridViewPositions})
|
||||
@ -106,7 +111,7 @@ Public Class frmMain
|
||||
|
||||
txtBELEGKEY.Text = oHead.BELEGKEY
|
||||
txtRunningNumber.Text = oHead.Laufnummer
|
||||
txtMandator.Text = oHead.Fakt_Kontonummer
|
||||
cmbMandator.EditValue = Winline.Mandators.Where(Function(m) m.Id = oHead.Fakt_Kontonummer).SingleOrDefault()
|
||||
txtOrderIssuer.Text = oHead.Fakt_Ansprechpartner
|
||||
txtOrderNumber.Text = oHead.AuftragsBestellnummer
|
||||
dateOrderDate.EditValue = oHead.Datum_AuftragBestellung
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user