This commit is contained in:
2020-08-04 16:34:47 +02:00
parent 40295a2819
commit 89d8e0a3a8
95 changed files with 3655 additions and 697 deletions

View File

@@ -1,4 +1,5 @@
Imports System.Data.OleDb
Imports System.IO
Public Class frmMDMDatenverarbetiung
@@ -276,8 +277,8 @@ Public Class frmMDMDatenverarbetiung
If vbYes = MsgBox("Es wurden Daten von " & dt_Main.Rows.Count & " Kunden gefunden " & vbNewLine & " Möchten Sie die Anhänge erstellen?", vbYesNoCancel) Then
Dim dir = "F:\FMZoll\Maut\PLOSE\" & Now.ToShortDateString
If IO.Directory.Exists(dir) Then dir &= "_" & Now.ToShortTimeString.Replace(":", "")
IO.Directory.CreateDirectory(dir)
If Directory.Exists(dir) Then dir &= "_" & Now.ToShortTimeString.Replace(":", "")
Directory.CreateDirectory(dir)
For Each R_PLOSE In dt_Main.Rows
Dim SPEDBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch = Nothing
@@ -299,15 +300,15 @@ Public Class frmMDMDatenverarbetiung
'Alle Alangen im foglenden VZ löschen und die aktuellen kopieren:
Dim dirAnhang = "F:\FMZoll\Maut\PLOSE\Anlagen\"
If IO.Directory.Exists(dirAnhang) Then 'IO.Directory.Delete(dirAnhang, True)
For Each f In IO.Directory.GetFiles(dirAnhang)
IO.File.Delete(f)
If Directory.Exists(dirAnhang) Then 'Directory.Delete(dirAnhang, True)
For Each f In Directory.GetFiles(dirAnhang)
File.Delete(f)
Next
End If
If Not IO.Directory.Exists(dirAnhang) Then IO.Directory.CreateDirectory(dirAnhang)
If Not Directory.Exists(dirAnhang) Then Directory.CreateDirectory(dirAnhang)
For Each f In IO.Directory.GetFiles(dir)
IO.File.Copy(f, dirAnhang & (New IO.FileInfo(f)).Name)
For Each f In Directory.GetFiles(dir)
File.Copy(f, dirAnhang & (New FileInfo(f)).Name)
Next
'IN FMZOLL / DB MautD einfügen --> Mautbericht
@@ -371,7 +372,7 @@ Public Class frmMDMDatenverarbetiung
If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then
connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\DEVELOPER\f\FMZoll\MautD.accdb"
Else
connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\FMZOLL\f\FMZoll\MautD.accdb"
connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\FMZOLL.verag.ost.dmn\f\FMZoll\MautD.accdb"
End If
Dim con As New OleDbConnection(connectionString)

View File

@@ -370,6 +370,7 @@ Partial Class frmNewData
Me.btnSDL_MautCZ.Text = "MAUT CZ"
Me.btnSDL_MautCZ.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnSDL_MautCZ.UseVisualStyleBackColor = True
Me.btnSDL_MautCZ.Visible = False
'
'btnSDL_ECOTAX
'
@@ -621,6 +622,7 @@ Partial Class frmNewData
'
'KdSearchBox1
'
Me.KdSearchBox1._AlleFirmenCLUSTER = False
Me.KdSearchBox1._AllowSetValue = True
Me.KdSearchBox1._autoSizeGross = False
Me.KdSearchBox1._display_Name1 = False
@@ -629,6 +631,7 @@ Partial Class frmNewData
Me.KdSearchBox1._displayWoelflKd = False
Me.KdSearchBox1._hideIfListEmpty = True
Me.KdSearchBox1._loadKdData = False
Me.KdSearchBox1._UseFIRMA = ""
Me.KdSearchBox1._ValueKdAndName = False
Me.KdSearchBox1.dgvpos = "LEFT"
Me.KdSearchBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
@@ -642,6 +645,7 @@ Partial Class frmNewData
Me.KdSearchBox1.searchActive = True
Me.KdSearchBox1.Size = New System.Drawing.Size(312, 23)
Me.KdSearchBox1.TabIndex = 1
Me.KdSearchBox1.TIMER_SEARCH = True
Me.KdSearchBox1.usrcntl = Nothing
'
'btnAddLeistungVordefiniert

