Proc, etc.
This commit is contained in:
@@ -46,6 +46,8 @@ Public Class usrCntlAPI
|
||||
cboAPIArt.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("AVISO_OUT_BELEGMAIL", VERAG_PROG_ALLGEMEIN.cAPI_ART.AVISO_OUT_BELEGMAIL))
|
||||
cboAPIArt.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("VERAG_OUT_EZA", VERAG_PROG_ALLGEMEIN.cAPI_ART.VERAG_OUT_EZA))
|
||||
cboAPIArt.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("VERAG_OUT_NCTS", VERAG_PROG_ALLGEMEIN.cAPI_ART.VERAG_OUT_NCTS))
|
||||
cboAPIArt.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("MSE", VERAG_PROG_ALLGEMEIN.cAPI_ART.AVISO_IN_MSE))
|
||||
cboAPIArt.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("MDM SAMMELRECHNUNG", VERAG_PROG_ALLGEMEIN.cAPI_ART.SDL_OUT_SAMMELRECHNUNG))
|
||||
cboAPIArt.changeItem("")
|
||||
|
||||
|
||||
|
||||
28
UID/usrctlProcedures.Designer.vb
generated
28
UID/usrctlProcedures.Designer.vb
generated
@@ -83,6 +83,7 @@ Partial Class usrctlProcedures
|
||||
Me.tctModalTEstLRN = New System.Windows.Forms.TextBox()
|
||||
Me.Button45 = New System.Windows.Forms.Button()
|
||||
Me.TabPage5 = New System.Windows.Forms.TabPage()
|
||||
Me.Button48 = New System.Windows.Forms.Button()
|
||||
Me.Button47 = New System.Windows.Forms.Button()
|
||||
Me.Button18 = New System.Windows.Forms.Button()
|
||||
Me.TextBox1 = New System.Windows.Forms.TextBox()
|
||||
@@ -137,7 +138,7 @@ Partial Class usrctlProcedures
|
||||
Me.Button43 = New System.Windows.Forms.Button()
|
||||
Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.DataGridViewTextBoxColumn2 = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.Button48 = New System.Windows.Forms.Button()
|
||||
Me.Button49 = New System.Windows.Forms.Button()
|
||||
Me.TabControl1.SuspendLayout()
|
||||
Me.TabPage3.SuspendLayout()
|
||||
Me.TabPage1.SuspendLayout()
|
||||
@@ -740,6 +741,15 @@ Partial Class usrctlProcedures
|
||||
Me.TabPage5.Text = "Teleotec"
|
||||
Me.TabPage5.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button48
|
||||
'
|
||||
Me.Button48.Location = New System.Drawing.Point(209, 24)
|
||||
Me.Button48.Name = "Button48"
|
||||
Me.Button48.Size = New System.Drawing.Size(145, 49)
|
||||
Me.Button48.TabIndex = 63
|
||||
Me.Button48.Text = "getTAD File"
|
||||
Me.Button48.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button47
|
||||
'
|
||||
Me.Button47.Location = New System.Drawing.Point(20, 24)
|
||||
@@ -1228,19 +1238,20 @@ Partial Class usrctlProcedures
|
||||
Me.DataGridViewTextBoxColumn2.HeaderText = "anz"
|
||||
Me.DataGridViewTextBoxColumn2.Name = "DataGridViewTextBoxColumn2"
|
||||
'
|
||||
'Button48
|
||||
'Button49
|
||||
'
|
||||
Me.Button48.Location = New System.Drawing.Point(209, 24)
|
||||
Me.Button48.Name = "Button48"
|
||||
Me.Button48.Size = New System.Drawing.Size(145, 49)
|
||||
Me.Button48.TabIndex = 63
|
||||
Me.Button48.Text = "getTAD File"
|
||||
Me.Button48.UseVisualStyleBackColor = True
|
||||
Me.Button49.Location = New System.Drawing.Point(547, 29)
|
||||
Me.Button49.Name = "Button49"
|
||||
Me.Button49.Size = New System.Drawing.Size(145, 49)
|
||||
Me.Button49.TabIndex = 66
|
||||
Me.Button49.Text = "Kundenkontakte imp."
|
||||
Me.Button49.UseVisualStyleBackColor = True
|
||||
'
|
||||
'usrctlProcedures
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.Controls.Add(Me.Button49)
|
||||
Me.Controls.Add(Me.Button43)
|
||||
Me.Controls.Add(Me.Button33)
|
||||
Me.Controls.Add(Me.lblStatus)
|
||||
@@ -1429,4 +1440,5 @@ Partial Class usrctlProcedures
|
||||
Friend WithEvents TabPage5 As TabPage
|
||||
Friend WithEvents Button47 As Button
|
||||
Friend WithEvents Button48 As Button
|
||||
Friend WithEvents Button49 As Button
|
||||
End Class
|
||||
|
||||
@@ -3965,6 +3965,110 @@ Public Class usrctlProcedures
|
||||
End Using
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button49_Click(sender As Object, e As EventArgs) Handles Button49.Click
|
||||
|
||||
|
||||
Dim cnt = 0
|
||||
|
||||
Dim sql As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
Dim kdnr_tmp = ""
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = CheckBox3.Checked
|
||||
|
||||
Try
|
||||
|
||||
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 Not (currentRow(0).Trim() = "aktiv") Then
|
||||
If currentRow.Length > 12 Then
|
||||
|
||||
Dim kundenNr = isleernothing((currentRow(1)))
|
||||
|
||||
If kundenNr IsNot Nothing Then
|
||||
kdnr_tmp = kundenNr
|
||||
|
||||
'Mahnung an
|
||||
If isleernothing((currentRow(9))) IsNot Nothing Then
|
||||
|
||||
|
||||
|
||||
Dim KDKont As New VERAG_PROG_ALLGEMEIN.cKundenKontakte(10, kundenNr)
|
||||
KDKont.kkd_Email = isleernothing((currentRow(9)))
|
||||
KDKont.kkd_kkaId = 10 'Mahnung an
|
||||
KDKont.kkd_kkaBez = "Mahnung an"
|
||||
|
||||
If KDKont.SAVE() Then
|
||||
TextBox10.Text &= KDKont.kkd_id & vbNewLine
|
||||
Else
|
||||
MsgBox("FEHLER: " & currentRow(2).Trim() & " - " & currentRow(3).Trim())
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'Rechnung an
|
||||
If isleernothing((currentRow(10))) IsNot Nothing Then
|
||||
|
||||
Dim KDKont As New VERAG_PROG_ALLGEMEIN.cKundenKontakte(8, kundenNr)
|
||||
KDKont.kkd_Email = isleernothing((currentRow(10)))
|
||||
KDKont.kkd_kkaId = 8 'Rechnung an
|
||||
KDKont.kkd_kkaBez = "Rechnung an"
|
||||
|
||||
If KDKont.SAVE() Then
|
||||
TextBox10.Text &= KDKont.kkd_id & vbNewLine
|
||||
Else
|
||||
MsgBox("FEHLER: " & currentRow(2).Trim() & " - " & currentRow(3).Trim())
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If cnt Mod 10 = 0 Then
|
||||
Application.DoEvents()
|
||||
|
||||
Label10.Text = (cnt + 1)
|
||||
End If
|
||||
|
||||
Else
|
||||
'MsgBox(currentRow(2))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'For Each currentField In currentRow
|
||||
cnt += 1
|
||||
'Next
|
||||
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 Try
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user