This commit is contained in:
2025-09-05 08:58:22 +02:00
5 changed files with 1438 additions and 874 deletions

View File

@@ -86,6 +86,11 @@ Partial Class usrctlProcedures
Me.btnTC_FtpIUpload = New System.Windows.Forms.Button()
Me.Button48 = New System.Windows.Forms.Button()
Me.Button47 = New System.Windows.Forms.Button()
Me.TabPage6 = New System.Windows.Forms.TabPage()
Me.Button51 = New System.Windows.Forms.Button()
Me.cbxMDM_Testsystem = New System.Windows.Forms.CheckBox()
Me.Button50 = New System.Windows.Forms.Button()
Me.Button49 = New System.Windows.Forms.Button()
Me.Button18 = New System.Windows.Forms.Button()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.lblAnzahl = New System.Windows.Forms.Label()
@@ -140,6 +145,9 @@ Partial Class usrctlProcedures
Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.DataGridViewTextBoxColumn2 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.Button49 = New System.Windows.Forms.Button()
Me.Label17 = New System.Windows.Forms.Label()
Me.Label18 = New System.Windows.Forms.Label()
Me.Label19 = New System.Windows.Forms.Label()
Me.TabControl1.SuspendLayout()
Me.TabPage3.SuspendLayout()
Me.TabPage1.SuspendLayout()
@@ -149,6 +157,7 @@ Partial Class usrctlProcedures
Me.TabPage2.SuspendLayout()
Me.TabPage4.SuspendLayout()
Me.TabPage5.SuspendLayout()
Me.TabPage6.SuspendLayout()
Me.SuspendLayout()
'
'TabControl1
@@ -158,6 +167,7 @@ Partial Class usrctlProcedures
Me.TabControl1.Controls.Add(Me.TabPage2)
Me.TabControl1.Controls.Add(Me.TabPage4)
Me.TabControl1.Controls.Add(Me.TabPage5)
Me.TabControl1.Controls.Add(Me.TabPage6)
Me.TabControl1.Location = New System.Drawing.Point(7, 407)
Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 0
@@ -770,6 +780,61 @@ Partial Class usrctlProcedures
Me.Button47.Text = "getTAD"
Me.Button47.UseVisualStyleBackColor = True
'
'TabPage6
'
Me.TabPage6.Controls.Add(Me.Label19)
Me.TabPage6.Controls.Add(Me.Label18)
Me.TabPage6.Controls.Add(Me.Label17)
Me.TabPage6.Controls.Add(Me.Button51)
Me.TabPage6.Controls.Add(Me.cbxMDM_Testsystem)
Me.TabPage6.Controls.Add(Me.Button50)
Me.TabPage6.Controls.Add(Me.Button49)
Me.TabPage6.Location = New System.Drawing.Point(4, 22)
Me.TabPage6.Name = "TabPage6"
Me.TabPage6.Size = New System.Drawing.Size(601, 288)
Me.TabPage6.TabIndex = 5
Me.TabPage6.Text = "MDM Importe"
Me.TabPage6.UseVisualStyleBackColor = True
'
'Button51
'
Me.Button51.Location = New System.Drawing.Point(32, 97)
Me.Button51.Name = "Button51"
Me.Button51.Size = New System.Drawing.Size(106, 28)
Me.Button51.TabIndex = 68
Me.Button51.Text = "Offertenpos"
Me.Button51.UseVisualStyleBackColor = True
'
'cbxMDM_Testsystem
'
Me.cbxMDM_Testsystem.AutoSize = True
Me.cbxMDM_Testsystem.Checked = True
Me.cbxMDM_Testsystem.CheckState = System.Windows.Forms.CheckState.Checked
Me.cbxMDM_Testsystem.Location = New System.Drawing.Point(14, 13)
Me.cbxMDM_Testsystem.Name = "cbxMDM_Testsystem"
Me.cbxMDM_Testsystem.Size = New System.Drawing.Size(98, 17)
Me.cbxMDM_Testsystem.TabIndex = 69
Me.cbxMDM_Testsystem.Text = "TESTSYSTEM"
Me.cbxMDM_Testsystem.UseVisualStyleBackColor = True
'
'Button50
'
Me.Button50.Location = New System.Drawing.Point(172, 63)
Me.Button50.Name = "Button50"
Me.Button50.Size = New System.Drawing.Size(106, 28)
Me.Button50.TabIndex = 67
Me.Button50.Text = "FIBU-Kundenkür."
Me.Button50.UseVisualStyleBackColor = True
'
'Button49
'
Me.Button49.Location = New System.Drawing.Point(32, 63)
Me.Button49.Name = "Button49"
Me.Button49.Size = New System.Drawing.Size(106, 28)
Me.Button49.TabIndex = 66
Me.Button49.Text = "Standard-Off."
Me.Button49.UseVisualStyleBackColor = True
'
'Button18
'
Me.Button18.Location = New System.Drawing.Point(59, 183)
@@ -985,7 +1050,7 @@ Partial Class usrctlProcedures
Me.txt.Multiline = True
Me.txt.Name = "txt"
Me.txt.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
Me.txt.Size = New System.Drawing.Size(124, 91)
Me.txt.Size = New System.Drawing.Size(124, 77)
Me.txt.TabIndex = 38
'
'TextBox9
@@ -994,7 +1059,7 @@ Partial Class usrctlProcedures
Me.TextBox9.Multiline = True
Me.TextBox9.Name = "TextBox9"
Me.TextBox9.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
Me.TextBox9.Size = New System.Drawing.Size(124, 91)
Me.TextBox9.Size = New System.Drawing.Size(124, 77)
Me.TextBox9.TabIndex = 39
'
'Button22
@@ -1232,7 +1297,7 @@ Partial Class usrctlProcedures
'
'Button43
'
Me.Button43.Location = New System.Drawing.Point(694, 29)
Me.Button43.Location = New System.Drawing.Point(565, 29)
Me.Button43.Name = "Button43"
Me.Button43.Size = New System.Drawing.Size(145, 49)
Me.Button43.TabIndex = 65
@@ -1249,6 +1314,33 @@ Partial Class usrctlProcedures
Me.DataGridViewTextBoxColumn2.HeaderText = "anz"
Me.DataGridViewTextBoxColumn2.Name = "DataGridViewTextBoxColumn2"
'
'Label17
'
Me.Label17.AutoSize = True
Me.Label17.Location = New System.Drawing.Point(11, 71)
Me.Label17.Name = "Label17"
Me.Label17.Size = New System.Drawing.Size(19, 13)
Me.Label17.TabIndex = 66
Me.Label17.Text = "1. "
'
'Label18
'
Me.Label18.AutoSize = True
Me.Label18.Location = New System.Drawing.Point(11, 105)
Me.Label18.Name = "Label18"
Me.Label18.Size = New System.Drawing.Size(16, 13)
Me.Label18.TabIndex = 70
Me.Label18.Text = "2."
'
'Label19
'
Me.Label19.AutoSize = True
Me.Label19.Location = New System.Drawing.Point(11, 45)
Me.Label19.Name = "Label19"
Me.Label19.Size = New System.Drawing.Size(66, 13)
Me.Label19.TabIndex = 71
Me.Label19.Text = "CSV-Importe"
'
'Button49
'
Me.Button49.Location = New System.Drawing.Point(741, 654)
@@ -1331,6 +1423,8 @@ Partial Class usrctlProcedures
Me.TabPage4.ResumeLayout(False)
Me.TabPage4.PerformLayout()
Me.TabPage5.ResumeLayout(False)
Me.TabPage6.ResumeLayout(False)
Me.TabPage6.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -1453,4 +1547,12 @@ Partial Class usrctlProcedures
Friend WithEvents Button48 As Button
Friend WithEvents btnTC_FtpIUpload As Button
Friend WithEvents Button49 As Button
Friend WithEvents Button50 As Button
Friend WithEvents Button51 As Button
Friend WithEvents TabPage6 As TabPage
Friend WithEvents cbxMDM_Testsystem As CheckBox
Friend WithEvents Label19 As Label
Friend WithEvents Label18 As Label
Friend WithEvents Label17 As Label
Friend WithEvents Button49 As Button
End Class