View File

@@ -23,7 +23,7 @@ Partial Class usrCntlKartenDaten
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Me.DetailsAnzeigenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.FlowLayoutPanel = New System.Windows.Forms.FlowLayoutPanel()
Me.btnSDL_Alle = New System.Windows.Forms.Button()
@@ -46,6 +46,8 @@ Partial Class usrCntlKartenDaten
Me.btnMANAbgasplakette = New System.Windows.Forms.Button()
Me.btnVERAGParkplatz = New System.Windows.Forms.Button()
Me.btnSDL_PLOSE = New System.Windows.Forms.Button()
Me.btnSDL_PLOSE_IT = New System.Windows.Forms.Button()
Me.btnSDL_PLOSE_CZ = New System.Windows.Forms.Button()
Me.btnFilter = New System.Windows.Forms.Button()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.KundenblattAnzeigenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
@@ -79,8 +81,6 @@ Partial Class usrCntlKartenDaten
Me.cntxtExcel = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem6 = New System.Windows.Forms.ToolStripMenuItem()
Me.btnSDL_PLOSE_IT = New System.Windows.Forms.Button()
Me.btnSDL_PLOSE_CZ = New System.Windows.Forms.Button()
Me.FlowLayoutPanel.SuspendLayout()
Me.ContextMenuStrip1.SuspendLayout()
Me.Panel1.SuspendLayout()
@@ -185,6 +185,7 @@ Partial Class usrCntlKartenDaten
Me.btnSDL_MautCZ.Text = "CZ MAUT"
Me.btnSDL_MautCZ.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnSDL_MautCZ.UseVisualStyleBackColor = True
Me.btnSDL_MautCZ.Visible = False
'
'btnSDL_MautDE
'
@@ -483,6 +484,40 @@ Partial Class usrCntlKartenDaten
Me.btnSDL_PLOSE.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnSDL_PLOSE.UseVisualStyleBackColor = True
'
'btnSDL_PLOSE_IT
'
Me.btnSDL_PLOSE_IT.Cursor = System.Windows.Forms.Cursors.Default
Me.btnSDL_PLOSE_IT.FlatAppearance.BorderSize = 0
Me.btnSDL_PLOSE_IT.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnSDL_PLOSE_IT.ForeColor = System.Drawing.Color.Black
Me.btnSDL_PLOSE_IT.Image = Global.SDL.My.Resources.Resources.plose_it
Me.btnSDL_PLOSE_IT.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnSDL_PLOSE_IT.Location = New System.Drawing.Point(234, 64)
Me.btnSDL_PLOSE_IT.Margin = New System.Windows.Forms.Padding(0)
Me.btnSDL_PLOSE_IT.Name = "btnSDL_PLOSE_IT"
Me.btnSDL_PLOSE_IT.Size = New System.Drawing.Size(78, 64)
Me.btnSDL_PLOSE_IT.TabIndex = 42
Me.btnSDL_PLOSE_IT.Text = "PLOSE IT"
Me.btnSDL_PLOSE_IT.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnSDL_PLOSE_IT.UseVisualStyleBackColor = True
'
'btnSDL_PLOSE_CZ
'
Me.btnSDL_PLOSE_CZ.Cursor = System.Windows.Forms.Cursors.Default
Me.btnSDL_PLOSE_CZ.FlatAppearance.BorderSize = 0
Me.btnSDL_PLOSE_CZ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnSDL_PLOSE_CZ.ForeColor = System.Drawing.Color.Black
Me.btnSDL_PLOSE_CZ.Image = Global.SDL.My.Resources.Resources.plose_cz
Me.btnSDL_PLOSE_CZ.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnSDL_PLOSE_CZ.Location = New System.Drawing.Point(312, 64)
Me.btnSDL_PLOSE_CZ.Margin = New System.Windows.Forms.Padding(0)
Me.btnSDL_PLOSE_CZ.Name = "btnSDL_PLOSE_CZ"
Me.btnSDL_PLOSE_CZ.Size = New System.Drawing.Size(78, 64)
Me.btnSDL_PLOSE_CZ.TabIndex = 43
Me.btnSDL_PLOSE_CZ.Text = "PLOSE CZ"
Me.btnSDL_PLOSE_CZ.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnSDL_PLOSE_CZ.UseVisualStyleBackColor = True
'
'btnFilter
'
Me.btnFilter.FlatStyle = System.Windows.Forms.FlatStyle.Flat
@@ -812,8 +847,8 @@ Partial Class usrCntlKartenDaten
Me.dgvSDL.AllowUserToAddRows = False
Me.dgvSDL.AllowUserToDeleteRows = False
Me.dgvSDL.AllowUserToResizeColumns = False
DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvSDL.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvSDL.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
Me.dgvSDL.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvSDL.Location = New System.Drawing.Point(0, -1)
Me.dgvSDL.Name = "dgvSDL"
@@ -887,40 +922,6 @@ Partial Class usrCntlKartenDaten
Me.ToolStripMenuItem6.Size = New System.Drawing.Size(210, 22)
Me.ToolStripMenuItem6.Text = "Formatiert (dauert länger)"
'
'btnSDL_PLOSE_IT
'
Me.btnSDL_PLOSE_IT.Cursor = System.Windows.Forms.Cursors.Default
Me.btnSDL_PLOSE_IT.FlatAppearance.BorderSize = 0
Me.btnSDL_PLOSE_IT.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnSDL_PLOSE_IT.ForeColor = System.Drawing.Color.Black
Me.btnSDL_PLOSE_IT.Image = Global.SDL.My.Resources.Resources.plose_it
Me.btnSDL_PLOSE_IT.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnSDL_PLOSE_IT.Location = New System.Drawing.Point(234, 64)
Me.btnSDL_PLOSE_IT.Margin = New System.Windows.Forms.Padding(0)
Me.btnSDL_PLOSE_IT.Name = "btnSDL_PLOSE_IT"
Me.btnSDL_PLOSE_IT.Size = New System.Drawing.Size(78, 64)
Me.btnSDL_PLOSE_IT.TabIndex = 42
Me.btnSDL_PLOSE_IT.Text = "PLOSE IT"
Me.btnSDL_PLOSE_IT.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnSDL_PLOSE_IT.UseVisualStyleBackColor = True
'
'btnSDL_PLOSE_CZ
'
Me.btnSDL_PLOSE_CZ.Cursor = System.Windows.Forms.Cursors.Default
Me.btnSDL_PLOSE_CZ.FlatAppearance.BorderSize = 0
Me.btnSDL_PLOSE_CZ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnSDL_PLOSE_CZ.ForeColor = System.Drawing.Color.Black
Me.btnSDL_PLOSE_CZ.Image = Global.SDL.My.Resources.Resources.plose_cz
Me.btnSDL_PLOSE_CZ.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnSDL_PLOSE_CZ.Location = New System.Drawing.Point(312, 64)
Me.btnSDL_PLOSE_CZ.Margin = New System.Windows.Forms.Padding(0)
Me.btnSDL_PLOSE_CZ.Name = "btnSDL_PLOSE_CZ"
Me.btnSDL_PLOSE_CZ.Size = New System.Drawing.Size(78, 64)
Me.btnSDL_PLOSE_CZ.TabIndex = 43
Me.btnSDL_PLOSE_CZ.Text = "PLOSE CZ"
Me.btnSDL_PLOSE_CZ.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnSDL_PLOSE_CZ.UseVisualStyleBackColor = True
'
'usrCntlKartenDaten
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)

