Fiskaluebersicht, Uberstunden, Zollanmeldungen, MDMAuswertungen

This commit is contained in:
2024-05-28 08:52:58 +02:00
parent 7aaaa875fa
commit 0e513c51f1
10 changed files with 481 additions and 343 deletions

View File

@@ -5,6 +5,9 @@ Imports System.Data.SqlClient
Imports System.Reflection
Imports VERAG_PROG_ALLGEMEIN
Imports System.Security.Cryptography.Xml
Imports System.IO
Imports Tamir.SharpSsh.jsch
Imports sun.swing
Public Class usrCntlMDMAuswertungen
@@ -1355,6 +1358,63 @@ Public Class usrCntlMDMAuswertungen
End Try
End Sub
Private Sub Button17_Click_1(sender As Object, e As EventArgs) Handles Button17.Click
Me.Cursor = Cursors.WaitCursor
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
MsgBox("Funktion noch nicht umgesetzt")
Exit Sub
Try
Dim dir = "F:\FMZoll\Diesel\IDS\Import\Test" 'Environment.GetFolderPath(Environment.SpecialFolder.Personal) & "\VERAG\MDM\tmp\"
If System.IO.Directory.Exists(dir) Then
For Each file As String In System.IO.Directory.GetFiles(dir) ' Ermittelt alle Dateien des Ordners
If System.IO.File.Exists(file) Then
Dim fi As FileInfo = New FileInfo(file)
If fi.Extension.ToLower = ".xls" Then
Dim filepath = file.Replace(".xls", ".txt")
System.IO.File.Move(file, filepath)
End If
End If
Next
Dim dialog As New OpenFileDialog()
dialog.InitialDirectory = dir
dialog.Filter = "CSV Files (*.csv)|*.csv"
If (dialog.ShowDialog() = DialogResult.OK) Then
Dim table As DataTable = convertToDT(dialog.FileName)
Dim cnt = 1
For Each r As DataRow In Table.Rows
If cnt Mod 10 = 0 Then
txtIDSEinarbeitung.Text = cnt & " / " & Table.Rows.Count
Dim proz As Double = (cnt / Table.Rows.Count) * 100
ProgressBar.Value = proz
lblProz.Text = proz.ToString("N2") & " %"
GroupBox7.Refresh()
My.Application.DoEvents()
End If
cnt += 1
Next
ProgressBar.Value = 100
txtIDSEinarbeitung.Text = Table.Rows.Count & " / " & Table.Rows.Count
lblProz.Text = "100.00 %"
End If
End If
Catch ex As System.Exception
MsgBox(ex.Message & ex.StackTrace)
End Try
Me.Cursor = Cursors.Default
End Sub
End Class