View File

@@ -3263,9 +3263,9 @@ Public Class usrctlProcedures
AD.Name_2 = Nothing
AD.Straße = getTrimedString(Blatt.Range("C" & index).Value, 40)
If If(AD.Straße, "").trim = "" Then AD.Straße = Nothing
If If(AD.Straße, "").Trim = "" Then AD.Straße = Nothing
AD.Ort = getTrimedString(Blatt.Range("H" & index).Value, 40)
If If(AD.Ort, "").trim = "" Then AD.Ort = "-"
If If(AD.Ort, "").Trim = "" Then AD.Ort = "-"
Dim LandKz = getTrimedString(Blatt.Range("F" & index).Value, 3)
Dim PLZ = getTrimedString(Blatt.Range("G" & index).Value, 7)
@@ -3281,16 +3281,16 @@ Public Class usrctlProcedures
End If
End If
If If(AD.Telefon, "").trim = "" Then AD.Telefon = Nothing
If If(AD.Telefon, "").Trim = "" Then AD.Telefon = Nothing
AD.Mobiltelefon = Nothing
AD.Telefax = Nothing
AD.E_Mail = getTrimedString(Blatt.Range("L" & index).Value, 40)
If If(AD.E_Mail, "").trim = "" Then AD.E_Mail = Nothing
If If(AD.E_Mail, "").Trim = "" Then AD.E_Mail = Nothing
AD.E_Mail2 = Nothing
' AD. = row("Internet1")
If Blatt.Range("J" & index).value IsNot Nothing Then AD.Ansprechpartner = getTrimedString(Blatt.Range("J" & index).Value.ToString, 40)
If If(AD.Ansprechpartner, "").trim = "" Then AD.Ansprechpartner = Nothing
If If(AD.Ansprechpartner, "").Trim = "" Then AD.Ansprechpartner = Nothing
KD.Währungscode = "EUR" 'getTrimedStringACCES(row("Standard FakturenWährung"), 3)
KD.Zahlungsziel = Nothing
@@ -3343,7 +3343,7 @@ Public Class usrctlProcedures
KD.KundenNrZentrale = KD.KundenNr
KD.FilialenNr = 5701
If If(KD.Sachbearbeiter, "").trim = "" Then KD.Sachbearbeiter = "AUTO"
If If(KD.Sachbearbeiter, "").Trim = "" Then KD.Sachbearbeiter = "AUTO"
KD.Währungscode = "EUR"
KD.Eingegeben_am = Now.ToShortDateString
@@ -3354,7 +3354,7 @@ Public Class usrctlProcedures
AD.LandKz = If(isleernothing(cProgramFunctions.getISO1Land(AD.LandKz)), AD.LandKz)
AD.Rechnungsdruck = True
If If(KD.EORITIN, "").trim = "" Then KD.EORITIN = Nothing
If If(KD.EORITIN, "").Trim = "" Then KD.EORITIN = Nothing
KD.Vorlageprovision = 0.01
KD.Kreditaufwendungen = 0.02
KD.Bankspesen = 0
@@ -3460,7 +3460,7 @@ Public Class usrctlProcedures
Dim kdnr_tmp = ""
Try
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = True
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
Dim fd As New OpenFileDialog
If fd.ShowDialog = DialogResult.OK Then
@@ -4017,6 +4017,139 @@ Public Class usrctlProcedures
End Sub
Private Sub Button49_Click_1(sender As Object, e As EventArgs) Handles Button49.Click
Dim cnt = 0
Dim sql As New VERAG_PROG_ALLGEMEIN.SQL
Try
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = cbxMDM_Testsystem.Checked
Dim fd As New OpenFileDialog
If fd.ShowDialog = DialogResult.OK Then
If fd.FileName.ToLower.EndsWith(".csv") Then
' fd.FileName.EndsWith(".csv")
Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser(fd.FileName, Encoding.Default)
MyReader.TextFieldType = FileIO.FieldType.Delimited
MyReader.SetDelimiters(";")
Dim currentRow As String()
While Not MyReader.EndOfData
Try
currentRow = MyReader.ReadFields()
If currentRow.Length > 2 Then
If (isleernothing(currentRow(0)) IsNot Nothing AndAlso isleernothing(currentRow(0)) <> "NULL") AndAlso (isleernothing(currentRow(1)) IsNot Nothing AndAlso isleernothing(currentRow(1)) <> "NULL") AndAlso (isleernothing(currentRow(2)) IsNot Nothing AndAlso isleernothing(currentRow(2)) <> "NULL") AndAlso (isleernothing(currentRow(3)) IsNot Nothing AndAlso isleernothing(currentRow(3)) <> "NULL") Then
'OffertenNr, Währung, LeistungsNr, LeistungsBez
Dim STDOF As New cStandardofferten(currentRow(0), currentRow(1), currentRow(2), currentRow(3))
If STDOF.hasEntry Then
Dim save As Boolean = False
If isleernothing(currentRow(12)) IsNot Nothing AndAlso isleernothing(currentRow(12)) <> "NULL" Then
save = True
STDOF.LeistungsBez_EN = isleernothing(currentRow(12))
End If
If isleernothing(currentRow(13)) IsNot Nothing AndAlso isleernothing(currentRow(13)) <> "NULL" Then
save = True
STDOF.LeistungsBez_RO = isleernothing(currentRow(13))
End If
If isleernothing(currentRow(14)) IsNot Nothing AndAlso isleernothing(currentRow(14)) <> "NULL" Then
save = True
STDOF.LeistungsBez_TR = isleernothing(currentRow(14))
End If
If save Then STDOF.SAVE()
ElseIf currentRow(2) = 117 Or currentRow(2) = 118 Or currentRow(2) = 119 Then
STDOF.SAVE()
End If
End If
End If
cnt += 1
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
End Try
End While
End Using
End If
End If
Catch ex As Exception
MessageBox.Show("Datei nicht vorhanden.")
Finally
End Try
End Sub
Private Sub Button50_Click(sender As Object, e As EventArgs) Handles Button50.Click
Dim cnt = 0
Dim sql As New VERAG_PROG_ALLGEMEIN.SQL
Dim kdnr_tmp = ""
Try
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
Dim fd As New OpenFileDialog
If fd.ShowDialog = DialogResult.OK Then
If fd.FileName.ToLower.EndsWith(".csv") Then
Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser(fd.FileName, Encoding.Default)
MyReader.TextFieldType = FileIO.FieldType.Delimited
MyReader.SetDelimiters(";")
Dim currentRow As String()
While Not MyReader.EndOfData
Try
currentRow = MyReader.ReadFields()
If currentRow.Length > 2 Then
If isleernothing(currentRow(0)) IsNot Nothing AndAlso IsNumeric(currentRow(0)) Then
Dim KUNDE_ERW As New cKundenErweitert(currentRow(0))
If KUNDE_ERW IsNot Nothing Then
KUNDE_ERW.kde_BezFIBU = currentRow(4)
KUNDE_ERW.SAVE()
End If
End If
End If
cnt += 1
Catch ex As Exception
MsgBox(kdnr_tmp & " " & ex.Message & ex.StackTrace)
End Try
End While
End Using
End If
End If
Catch ex As Exception
MessageBox.Show("Datei nicht vorhanden.")
Finally
End Sub
Private Sub Button49_Click_1(sender As Object, e As EventArgs) Handles Button49.Click
Try
Dim mrn As String = "ATC400003850720243230"
@@ -4040,6 +4173,83 @@ Public Class usrctlProcedures
End Try
End Sub
Private Sub Button51_Click(sender As Object, e As EventArgs) Handles Button51.Click
Dim cnt = 0
Dim sql As New VERAG_PROG_ALLGEMEIN.SQL
Try
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = True
Dim fd As New OpenFileDialog
If fd.ShowDialog = DialogResult.OK Then
If fd.FileName.ToLower.EndsWith(".csv") Then
' fd.FileName.EndsWith(".csv")
Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser(fd.FileName, Encoding.Default)
MyReader.TextFieldType = FileIO.FieldType.Delimited
MyReader.SetDelimiters(";")
Dim currentRow As String()
While Not MyReader.EndOfData
Try
currentRow = MyReader.ReadFields()
If currentRow.Length > 2 AndAlso isleernothing(currentRow(0)) IsNot Nothing AndAlso IsNumeric(currentRow(0)) Then
Dim OFPOS As New cOffertPosition(currentRow(0), currentRow(1), currentRow(2), currentRow(4))
Dim andereLeistungsNr As Boolean = False
If isleernothing(currentRow(2)) IsNot Nothing AndAlso isleernothing(currentRow(3)) AndAlso IsNumeric(currentRow(2)) AndAlso IsNumeric(currentRow(3)) Then
If CInt(currentRow(2)) <> CInt(currentRow(3)) Then
andereLeistungsNr = True
Else
andereLeistungsNr = False
End If
End If
If OFPOS IsNot Nothing Then
If Not andereLeistungsNr Then
OFPOS.LeistungsBez = currentRow(5)
OFPOS.UPDATE(currentRow(4).ToString)
Else
OFPOS.LeistungsBez = currentRow(5)
OFPOS.UPDATE(currentRow(4).ToString)
OFPOS.LeistungsNr = currentRow(3)
OFPOS.UPDATE(CInt(currentRow(2)))
End If
End If
End If
cnt += 1
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
End Try
End While
End Using
End If
End If
Catch ex As Exception
MessageBox.Show("Datei nicht vorhanden.")
Finally
End Try
End Sub
'Private Sub Button26_Click(sender As Object, e As EventArgs)
' For Each d In System.IO.Directory.GetDirectories("\\192.168.0.91\Datenarchiv\DAKOSY\ECHTSYSTEM\Nachrichtendaten_Ablage\2019")