View File

@@ -40,7 +40,7 @@ Public Class usrCntlKartenDaten
End Sub
' Dim show200 = True
Private Sub usrCntlDaten_Load(sender As Object, e As EventArgs) Handles Me.Load
EnableDoubleBuffered(dgvSDL)
' MsgBox("L")
' Exit Sub
' Dim systemType As Type = dgvSDL.GetType()
@@ -60,20 +60,16 @@ Public Class usrCntlKartenDaten
reClick()
End Sub
EnableDoubleBuffered(dgvSDL)
End Sub
Public Sub EnableDoubleBuffered(ByVal dgv As DataGridView)
Public Shared Sub EnableDoubleBuffered(ByRef dgv As DataGridView)
Dim dgvType As Type = dgv.[GetType]()
Dim pi As PropertyInfo = dgvType.GetProperty("DoubleBuffered", BindingFlags.Instance Or BindingFlags.NonPublic)
pi.SetValue(dgv, True, Nothing)
End Sub
Sub init()
dgvInitWait = True
@@ -502,6 +498,8 @@ Public Class usrCntlKartenDaten
dgvSDL.Height = 100
dgvSDL.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
initRtbVermerk(SDLNrTmp, kdNr)
initDGVWidth() 'vor Filter, damit richtige Größe
If Not doFilter Then initFilter()
@@ -796,14 +794,16 @@ Public Class usrCntlKartenDaten
Sub ReloadLeistung()
btnDel.Enabled = (dgvSDL.SelectedRows.Count > 0)
RichTextBoxVermerk.Text = ""
initRtbVermerk(-1)
' MsgBox(dgvInitWait)
If Not dgvInitWait Then
Try
If dgvSDL.SelectedRows.Count > 0 Then
' MsgBox("So")
UsrCntlDatenDetails1.Visible = True
RichTextBoxVermerk.Text = SQL.getValueTxtBySql("SELECT [Vermerk] FROM [KundenSDL] WHERE [KundenNr]=" & dgvSDL.SelectedRows(0).Cells("KundenNr").Value & " AND [SDLNr]=" & dgvSDL.SelectedRows(0).Cells("SDLNr").Value, "SDL")
initRtbVermerk(dgvSDL.SelectedRows(0).Cells("SDLNr").Value, dgvSDL.SelectedRows(0).Cells("KundenNr").Value)
' RichTextBoxVermerk.Text = SQL.getValueTxtBySql("SELECT [Vermerk] FROM [KundenSDL] WHERE [KundenNr]=" & dgvSDL.SelectedRows(0).Cells("KundenNr").Value & " AND [SDLNr]=" & dgvSDL.SelectedRows(0).Cells("SDLNr").Value, "SDL")
If Not SplitContainer1.Panel2Collapsed Then
Me.Cursor = Cursors.WaitCursor
If kdNr_filter = False Then UsrCntlDatenDetails1.showFirma = True
@@ -820,11 +820,21 @@ Public Class usrCntlKartenDaten
End Try
End If
End Sub
Sub initRtbVermerk(SdlNr As Integer, Optional KdNr As Integer = -1)
RichTextBoxVermerk.Text = ""
If SdlNr > 0 And KdNr > 0 Then
RichTextBoxVermerk.Text = SQL.getValueTxtBySql("SELECT [Vermerk] FROM [KundenSDL] WHERE [KundenNr]=" & KdNr & " AND [SDLNr]=" & SdlNr, "SDL")
End If
If RichTextBoxVermerk.Text <> "" Then
RichTextBoxVermerk.BackColor = Color.LightCyan
Else
RichTextBoxVermerk.BackColor = Color.FromArgb(240, 240, 240)
End If
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click

View File

@@ -137,7 +137,7 @@ Public Class usrCntlMDMAuswertungen
Dim fn As String = sPath & "WOELFL.csv" '" & Now.ToString("ddMMyyyyHHmmss") & ".csv"
Dim outFile As IO.StreamWriter = Nothing
Dim outFile As System.IO.StreamWriter = Nothing
Try
outFile = My.Computer.FileSystem.OpenTextFileWriter(fn, False)
Catch ex As System.Exception
@@ -186,8 +186,8 @@ Public Class usrCntlMDMAuswertungen
End Sub
Sub cleartmp()
Dim dir = Environment.GetFolderPath(Environment.SpecialFolder.Personal) & "\VERAG\MDM\tmp\"
If IO.Directory.Exists(dir) Then
For Each file As String In IO.Directory.GetFiles(dir) ' Ermittelt alle Dateien des Ordners
If System.IO.Directory.Exists(dir) Then
For Each file As String In System.IO.Directory.GetFiles(dir) ' Ermittelt alle Dateien des Ordners
Try
My.Computer.FileSystem.DeleteFile(file)
Catch ex As System.Exception : MsgBox(ex.Message) : End Try