anpassungenMerge
This commit is contained in:
@@ -1,23 +1,23 @@
|
||||
Imports System.DirectoryServices
|
||||
Imports System.Collections.Generic
|
||||
Imports PdfSharp.Pdf
|
||||
Imports PdfSharp.Drawing
|
||||
|
||||
Imports PdfSharp.Pdf.IO
|
||||
Imports PdfSharp.Pdf.AcroForms
|
||||
Imports iTextSharp.text.pdf
|
||||
Imports System.IO
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Net.Mail
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports System.Net
|
||||
Imports System.Text
|
||||
Imports System.Xml.Serialization
|
||||
Imports System.Xml
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Data.OleDb
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.DirectoryServices
|
||||
Imports System.IO
|
||||
Imports System.Net
|
||||
Imports System.Net.Mail
|
||||
Imports System.Text
|
||||
Imports System.Xml
|
||||
Imports System.Xml.Serialization
|
||||
Imports Chilkat
|
||||
Imports TELOTEC_Worker
|
||||
Imports GrapeCity
|
||||
Imports iTextSharp.text.pdf
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports PdfSharp.Drawing
|
||||
Imports PdfSharp.Pdf
|
||||
Imports PdfSharp.Pdf.AcroForms
|
||||
Imports PdfSharp.Pdf.IO
|
||||
Imports Renci.SshNet
|
||||
Imports TELOTEC_Worker
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
Imports VERAG_PROG_ALLGEMEIN.cTelotecAPI
|
||||
'Imports Microsoft.Office.Interop
|
||||
@@ -3774,7 +3774,7 @@ Public Class usrctlProcedures
|
||||
|
||||
|
||||
' Pfad zur Excel-Datei anpassen
|
||||
Dim filePath As String = "D:\Andreas\TMP\elotec ncts 02 2025\ATILLA _ DUR.xlsx"
|
||||
Dim filePath As String = "D:\Andreas\TMP\elot\Garantiebeträge 042025-Atilla-Durmaz.xlsx"
|
||||
|
||||
' Excel Anwendung starten
|
||||
Dim excelApp As New Excel.Application
|
||||
@@ -3796,8 +3796,8 @@ Public Class usrctlProcedures
|
||||
TELANM = New cTelotec_Anmeldung
|
||||
End If
|
||||
|
||||
TELANM.telanm_ART = "T2" '"T1" '"T2"
|
||||
TELANM.Hea_DecTy = "T2" '"T1" '"T2"
|
||||
TELANM.telanm_ART = "T1" '"T1" '"T2"
|
||||
TELANM.Hea_DecTy = "T1" '"T1" '"T2"
|
||||
TELANM.telanm_BezugsNr = excelRange.Cells(i, 4).Value
|
||||
TELANM.Refs_LRN = excelRange.Cells(i, 4).Value
|
||||
TELANM.telanm_Status = 50
|
||||
@@ -3860,6 +3860,7 @@ Public Class usrctlProcedures
|
||||
|
||||
'TELANM.SAVE()
|
||||
|
||||
Console.WriteLine(TELANM.Refs_LRN & " - " & i)
|
||||
|
||||
Next
|
||||
|
||||
@@ -3883,7 +3884,7 @@ Public Class usrctlProcedures
|
||||
ReleaseObject(excelApp)
|
||||
|
||||
Console.WriteLine("Excel-Daten wurden erfolgreich ausgelesen.")
|
||||
Console.ReadKey()
|
||||
'Console.ReadKey()
|
||||
|
||||
|
||||
End Sub
|
||||
@@ -3921,16 +3922,39 @@ Public Class usrctlProcedures
|
||||
|
||||
Private Sub Button47_Click(sender As Object, e As EventArgs) Handles Button47.Click
|
||||
Dim TELO As New VERAG_PROG_ALLGEMEIN.cTelotecAPI
|
||||
Dim Company = "ATILLA"
|
||||
|
||||
Dim messages As List(Of VERAG_PROG_ALLGEMEIN.cTelotecAPI.TAMessage) = TELO.GetTAMessages()
|
||||
|
||||
|
||||
MsgBox(messages.Count)
|
||||
|
||||
For Each mmm In messages
|
||||
MsgBox(mmm.lrn)
|
||||
MsgBox(mmm.declarationContent.anmeldedatum)
|
||||
For ii As Integer = 0 To 50
|
||||
Dim messages As List(Of VERAG_PROG_ALLGEMEIN.cTelotecAPI.TAMessage) = TELO.GetTAMessages(Company)
|
||||
Threading.Thread.Sleep(1000) '
|
||||
Next
|
||||
|
||||
Company = "IMEX"
|
||||
For ii As Integer = 0 To 50
|
||||
Dim messages As List(Of VERAG_PROG_ALLGEMEIN.cTelotecAPI.TAMessage) = TELO.GetTAMessages(Company)
|
||||
Threading.Thread.Sleep(1000) '
|
||||
Next
|
||||
|
||||
Company = "DURMAZ"
|
||||
For ii As Integer = 0 To 50
|
||||
Dim messages As List(Of VERAG_PROG_ALLGEMEIN.cTelotecAPI.TAMessage) = TELO.GetTAMessages(Company)
|
||||
Threading.Thread.Sleep(1000) '
|
||||
Next
|
||||
|
||||
'Company = "VERAG" = ATILLA
|
||||
'For ii As Integer = 0 To 50
|
||||
' Dim messages As List(Of VERAG_PROG_ALLGEMEIN.cTelotecAPI.TAMessage) = TELO.GetTAMessages(Company)
|
||||
' Threading.Thread.Sleep(1000) '
|
||||
'Next
|
||||
|
||||
|
||||
|
||||
' MsgBox(messages.Count)
|
||||
|
||||
'For Each mmm In messages
|
||||
' ' MsgBox(mmm.lrn)
|
||||
' ' MsgBox(mmm.declarationContent.anmeldedatum)
|
||||
'Next
|
||||
End Sub
|
||||
|
||||
Private Sub Button48_Click(sender As Object, e As EventArgs) Handles Button48.Click
|
||||
@@ -3956,9 +3980,7 @@ Public Class usrctlProcedures
|
||||
If TELO_ANM.SAVE() Then
|
||||
MsgBox("SUSSSSS")
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Else
|
||||
Console.WriteLine("🔕 Keine Datei ausgewählt.")
|
||||
End If
|
||||
@@ -3967,107 +3989,18 @@ Public Class usrctlProcedures
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button49_Click(sender As Object, e As EventArgs) Handles Button49.Click
|
||||
Private Sub Button49_Click(sender As Object, e As EventArgs) Handles btnTC_FtpIUpload.Click
|
||||
Using ofd As New OpenFileDialog()
|
||||
ofd.Title = "Wähle eine TEST-Datei"
|
||||
|
||||
|
||||
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
|
||||
If ofd.ShowDialog() = DialogResult.OK Then
|
||||
Dim selectedPath As String = ofd.FileName
|
||||
Dim c As New cTelotecAPI
|
||||
c.SaveJsonResponseTo_ATEZFTP(selectedPath)
|
||||
Else
|
||||
Console.WriteLine("🔕 Keine Datei ausgewählt.")
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MessageBox.Show("Datei nicht vorhanden.")
|
||||
Finally
|
||||
|
||||
End Try
|
||||
|
||||
End Using
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user