Mailsender, StartOptions
This commit is contained in:
@@ -75,7 +75,7 @@ Module Mail
|
||||
|
||||
'PARAM = "THYSSENKRUPP_AUSWERTUNG"
|
||||
'PARAM = "JAHRESABRECHNUNG AG-ZS"
|
||||
'PARAM = "Imex_Kunden_keine_Abfertigung"
|
||||
PARAM = ""
|
||||
|
||||
'------------------------------------------------------------------------------------
|
||||
' PARAM = "NCTSLIST_TOBB"
|
||||
@@ -127,44 +127,105 @@ Module Mail
|
||||
' Msg.Bcc.Add("al@verag.ag")
|
||||
|
||||
' End Select
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
Dim dtParam As DataTable = SQL.loadDgvBySql("select * from tblMailsender where ms_param ='" & PARAM & "' and ms_aktiv = 1", "ADMIN")
|
||||
|
||||
Select Case PARAM
|
||||
Case "KD_OP5000"
|
||||
|
||||
Case "KD_OP5000" 'umgebaut auf neue Mailsender-Logik
|
||||
If dtParam.Rows.Count = 1 Then
|
||||
System.Console.WriteLine("OPTION erkannt: " & dtParam.Rows(0).Item("ms_info"))
|
||||
If SendEmail_OP5000NEW(dtParam.Rows(0).Item("ms_firma"), "", dtParam.Rows(0).Item("ms_an"), dtParam.Rows(0).Item("ms_cc"), dtParam.Rows(0).Item("ms_bcc"), dtParam.Rows(0).Item("ms_subject"), dtParam.Rows(0).Item("ms_mailtext")) Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Else
|
||||
System.Console.WriteLine("OPTION erkannt: KD_TR_OP5000 _ Erstellt eine Liste türkischer Kunden und versendet diese AL.")
|
||||
If SendEmail_OP5000("VERAG", "", {"al@verag.ag"}, {}, {}, "VERAG - Offene Posten") Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Case "KD_TR_OP5000"
|
||||
End If
|
||||
|
||||
Case "KD_TR_OP5000" 'umgebaut auf neue Mailsender-Logik
|
||||
If dtParam.Rows.Count = 1 Then
|
||||
System.Console.WriteLine("OPTION erkannt: " & dtParam.Rows(0).Item("ms_info"))
|
||||
If SendEmail_OP5000NEW(dtParam.Rows(0).Item("ms_firma"), "'TR'", dtParam.Rows(0).Item("ms_an"), dtParam.Rows(0).Item("ms_cc"), dtParam.Rows(0).Item("ms_bcc"), dtParam.Rows(0).Item("ms_subject"), dtParam.Rows(0).Item("ms_mailtext")) Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Else
|
||||
System.Console.WriteLine("OPTION erkannt: KD_TR_OP5000 _ Erstellt eine Liste türkischer Kunden und versendet diese an Mestan und Bahadir.")
|
||||
If SendEmail_OP5000("VERAG", "'TR'", {"mestan@verag.ag", "as@verag.ag"}, {"finans@verimextransit.com"}, {"al@verag.ag"}, "Kunden TR - Offene Rechnungen") Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Case "KD_TR_OP5000_ATILLA"
|
||||
End If
|
||||
|
||||
Case "KD_TR_OP5000_ATILLA" 'umgebaut auf neue Mailsender-Logik
|
||||
If dtParam.Rows.Count = 1 Then
|
||||
System.Console.WriteLine("OPTION erkannt: " & dtParam.Rows(0).Item("ms_info"))
|
||||
If SendEmail_OP5000NEW(dtParam.Rows(0).Item("ms_firma"), "'TR'", dtParam.Rows(0).Item("ms_an"), dtParam.Rows(0).Item("ms_cc"), dtParam.Rows(0).Item("ms_bcc"), dtParam.Rows(0).Item("ms_subject"), dtParam.Rows(0).Item("ms_mailtext")) Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Else
|
||||
System.Console.WriteLine("OPTION erkannt: KD_TR_OP5000_ATILLA _ Erstellt eine Liste türkischer Kunden von ATILLA.")
|
||||
If SendEmail_OP5000("ATILLA", "'TR'", {"finans@verimextransit.com"}, {}, {"al@verag.ag"}, "Kunden TR - Offene Rechnungen - ATILLA") Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Case "KD_TR_OP5000_IMEX"
|
||||
End If
|
||||
|
||||
Case "KD_TR_OP5000_IMEX" 'umgebaut auf neue Mailsender-Logik
|
||||
If dtParam.Rows.Count = 1 Then
|
||||
System.Console.WriteLine("OPTION erkannt: " & dtParam.Rows(0).Item("ms_info"))
|
||||
If SendEmail_OP5000NEW(dtParam.Rows(0).Item("ms_firma"), "'TR'", dtParam.Rows(0).Item("ms_an"), dtParam.Rows(0).Item("ms_cc"), dtParam.Rows(0).Item("ms_bcc"), dtParam.Rows(0).Item("ms_subject"), dtParam.Rows(0).Item("ms_mailtext")) Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Else
|
||||
System.Console.WriteLine("OPTION erkannt: KD_TR_OP5000_IMEX _ Erstellt eine Liste türkischer Kunden von IMEX.")
|
||||
If SendEmail_OP5000("IMEX", "'TR'", {"mario.hoefer@imex-group.at"}, {"viktoria.leirich@imex-group.at", "finans@verimextransit.com"}, {"al@verag.ag"}, "Kunden TR - Offene Rechnungen - IMEX") Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Case "KD_OP_Kreditlimit"
|
||||
End If
|
||||
|
||||
Case "KD_OP_Kreditlimit" 'umgebaut auf neue Mailsender-Logik
|
||||
If dtParam.Rows.Count = 1 Then
|
||||
System.Console.WriteLine("OPTION erkannt: " & dtParam.Rows(0).Item("ms_info"))
|
||||
If SendEmail_OPKreditlimitNEW(dtParam.Rows(0).Item("ms_an"), dtParam.Rows(0).Item("ms_cc"), dtParam.Rows(0).Item("ms_bcc"), dtParam.Rows(0).Item("ms_subject"), dtParam.Rows(0).Item("ms_mailtext")) Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Else
|
||||
System.Console.WriteLine("OPTION erkannt: KD_OP_Kreditlimit _ Erstellt eine OP Liste von Kunden mit Kreditlimit oder VK-Kunden.")
|
||||
If SendEmail_OPKreditlimit({"as@verag.ag"}, {}, {"al@verag.ag"}, "Kunden - Offene Rechnungen - ACHTUNG: nur mit erfasstem Kreditlimit") Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Case "NCTSLIST_TOBB"
|
||||
System.Console.WriteLine("OPTION erkannt: NCTSLIST_TOBB _ Erstellt eine Liste der Versandscheine mit TOBB Bürgschaft.")
|
||||
End If
|
||||
|
||||
Case "NCTSLIST_TOBB" 'umgebaut auf neue Mailsender-Logik
|
||||
If dtParam.Rows.Count > 0 Then
|
||||
For i As Integer = 0 To dtParam.Rows.Count - 1
|
||||
System.Console.WriteLine("OPTION erkannt: " & dtParam.Rows(i).Item("ms_info"))
|
||||
sendTOBB(dtParam.Rows(i).Item("ms_firma"), Now.AddDays(-1), Now.AddDays(-1), dtParam.Rows(i).Item("ms_an"), dtParam.Rows(i).Item("ms_cc"), dtParam.Rows(i).Item("ms_bcc"), dtParam.Rows(i).Item("ms_subject"), dtParam.Rows(i).Item("ms_mailtext"))
|
||||
i = i + 1
|
||||
Next
|
||||
Else
|
||||
System.Console.WriteLine("OPTION erkannt: NCTSLIST_TOBB _ Erstellt eine Liste der Versandscheine mit TOBB Bürgschaft.")
|
||||
sendTOBB("VERAG/ATILLA", Now.AddDays(-1), Now.AddDays(-1))
|
||||
'sendTOBB("IMEX", Now.AddDays(-1), Now.AddDays(-1))
|
||||
sendTOBB("UNISPED", Now.AddDays(-1), Now.AddDays(-1))
|
||||
End If
|
||||
|
||||
|
||||
Case "VW_DHL" 'umgebaut auf neue Mailsender-Logik
|
||||
If dtParam.Rows.Count = 1 Then
|
||||
System.Console.WriteLine("OPTION erkannt: " & dtParam.Rows(0).Item("ms_info"))
|
||||
If SendEmail_VW_DHL_updateListNEW(dtParam.Rows(0).Item("ms_an"), dtParam.Rows(0).Item("ms_cc"), dtParam.Rows(0).Item("ms_bcc"), dtParam.Rows(0).Item("ms_subject"), dtParam.Rows(0).Item("ms_mailtext")) Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Else
|
||||
|
||||
Case "VW_DHL"
|
||||
System.Console.WriteLine("OPTION erkannt: VW_DHL _ Erstellt eine Liste der LKWs auf Ankunft und Freigabe des Tages.")
|
||||
If SendEmail_VW_DHL_updateList({"volkswagen@verag.ag"}, {}, {"al@verag.ag"}, "VW/DHL - aktuelle LKW Liste") Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Case "BRG_AUSWERTUNG_STANDARD"
|
||||
System.Console.WriteLine("OPTION erkannt: BRG_AUSWERTUNG_STANDARD _ Erstellt die Auswertung der Bürgschaften.")
|
||||
@@ -198,51 +259,94 @@ Module Mail
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Case "THYSSENKRUPP_AUSWERTUNG"
|
||||
|
||||
Case "THYSSENKRUPP_AUSWERTUNG" 'umgebaut auf neue Mailsender-Logik
|
||||
Dim von = CDate("01." & Now.AddMonths(-1).Month & "." & Now.AddMonths(-1).Year)
|
||||
Dim bis = CDate("01." & Now.Month & "." & Now.Year).AddDays(-1)
|
||||
|
||||
Dim EORI As String = "DE2841711"
|
||||
|
||||
If dtParam.Rows.Count = 1 Then
|
||||
System.Console.WriteLine("OPTION erkannt:" & dtParam.Rows(0).Item("ms_info"))
|
||||
System.Console.WriteLine("Auswertung Details gestartet...")
|
||||
If SendEmail_THYSSENKRUPP_AUSWERTUNG(dtParam.Rows(0).Item("ms_an"), EORI, von, bis, dtParam.Rows(0).Item("ms_cc"), dtParam.Rows(0).Item("ms_bcc"), dtParam.Rows(0).Item("ms_subject"), dtParam.Rows(0).Item("ms_mailtext")) Then 'für Andreas Details
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Else
|
||||
System.Console.WriteLine("OPTION erkannt: THYSSENKRUPP_AUSWERTUNG _ Erstellt eine monaltiche Auswertung der DAKSOY-Abfertigungen für THYSSENKRUPP.")
|
||||
System.Console.WriteLine("Auswertung Details gestartet...")
|
||||
If SendEmail_THYSSENKRUPP_AUSWERTUNG("al@verag.ag", EORI, von, bis) Then 'für Andreas Details
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Case "RED_BULL"
|
||||
End If
|
||||
|
||||
|
||||
Case "RED_BULL" 'umgebaut auf neue Mailsender-Logik
|
||||
Dim von = CDate("01." & Now.AddMonths(-1).Month & "." & Now.AddMonths(-1).Year)
|
||||
Dim bis = CDate("01." & Now.Month & "." & Now.Year).AddDays(-1)
|
||||
|
||||
Dim KdNr As String = "756313"
|
||||
If dtParam.Rows.Count = 1 Then
|
||||
System.Console.WriteLine("OPTION erkannt: " & dtParam.Rows(0).Item("ms_info"))
|
||||
System.Console.WriteLine("Auswertung Details gestartet...")
|
||||
If SendEmail_RED_BULL(dtParam.Rows(0).Item("ms_an"), KdNr, von, bis, dtParam.Rows(0).Item("ms_cc"), dtParam.Rows(0).Item("ms_bcc"), dtParam.Rows(0).Item("ms_subject"), dtParam.Rows(0).Item("ms_mailtext")) Then 'für Andreas Details
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Else
|
||||
System.Console.WriteLine("OPTION erkannt: RED_BULL _ Erstellt eine monaltiche Auswertung der DAKSOY-Abfertigungen für RED_BULL/Alpha Tauri.")
|
||||
System.Console.WriteLine("Auswertung Details gestartet...")
|
||||
If SendEmail_RED_BULL("customs.documents.ata@redbull.com", KdNr, von, bis) Then 'für Andreas Details
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
|
||||
Case "JAHRESABRECHNUNG AG-ZS"
|
||||
End If
|
||||
|
||||
Case "JAHRESABRECHNUNG AG-ZS" 'umgebaut auf neue Mailsender-Logik
|
||||
|
||||
Dim von = CDate("01.02." & Now.AddYears(-1).Year)
|
||||
Dim bis = CDate("31.01." & Now.Year)
|
||||
Dim Filialen = "'4803', '5003', '5303'"
|
||||
Dim abfertigungsart = "38"
|
||||
If dtParam.Rows.Count = 1 Then
|
||||
System.Console.WriteLine("OPTION erkannt: " & dtParam.Rows(0).Item("ms_info"))
|
||||
System.Console.WriteLine("Auswertung Details gestartet...")
|
||||
If SendEmail_Jahresauwsertung_AG_ZF(dtParam.Rows(0).Item("ms_an"), Filialen, abfertigungsart, von, bis, dtParam.Rows(0).Item("ms_cc"), dtParam.Rows(0).Item("ms_bcc"), dtParam.Rows(0).Item("ms_subject"), dtParam.Rows(0).Item("ms_mailtext")) Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Else
|
||||
System.Console.WriteLine("OPTION erkannt: JAHRESAUSWERTUNG AG-ZS_ Erstellt eine jährliche Auswertung der Abfertigungen für die BH.")
|
||||
System.Console.WriteLine("Auswertung Details gestartet...")
|
||||
|
||||
If SendEmail_Jahresauwsertung_AG_ZF("as.verag.ag", Filialen, abfertigungsart, von, bis) Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Case "ZF"
|
||||
Case "ZF" 'umgebaut auf neue Mailsender-Logik
|
||||
Dim von = CDate("01." & Now.AddMonths(-1).Month & "." & Now.AddMonths(-1).Year)
|
||||
Dim bis = CDate("01." & Now.Month & "." & Now.Year).AddDays(-1)
|
||||
|
||||
Dim KdNr As String = "714869"
|
||||
|
||||
If dtParam.Rows.Count = 1 Then
|
||||
|
||||
System.Console.WriteLine("OPTION erkannt: " & dtParam.Rows(0).Item("ms_info"))
|
||||
System.Console.WriteLine("Auswertung Details gestartet...")
|
||||
If SendEmail_ZF(dtParam.Rows(0).Item("ms_an"), KdNr, von, bis, dtParam.Rows(0).Item("ms_cc"), dtParam.Rows(0).Item("ms_bcc"), dtParam.Rows(0).Item("ms_subject"), dtParam.Rows(0).Item("ms_mailtext")) Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
System.Console.WriteLine("OPTION erkannt: ZF _ Erstellt eine monaltiche Auswertung der DAKSOY-Abfertigungen für ZF.")
|
||||
System.Console.WriteLine("Auswertung Details gestartet...")
|
||||
If SendEmail_ZF("robert.buchbauer@zf.com; teresa.elster@zf.com", KdNr, von, bis) Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Case "QS_AUFTEILUNG"
|
||||
System.Console.WriteLine("OPTION erkannt: QS_AUFTEILUNG _ Erstellt die Auswertung der QS-AUFTEILUNG.")
|
||||
System.Console.WriteLine("Auswertung gestartet...")
|
||||
@@ -279,7 +383,7 @@ Module Mail
|
||||
Case "DEPOT_Kunden_Auswertung"
|
||||
System.Console.WriteLine("OPTION erkannt: DEPOT_Kunden_Auswertung")
|
||||
System.Console.WriteLine("Vorgang gestartet...")
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
'Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
Dim dt As DataTable = SQL.loadDgvBySql("SELECT KundenNrZentrale FROM [tblKundenErweitert] INNER JOIN Kunden on kundennr= kde_KundenNr where Depot_Kunde = 1", "FMZOLL")
|
||||
If dt IsNot Nothing Then
|
||||
For Each r In dt.Rows
|
||||
@@ -288,36 +392,73 @@ Module Mail
|
||||
End If
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
|
||||
Case "AMBAR_Datev_Mailversand_to_HK"
|
||||
Case "AMBAR_Datev_Mailversand_to_HK" 'umgebaut auf neue Mailsender-Logik
|
||||
|
||||
If dtParam.Rows.Count = 1 Then
|
||||
System.Console.WriteLine("OPTION erkannt: " & dtParam.Rows(0).Item("ms_info"))
|
||||
System.Console.WriteLine("Vorgang gestartet...")
|
||||
SendEmail_AMBARTOHKT(dtParam.Rows(0).Item("ms_an"), dtParam.Rows(0).Item("ms_cc"), dtParam.Rows(0).Item("ms_bcc"), dtParam.Rows(0).Item("ms_subject"), dtParam.Rows(0).Item("ms_mailtext"))
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
Else
|
||||
System.Console.WriteLine("OPTION erkannt: AMBAR-Datev Versand")
|
||||
System.Console.WriteLine("Vorgang gestartet...")
|
||||
SendEmail_AMBARTOHKT()
|
||||
SendEmail_AMBARTOHKT("T.Wesolowski@hkt-tax.de", "C.Tuendermann@hkt-tax.de;D.Horneber@hkt-tax.de,IO@ambarlog.de", "d.breimaier@verag.ag")
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
|
||||
End If
|
||||
|
||||
Case "UID_OPS_SYSKA_ABGLEICH"
|
||||
|
||||
Case "UID_OPS_SYSKA_ABGLEICH" 'umgebaut auf neue Mailsender-Logik
|
||||
If dtParam.Rows.Count = 1 Then
|
||||
System.Console.WriteLine("OPTION erkannt: " & dtParam.Rows(0).Item("ms_info"))
|
||||
System.Console.WriteLine("Vorgang gestartet...")
|
||||
If SendEmail_Syska_UID_Vergleich(dtParam.Rows(0).Item("ms_an"), dtParam.Rows(0).Item("ms_cc"), dtParam.Rows(0).Item("ms_bcc"), dtParam.Rows(0).Item("ms_subject"), dtParam.Rows(0).Item("ms_mailtext")) Then System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
Else
|
||||
System.Console.WriteLine("OPTION erkannt: UID-Vergleich SYSKA")
|
||||
System.Console.WriteLine("Vorgang gestartet...")
|
||||
If SendEmail_Syska_UID_Vergleich("as@verag.ag") Then System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
|
||||
Case "TETRAPAK"
|
||||
|
||||
Case "TETRAPAK" 'umgebaut auf neue Mailsender-Logik
|
||||
Dim von = CDate("01." & Now.AddMonths(-1).Month & "." & Now.AddMonths(-1).Year)
|
||||
Dim bis = CDate("01." & Now.Month & "." & Now.Year).AddDays(-1)
|
||||
If dtParam.Rows.Count = 1 Then
|
||||
System.Console.WriteLine("OPTION erkannt: " & dtParam.Rows(0).Item("ms_info"))
|
||||
System.Console.WriteLine("Auswertung Details gestartet...")
|
||||
If SendEmail_Tetrapak(dtParam.Rows(0).Item("ms_an"), von, bis, "DE", dtParam.Rows(0).Item("ms_cc"), dtParam.Rows(0).Item("ms_bcc"), dtParam.Rows(0).Item("ms_subject"), dtParam.Rows(0).Item("ms_mailtext")) AndAlso SendEmail_Tetrapak(dtParam.Rows(0).Item("ms_an"), von, bis, "AT", dtParam.Rows(0).Item("ms_cc"), dtParam.Rows(0).Item("ms_bcc"), dtParam.Rows(0).Item("ms_subject"), dtParam.Rows(0).Item("ms_mailtext")) Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Else
|
||||
|
||||
System.Console.WriteLine("OPTION erkannt: TETRA_PACK _ Erstellt eine monatliche Auswertung der DAKSOY/EZOLL-Abfertigungen für TETRAPAK.")
|
||||
System.Console.WriteLine("Auswertung Details gestartet...")
|
||||
|
||||
If SendEmail_Tetrapak("Maria.mendez@tetrapak.com; Andrea.Ronceria@tetrapak.com", von, bis, "DE") AndAlso SendEmail_Tetrapak("Maria.mendez@tetrapak.com;Andrea.Ronceria@tetrapak.com", von, bis, "AT") Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Case "Imex_Kunden_keine_Abfertigung"
|
||||
End If
|
||||
|
||||
Case "Imex_Kunden_keine_Abfertigung" 'umgebaut auf neue Mailsender-Logik
|
||||
Dim von = CDate("01." & Now.AddMonths(-1).Month & "." & Now.AddMonths(-1).Year)
|
||||
Dim bis = CDate("01." & Now.Month & "." & Now.Year).AddDays(-1)
|
||||
If dtParam.Rows.Count = 1 Then
|
||||
|
||||
System.Console.WriteLine("OPTION erkannt: " & dtParam.Rows(0).Item("ms_info"))
|
||||
System.Console.WriteLine("Auswertung Details gestartet...")
|
||||
If SendEmail_ImexAbfertigung(dtParam.Rows(0).Item("ms_an"), von, bis, dtParam.Rows(0).Item("ms_cc"), dtParam.Rows(0).Item("ms_bcc"), dtParam.Rows(0).Item("ms_subject"), dtParam.Rows(0).Item("ms_mailtext")) Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
System.Console.WriteLine("OPTION erkannt: Imex-Kunden ohne Abfertigung – Erstellt eine monatliche Auswertung der Imex-Kunden, die in den letzten 2 Jahren keine Abfertigung hatten")
|
||||
System.Console.WriteLine("Auswertung Details gestartet...")
|
||||
If SendEmail_ImexAbfertigung("cf@verag.ag", von, bis) Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
End If
|
||||
|
||||
Case Else
|
||||
System.Console.WriteLine("OPTION nicht erkannt!")
|
||||
End Select
|
||||
@@ -346,7 +487,7 @@ Module Mail
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Sub sendTOBB(FirmaTmp, datVon, datBis)
|
||||
Function sendTOBB(FirmaTmp As String, datVon As Date, datBis As Date, Optional mailto As String = "", Optional cc As String = "", Optional bcc As String = "", Optional Subject As String = "", Optional Body As String = "") As Boolean
|
||||
Dim _erg = VERAG_PROG_ALLGEMEIN.cNCTS_Helper.getXLS_FremdBRG(FirmaTmp, "TOBB - " & VERAG_PROG_ALLGEMEIN.cNCTS_GUARANTEES.getSlashList(VERAG_PROG_ALLGEMEIN.cNCTS_GUARANTEES.TOBB), VERAG_PROG_ALLGEMEIN.cNCTS_GUARANTEES.getSQLList(VERAG_PROG_ALLGEMEIN.cNCTS_GUARANTEES.TOBB), datVon, datBis, True)
|
||||
Dim _list As New List(Of String)
|
||||
Dim addbetreff = ""
|
||||
@@ -360,19 +501,25 @@ Module Mail
|
||||
End Select
|
||||
|
||||
Dim bool_sent = False
|
||||
If mailto = "" Then
|
||||
Select Case FirmaTmp
|
||||
' Case "VERAG/ATILLA" : bool_sent = VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail("al@verag.ag", "TOBB " & FirmaTmp & addbetreff, "*Automatic generated e-mail*",,,, "", "al@verag.ag", _list)
|
||||
Case "VERAG/ATILLA" : bool_sent = VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail("eysan.sans@tobbund.com.tr;kerem.gozutok@tobbund.com.tr;arda.bicakli@tobbund.com.tr;mert.koseoglu@tobbund.com.tr", "TOBB " & FirmaTmp & addbetreff, "*Automatic generated e-mail*",,,, "atilla@verag.ag", "al@verag.ag", _list)
|
||||
Case "IMEX" : bool_sent = VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail("eysan.sans@tobbund.com.tr;kerem.gozutok@tobbund.com.tr;arda.bicakli@tobbund.com.tr;mert.koseoglu@tobbund.com.tr", "TOBB " & FirmaTmp & addbetreff, "*Automatic generated e-mail*",,,, "info@imex-group.at;Mario.Hoefer@imex-group.at", "al@verag.ag", _list)
|
||||
Case "UNISPED" : bool_sent = VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail("eysan.sans@tobbund.com.tr;kerem.gozutok@tobbund.com.tr;arda.bicakli@tobbund.com.tr;mert.koseoglu@tobbund.com.tr", "TOBB " & FirmaTmp & addbetreff, "*Automatic generated e-mail*",,,, "Katharina.Haas@unisped.at;Sabine.Muehlboeck@unisped.at;Ernst.Stolzlechner@unisped.at", "al@verag.ag", _list)
|
||||
End Select
|
||||
Else
|
||||
VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(mailto, Subject & addbetreff, Body,,, False, cc, bcc, _list)
|
||||
End If
|
||||
|
||||
|
||||
If bool_sent Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen (" & FirmaTmp & ") ...")
|
||||
Else
|
||||
System.Console.WriteLine("Fehler beim Senden der Mail (" & FirmaTmp & ") ...")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Return bool_sent
|
||||
End Function
|
||||
|
||||
Function getOption() As String
|
||||
Try
|
||||
@@ -549,7 +696,7 @@ Module Mail
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function SendEmail_THYSSENKRUPP_AUSWERTUNG(Mailto As String, EORI As String, von As Date, bis As Date) As Boolean
|
||||
Private Function SendEmail_THYSSENKRUPP_AUSWERTUNG(Mailto As String, EORI As String, von As Date, bis As Date, Optional cc As String = "", Optional bcc As String = "", Optional Subject As String = "", Optional Body As String = "") As Boolean
|
||||
Try
|
||||
Dim excel As String = genEXCEL_THYSSENKRUPP(EORI, von, bis)
|
||||
System.Console.WriteLine("EXCEL erstellt...")
|
||||
@@ -557,11 +704,23 @@ Module Mail
|
||||
|
||||
System.Console.WriteLine("Sende E-Mail...")
|
||||
|
||||
Dim Subject = "Auswertungen Zollanmeldungen EORI " & EORI
|
||||
Dim Body = "Anbei befinden sich die Auswertungen Zollanmeldungen von " & von.ToShortDateString & " bis " & bis.ToShortDateString & "." &
|
||||
If Subject = "" Then
|
||||
Subject = "Auswertungen Zollanmeldungen EORI " & EORI
|
||||
Else
|
||||
Subject = replaceBodyVariable(Subject)
|
||||
End If
|
||||
|
||||
If Body = "" Then
|
||||
Body = "Anbei befinden sich die Auswertungen Zollanmeldungen von " & von.ToShortDateString & " bis " & bis.ToShortDateString & "." &
|
||||
"<br><br>Erstellt am: " & Now.ToShortDateString & ", um " & Now.ToShortTimeString &
|
||||
"<br><br><br>Automatisch generiertes E-Mail. Bitte Antworten Sie nicht an dieses E-Mail." &
|
||||
"<br><br>VERAG SPEDITION AG"
|
||||
Else
|
||||
|
||||
Body = replaceBodyVariable(Body, von, bis)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim anhenge As New List(Of String)
|
||||
@@ -585,7 +744,7 @@ Module Mail
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function SendEmail_RED_BULL(Mailto As String, KdNr As String, von As Date, bis As Date) As Boolean
|
||||
Private Function SendEmail_RED_BULL(Mailto As String, KdNr As String, von As Date, bis As Date, Optional cc As String = "", Optional bcc As String = "", Optional Subject As String = "", Optional Body As String = "") As Boolean
|
||||
Try
|
||||
Dim excel As String = genEXCEL_RED_BULL(KdNr, von, bis)
|
||||
System.Console.WriteLine("EXCEL erstellt...")
|
||||
@@ -593,11 +752,19 @@ Module Mail
|
||||
|
||||
System.Console.WriteLine("Sende E-Mail...")
|
||||
|
||||
Dim Subject = "Auswertungen Zollanmeldungen Aplha Tauri "
|
||||
Dim Body = "Anbei befinden sich die Auswertungen Zollanmeldungen von " & von.ToShortDateString & " bis " & bis.ToShortDateString & "." &
|
||||
If Subject = "" Then
|
||||
Subject = "Auswertungen Zollanmeldungen Aplha Tauri "
|
||||
End If
|
||||
|
||||
If Body = "" Then
|
||||
Body = "Anbei befinden sich die Auswertungen Zollanmeldungen von " & von.ToShortDateString & " bis " & bis.ToShortDateString & "." &
|
||||
"<br><br>Erstellt am: " & Now.ToShortDateString & ", um " & Now.ToShortTimeString &
|
||||
"<br><br><br>Automatisch generiertes E-Mail. Bitte Antworten Sie nicht an dieses E-Mail." &
|
||||
"<br><br>VERAG SPEDITION AG"
|
||||
Else
|
||||
Body = replaceBodyVariable(Body, von, bis)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim anhenge As New List(Of String)
|
||||
@@ -621,7 +788,7 @@ Module Mail
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function SendEmail_ImexAbfertigung(Mailto As String, von As Date, bis As Date) As Boolean
|
||||
Private Function SendEmail_ImexAbfertigung(Mailto As String, von As Date, bis As Date, Optional cc As String = "", Optional bcc As String = "", Optional Subject As String = "", Optional Body As String = "") As Boolean
|
||||
Try
|
||||
Dim excel As String = genImex_Abfertigung(von, bis)
|
||||
System.Console.WriteLine("EXCEL erstellt...")
|
||||
@@ -629,16 +796,24 @@ Module Mail
|
||||
|
||||
System.Console.WriteLine("Sende E-Mail...")
|
||||
|
||||
Dim Subject = "Imex-Kunden ohne Abfertigung "
|
||||
Dim Body = "Anbei befinden sich die Auswertung von " & von.ToShortDateString & " bis " & bis.ToShortDateString & "." &
|
||||
If Subject = "" Then
|
||||
Subject = "Imex-Kunden ohne Abfertigung "
|
||||
End If
|
||||
|
||||
If Body = "" Then
|
||||
Body = "Anbei befinden sich die Auswertung von " & von.ToShortDateString & " bis " & bis.ToShortDateString & "." &
|
||||
"<br><br>Erstellt am: " & Now.ToShortDateString & ", um " & Now.ToShortTimeString &
|
||||
"<br><br><br>Automatisch generiertes E-Mail. Bitte Antworten Sie nicht an diese E-Mail." &
|
||||
"<br><br>VERAG SPEDITION AG"
|
||||
|
||||
Else
|
||||
Body = replaceBodyVariable(Body, von, bis)
|
||||
End If
|
||||
|
||||
|
||||
Dim anhenge As New List(Of String)
|
||||
anhenge.Add(excel)
|
||||
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(Mailto, Subject, Body,,, False,, "m.ilhan@verag.ag", anhenge) Then
|
||||
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(Mailto, Subject, Body,,, False, cc, bcc, anhenge) Then
|
||||
System.Console.WriteLine("E-Mail gesendet.")
|
||||
System.Console.WriteLine("Erfolgreich!")
|
||||
Else
|
||||
@@ -656,7 +831,7 @@ Module Mail
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Private Function SendEmail_Jahresauwsertung_AG_ZF(Mailto As String, abfertigungsart As Integer, Filialnr As String, von As Date, bis As Date) As Boolean
|
||||
Private Function SendEmail_Jahresauwsertung_AG_ZF(Mailto As String, abfertigungsart As Integer, Filialnr As String, von As Date, bis As Date, Optional cc As String = "", Optional bcc As String = "", Optional Subject As String = "", Optional Body As String = "") As Boolean
|
||||
Try
|
||||
Dim excel As String = genEXCEL_ANNA(Filialnr, abfertigungsart, von, bis)
|
||||
System.Console.WriteLine("EXCEL erstellt...")
|
||||
@@ -664,16 +839,23 @@ Module Mail
|
||||
|
||||
System.Console.WriteLine("Sende E-Mail...")
|
||||
|
||||
Dim Subject = "Auswertungen Jahresauswertung A-ZF "
|
||||
Dim Body = "Anbei befinden sich die Auswertungen Zollanmeldungen von " & von.ToShortDateString & " bis " & bis.ToShortDateString & "." &
|
||||
If Subject = "" Then
|
||||
Else
|
||||
Subject = "Auswertungen Jahresauswertung A-ZF "
|
||||
End If
|
||||
|
||||
If Body = "" Then
|
||||
Body = "Anbei befinden sich die Auswertungen Zollanmeldungen von " & von.ToShortDateString & " bis " & bis.ToShortDateString & "." &
|
||||
"<br><br>Erstellt am: " & Now.ToShortDateString & ", um " & Now.ToShortTimeString &
|
||||
"<br><br><br>Automatisch generiertes E-Mail. Bitte Antworten Sie nicht an dieses E-Mail." &
|
||||
"<br><br>VERAG SPEDITION AG"
|
||||
|
||||
Else
|
||||
Body = replaceBodyVariable(Body, von, bis)
|
||||
End If
|
||||
|
||||
Dim anhenge As New List(Of String)
|
||||
anhenge.Add(excel)
|
||||
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(Mailto, Subject, Body,,, False,, "d.breimaier@verag.ag", anhenge) Then
|
||||
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(Mailto, Subject, Body,,, False, cc, bcc, anhenge) Then
|
||||
System.Console.WriteLine("E-Mail gesendet.")
|
||||
System.Console.WriteLine("Erfolgreich!")
|
||||
Else
|
||||
@@ -692,7 +874,7 @@ Module Mail
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function SendEmail_ZF(Mailto As String, KdNr As String, von As Date, bis As Date) As Boolean
|
||||
Private Function SendEmail_ZF(Mailto As String, KdNr As String, von As Date, bis As Date, Optional cc As String = "", Optional bcc As String = "", Optional Subject As String = "", Optional Body As String = "") As Boolean
|
||||
Try
|
||||
Dim excel As String = genEXCEL_ZF(KdNr, von, bis)
|
||||
System.Console.WriteLine("EXCEL erstellt...")
|
||||
@@ -700,16 +882,26 @@ Module Mail
|
||||
|
||||
System.Console.WriteLine("Sende E-Mail...")
|
||||
|
||||
Dim Subject = "Auswertungen Zollanmeldungen ZF Friedrichshafen AG "
|
||||
Dim Body = "Anbei befinden sich die Auswertungen Zollanmeldungen von " & von.ToShortDateString & " bis " & bis.ToShortDateString & "." &
|
||||
If Subject = "" Then
|
||||
Subject = "Auswertungen Zollanmeldungen ZF Friedrichshafen AG "
|
||||
Else
|
||||
Subject = replaceBodyVariable(Body, von, bis)
|
||||
End If
|
||||
|
||||
|
||||
If Body = "" Then
|
||||
Body = "Anbei befinden sich die Auswertungen Zollanmeldungen von " & von.ToShortDateString & " bis " & bis.ToShortDateString & "." &
|
||||
"<br><br>Erstellt am: " & Now.ToShortDateString & ", um " & Now.ToShortTimeString &
|
||||
"<br><br><br>Automatisch generiertes E-Mail. Bitte Antworten Sie nicht an dieses E-Mail." &
|
||||
"<br><br>VERAG SPEDITION AG"
|
||||
|
||||
Else
|
||||
Body = replaceBodyVariable(Body, von, bis)
|
||||
End If
|
||||
|
||||
Dim anhenge As New List(Of String)
|
||||
anhenge.Add(excel)
|
||||
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(Mailto, Subject, Body,,, False,, "d.breimaier@verag.ag;ra@verag.ag", anhenge) Then
|
||||
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(Mailto, Subject, Body,,, False, cc, bcc, anhenge) Then
|
||||
System.Console.WriteLine("E-Mail gesendet.")
|
||||
System.Console.WriteLine("Erfolgreich!")
|
||||
Else
|
||||
@@ -1302,24 +1494,42 @@ Module Mail
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function SendEmail_Syska_UID_Vergleich(Mailto As String) As Boolean
|
||||
Private Function SendEmail_OP5000NEW(firma As String, LandEinschr As String, Mailto As String, Optional cc As String = "", Optional bcc As String = "", Optional Subject As String = "", Optional Body As String = "") As Boolean
|
||||
Try
|
||||
Dim excel As String = genEXCEL_Syska_UID_VERGLEICH()
|
||||
System.Console.WriteLine("EXCEL erstellt...")
|
||||
|
||||
|
||||
Dim datum As String = Now.AddDays(-1).ToShortDateString
|
||||
System.Console.WriteLine("Erstelle EXCEL...")
|
||||
Dim excel As String = ""
|
||||
Select Case firma
|
||||
Case "ATILLA"
|
||||
excel = genEXCEL_TR_ATILLA(LandEinschr)
|
||||
Case "IMEX"
|
||||
excel = genEXCEL_TR_IMEX(LandEinschr)
|
||||
Case "VERAG"
|
||||
excel = genEXCEL_TR(LandEinschr)
|
||||
End Select
|
||||
|
||||
If excel <> "" And Not excel.StartsWith("ERROR: ") Then
|
||||
|
||||
System.Console.WriteLine("Sende E-Mail...")
|
||||
|
||||
Dim Subject = "Auswertungen Syska UID-Vergleich "
|
||||
Dim Body = "Anbei befinden sich der UID-Nr Vergleich mit Syska." &
|
||||
"<br><br>Erstellt am: " & Now.ToShortDateString & ", um " & Now.ToShortTimeString &
|
||||
"<br><br><br>Automatisch generiertes E-Mail. Bitte Antworten Sie nicht an dieses E-Mail." &
|
||||
"<br><br>VERAG SPEDITION AG"
|
||||
If Body = "" Then
|
||||
Body = "Anbei befindet sich die Liste der türkischen Kunden mit einem offenen Rechnungsbetrag von über 1.000,- EUR." & vbNewLine & vbNewLine & "Stand: " & Now.ToShortDateString & " " & Now.ToShortTimeString & vbNewLine & vbNewLine & vbNewLine & "Automatisch generiertes E-Mail."
|
||||
Else
|
||||
Body = Subject = replaceBodyVariable(Body)
|
||||
End If
|
||||
|
||||
If Subject = "" Then
|
||||
Subject = "Auswertungen Syska UID-Vergleich "
|
||||
Else
|
||||
Subject = replaceBodyVariable(Subject)
|
||||
End If
|
||||
|
||||
|
||||
Dim anhenge As New List(Of String)
|
||||
anhenge.Add(excel)
|
||||
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(Mailto, Subject, Body,,, False,, "d.breimaier@verag.ag", anhenge) Then
|
||||
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(Mailto, Subject, Body,,, False, cc, bcc, anhenge) Then
|
||||
System.Console.WriteLine("E-Mail gesendet.")
|
||||
System.Console.WriteLine("Erfolgreich!")
|
||||
Else
|
||||
@@ -1338,7 +1548,132 @@ Module Mail
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function SendEmail_Tetrapak(Mailto As String, von As Date, bis As Date, Report As String) As Boolean
|
||||
|
||||
|
||||
Private Function SendEmail_OPKreditlimitNEW(Mailto As String, Optional cc As String = "", Optional bcc As String = "", Optional Subject As String = "", Optional Body As String = "") As Boolean
|
||||
Try
|
||||
Dim excel As String = genEXCEL_OPKreditlimit()
|
||||
System.Console.WriteLine("EXCEL erstellt...")
|
||||
If excel <> "" And Not excel.StartsWith("ERROR: ") Then
|
||||
|
||||
System.Console.WriteLine("Sende E-Mail...")
|
||||
|
||||
If Body = "" Then
|
||||
Body = "Anbei befindet sich die Liste der Kunden mit einem offenen Rechnungsbetrag über dem eingegebenen Kreditlimit " & vbNewLine & vbNewLine & "ACHTUNG: Kunden ohne hinterlegten Kreditlimit sind nciht in der Liste beinhaltet." & vbNewLine & vbNewLine & "Stand: " & Now.ToShortDateString & " " & Now.ToShortTimeString & vbNewLine & vbNewLine & vbNewLine & "Automatisch generiertes E-Mail."
|
||||
Else
|
||||
Body = replaceBodyVariable(Body)
|
||||
End If
|
||||
|
||||
If Subject = "" Then
|
||||
Subject = "Kunden - Offene Rechnungen - ACHTUNG: nur mit erfasstem Kreditlimit"
|
||||
Else
|
||||
Subject = replaceBodyVariable(Subject)
|
||||
End If
|
||||
|
||||
|
||||
Dim anhenge As New List(Of String)
|
||||
anhenge.Add(excel)
|
||||
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(Mailto, Subject, Body,,, False, cc, bcc, anhenge) Then
|
||||
System.Console.WriteLine("E-Mail gesendet.")
|
||||
System.Console.WriteLine("Erfolgreich!")
|
||||
Else
|
||||
System.Console.WriteLine("ERROR BEIM SENDEN DER MAIL!")
|
||||
|
||||
End If
|
||||
|
||||
Return True
|
||||
Else
|
||||
System.Console.WriteLine(excel)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name, VERAG_PROG_ALLGEMEIN.ERROR_OP.MAIL)
|
||||
System.Console.WriteLine(ex.Message & ex.StackTrace)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
Private Function SendEmail_VW_DHL_updateListNEW(Mailto As String, Optional cc As String = "", Optional bcc As String = "", Optional Subject As String = "", Optional Body As String = "") As Boolean
|
||||
Try
|
||||
Dim datum As String = Now.AddDays(-1).ToShortDateString
|
||||
System.Console.WriteLine("Erstelle EXCEL...")
|
||||
Dim excel As String = genEXCEL_VW_DHL()
|
||||
System.Console.WriteLine("EXCEL erstellt...")
|
||||
If excel <> "" And Not excel.StartsWith("ERROR: ") Then
|
||||
|
||||
System.Console.WriteLine("Sende E-Mail...")
|
||||
|
||||
Body = replaceBodyVariable(Body)
|
||||
Subject = replaceBodyVariable(Subject)
|
||||
|
||||
Dim anhenge As New List(Of String)
|
||||
anhenge.Add(excel)
|
||||
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(Mailto, Subject, Body,,, False, cc, bcc, anhenge) Then
|
||||
System.Console.WriteLine("E-Mail gesendet.")
|
||||
System.Console.WriteLine("Erfolgreich!")
|
||||
Else
|
||||
System.Console.WriteLine("ERROR BEIM SENDEN DER MAIL!")
|
||||
|
||||
End If
|
||||
|
||||
Return True
|
||||
Else
|
||||
System.Console.WriteLine(excel)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name, VERAG_PROG_ALLGEMEIN.ERROR_OP.MAIL)
|
||||
System.Console.WriteLine(ex.Message & ex.StackTrace)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Private Function SendEmail_Syska_UID_Vergleich(Mailto As String, Optional cc As String = "", Optional bcc As String = "", Optional Subject As String = "", Optional Body As String = "") As Boolean
|
||||
Try
|
||||
Dim excel As String = genEXCEL_Syska_UID_VERGLEICH()
|
||||
System.Console.WriteLine("EXCEL erstellt...")
|
||||
If excel <> "" And Not excel.StartsWith("ERROR: ") Then
|
||||
|
||||
System.Console.WriteLine("Sende E-Mail...")
|
||||
|
||||
If Body = "" Then
|
||||
Body = "Anbei befinden sich der UID-Nr Vergleich mit Syska." &
|
||||
"<br><br>Erstellt am: " & Now.ToShortDateString & ", um " & Now.ToShortTimeString &
|
||||
"<br><br><br>Automatisch generiertes E-Mail. Bitte Antworten Sie nicht an dieses E-Mail." &
|
||||
"<br><br>VERAG SPEDITION AG"
|
||||
Else
|
||||
Body = Subject = replaceBodyVariable(Body)
|
||||
End If
|
||||
|
||||
If Subject = "" Then
|
||||
Subject = "Auswertungen Syska UID-Vergleich "
|
||||
End If
|
||||
|
||||
|
||||
Dim anhenge As New List(Of String)
|
||||
anhenge.Add(excel)
|
||||
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(Mailto, Subject, Body,,, False, cc, bcc, anhenge) Then
|
||||
System.Console.WriteLine("E-Mail gesendet.")
|
||||
System.Console.WriteLine("Erfolgreich!")
|
||||
Else
|
||||
System.Console.WriteLine("ERROR BEIM SENDEN DER MAIL!")
|
||||
|
||||
End If
|
||||
|
||||
Return True
|
||||
Else
|
||||
System.Console.WriteLine(excel)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name, VERAG_PROG_ALLGEMEIN.ERROR_OP.MAIL)
|
||||
System.Console.WriteLine(ex.Message & ex.StackTrace)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
Private Function SendEmail_Tetrapak(Mailto As String, von As Date, bis As Date, Report As String, Optional cc As String = "", Optional bcc As String = "", Optional Subject As String = "", Optional Body As String = "") As Boolean
|
||||
Try
|
||||
Dim anhenge As New List(Of String)
|
||||
|
||||
@@ -1364,14 +1699,28 @@ Module Mail
|
||||
|
||||
System.Console.WriteLine("Sende E-Mail...")
|
||||
|
||||
Dim Subject = "Import Customs Statistics " & Report & " " & von & "-" & bis
|
||||
Dim Body = "Dear sir or madam," &
|
||||
If Subject = "" Then
|
||||
Subject = "Import Customs Statistics " & Report & " " & von & "-" & bis
|
||||
Else
|
||||
Subject = Subject.Replace("%report%", Report)
|
||||
Subject = replaceBodyVariable(Subject)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Body = "" Then
|
||||
Body = "Dear sir or madam," &
|
||||
"<br><br>enclosed the import customs statistics for " & Report & "." &
|
||||
"<br><br>Created at: " & Now.ToShortDateString & ", on " & Now.ToShortTimeString &
|
||||
"<br><br><br>Automatically generated e-mail. Please do not reply to this e-mail." &
|
||||
"<br><br>VERAG SPEDITION AG"
|
||||
Else
|
||||
Body = Subject = replaceBodyVariable(Body)
|
||||
Body = Body.Replace("%report%", Report)
|
||||
End If
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(Mailto, Subject, Body,,, False,, "d.breimaier@verag.ag", anhenge) Then
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(Mailto, Subject, Body,,, False, cc, bcc, anhenge) Then
|
||||
System.Console.WriteLine("E-Mail gesendet.")
|
||||
System.Console.WriteLine("Erfolgreich!")
|
||||
Else
|
||||
@@ -1466,26 +1815,10 @@ Module Mail
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function SendEmail_AMBARTOHKT() As Boolean
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
|
||||
|
||||
Dim Msg As New MailMessage
|
||||
Dim myCredentials As New System.Net.NetworkCredential
|
||||
myCredentials.UserName = "support@verag.ag"
|
||||
myCredentials.Password = supportPWD
|
||||
|
||||
Msg.IsBodyHtml = False
|
||||
Dim mySmtpsvr As New SmtpClient()
|
||||
|
||||
mySmtpsvr.Host = "owa.verag.ag"
|
||||
mySmtpsvr.Port = 587 '25 '587 '25
|
||||
mySmtpsvr.UseDefaultCredentials = False
|
||||
mySmtpsvr.Credentials = myCredentials
|
||||
System.Console.WriteLine("E-Mail Daten initialisiert...")
|
||||
|
||||
Private Function SendEmail_AMBARTOHKT(Mailto As String, Optional cc As String = "", Optional bcc As String = "", Optional Subject As String = "", Optional Body As String = "") As Boolean
|
||||
|
||||
Try
|
||||
|
||||
System.Console.WriteLine("Erstelle Buchungsdateien...")
|
||||
Dim Pathlist As New List(Of String)
|
||||
If VERAG_PROG_ALLGEMEIN.cDatev_Interface.genDatensatzCSV_ALL("AMBAR", False, True, True,, Pathlist) Then
|
||||
@@ -1495,53 +1828,43 @@ Module Mail
|
||||
Return False
|
||||
End If
|
||||
|
||||
System.Console.WriteLine("Sende E-Mail...")
|
||||
|
||||
Msg.To.Add("T.Wesolowski@hkt-tax.de")
|
||||
Msg.CC.Add("C.Tuendermann@hkt-tax.de")
|
||||
Msg.CC.Add("D.Horneber@hkt-tax.de")
|
||||
Msg.CC.Add("IO@ambarlog.de")
|
||||
Msg.Bcc.Add("d.breimaier@verag.ag")
|
||||
If Body = "" Then
|
||||
Body = "Sehr geehrte Damen und Herren," &
|
||||
"<br><br> im Anhang befinden sich die Exportdaten für die Buchhaltung!" &
|
||||
"<br><br>Mit freundlichen Grüßen " &
|
||||
"<br><br> automatisch generiertes E-Mail"
|
||||
Else
|
||||
Body = replaceBodyVariable(Body)
|
||||
|
||||
Msg.From = New MailAddress("support@verag.ag")
|
||||
End If
|
||||
|
||||
Msg.Body = "Sehr geehrte Damen und Herren," & vbNewLine & vbNewLine & " im Anhang befinden sich die Exportdaten für die Buchhaltung!" & vbNewLine & vbNewLine & "Mit freundlichen Grüßen" & vbNewLine & "automatisch generiertes E-Mail"
|
||||
If Subject = "" Then
|
||||
Subject = "DATEV-Buchungsdaten AMBAR " & Now.Date.ToShortDateString
|
||||
Else
|
||||
Subject = replaceBodyVariable(Subject)
|
||||
End If
|
||||
|
||||
Msg.Subject = "DATEV-Buchungsdaten AMBAR " & Now.Date.ToShortDateString
|
||||
|
||||
For Each path In Pathlist
|
||||
Dim attachment As Attachment = New Attachment(path)
|
||||
Msg.Attachments.Add(attachment)
|
||||
Next
|
||||
|
||||
mySmtpsvr.Send(Msg)
|
||||
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(Mailto, Subject, Body,,, False, cc, bcc, Pathlist) Then
|
||||
System.Console.WriteLine("E-Mail gesendet.")
|
||||
System.Console.WriteLine("Erfolgreich!")
|
||||
Else
|
||||
System.Console.WriteLine("ERROR BEIM SENDEN DER MAIL!")
|
||||
|
||||
End If
|
||||
|
||||
Return True
|
||||
|
||||
Catch ex As Exception
|
||||
Try
|
||||
mySmtpsvr.Port = 25
|
||||
mySmtpsvr.Send(Msg)
|
||||
|
||||
Catch ex2 As Exception
|
||||
Try
|
||||
mySmtpsvr.Host = "192.168.0.107"
|
||||
mySmtpsvr.Port = 25
|
||||
mySmtpsvr.Send(Msg)
|
||||
|
||||
Catch ex3 As Exception
|
||||
MsgBox(ex3.Message & ex3.StackTrace)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name, VERAG_PROG_ALLGEMEIN.ERROR_OP.MAIL)
|
||||
System.Console.WriteLine(ex.Message & ex.StackTrace)
|
||||
Return False
|
||||
End Try
|
||||
End Try
|
||||
|
||||
|
||||
End Try
|
||||
Return False
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Function getDateFromFile() As String
|
||||
Try
|
||||
Dim instr = New StreamReader(last_sent)
|
||||
@@ -2398,70 +2721,14 @@ Module Mail
|
||||
Dim dtKunden As DataTable = loadDgvBySqlFMZOLL(sqlstrKunden)
|
||||
If dtKunden.Rows.Count = 0 Then Return ""
|
||||
|
||||
|
||||
|
||||
'Dim dtmerged As New DataTable
|
||||
'dtmerged.Columns.Add("KundenNr", GetType(Integer))
|
||||
'dtmerged.Columns.Add("UIDNrKunden", GetType(String))
|
||||
'dtmerged.Columns.Add("UIDNrDebitoren", GetType(String))
|
||||
|
||||
'Dim dtmerged2 = dtmerged.Clone
|
||||
|
||||
'If dtKunden IsNot Nothing AndAlso dtDebitoren IsNot Nothing Then
|
||||
' dtmerged.Merge(dtKunden, False, MissingSchemaAction.Add)
|
||||
' dtmerged.Merge(dtDebitoren, True, MissingSchemaAction.Add)
|
||||
'End If
|
||||
|
||||
|
||||
'Dim tableResult = dtmerged2.Clone()
|
||||
|
||||
|
||||
|
||||
'dtmerged2 = (From d1 In dtKunden.AsEnumerable()
|
||||
' Join d2 In dtDebitoren.AsEnumerable() On d1.Item("KundenNr") Equals d2.Item("KundenNr")
|
||||
' Select dtmerged2.LoadDataRow(New Object() {d1.Item("KundenNr"), d1.Item("UIDNrKunden"), d2.Item("UIDNrDebitoren")}, False)).CopyToDataTable
|
||||
|
||||
|
||||
|
||||
|
||||
'Dim groups = dtmerged.AsEnumerable().
|
||||
'GroupBy(Function(row) New With {
|
||||
'Key .Id = row.Field(Of Integer)("KundenNr"),
|
||||
'Key .UIDK = row.Field(Of String)("UIDNrKunden"),
|
||||
'Key .UIDD = row.Field(Of String)("UIDNrDebitoren"),
|
||||
'Key .Mandant = row.Field(Of String)("Mandant")
|
||||
'})
|
||||
|
||||
|
||||
'Dim groups = dtmerged.AsEnumerable().
|
||||
'GroupBy(Function(row) New With {
|
||||
'Key .Id = row.Field(Of Integer)("KundenNr")
|
||||
'})
|
||||
|
||||
|
||||
|
||||
|
||||
'For Each grp In groups
|
||||
|
||||
' Dim ID = (grp.Key.Id)
|
||||
' 'Dim UIDNrKd = IIf((grp.Key.UIDK) Is Nothing, "-", grp.Key.UIDK)
|
||||
' 'Dim UIDNrDEB = IIf((grp.Key.UIDD) Is Nothing, "-", grp.Key.UIDD)
|
||||
' 'Dim Mandant = IIf((grp.Key.Mandant) Is Nothing, "-", grp.Key.Mandant)
|
||||
|
||||
'Next
|
||||
|
||||
System.Console.WriteLine("Vorhandene Datensätze: " & dtKunden.Rows.Count)
|
||||
|
||||
wb.Worksheets.Add(dtKunden, i.Text)
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
|
||||
wb.SaveAs(sPath & "TMP.xlsx")
|
||||
|
||||
|
||||
Return sPath & "TMP.xlsx"
|
||||
|
||||
Catch ex As Exception
|
||||
@@ -2651,4 +2918,18 @@ Module Mail
|
||||
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Public Function replaceBodyVariable(txt As String, Optional von As Date = Nothing, Optional bis As Date = Nothing) As String
|
||||
|
||||
If txt = "" Then Return ""
|
||||
|
||||
If IsDate(von) Then txt = txt.Replace("%von%", von.ToShortDateString)
|
||||
If IsDate(bis) Then txt = txt.Replace("%bis%", bis.ToShortDateString)
|
||||
txt = txt.Replace("%today%", Now.ToShortDateString)
|
||||
txt = txt.Replace("%now%", Now.ToShortTimeString)
|
||||
txt = txt.Replace("%now%", Now.ToShortTimeString)
|
||||
|
||||
Return txt
|
||||
|
||||
End Function
|
||||
End Module
|
||||
|
||||
@@ -642,6 +642,12 @@
|
||||
<Compile Include="Programme\usrCntlProgramme.vb">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="usrCntlMailsender_.Designer.vb">
|
||||
<DependentUpon>usrCntlMailsender_.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="usrCntlMailsender_.vb">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="usrCntlDatenarchiv.Designer.vb">
|
||||
<DependentUpon>usrCntlDatenarchiv.vb</DependentUpon>
|
||||
</Compile>
|
||||
@@ -852,6 +858,9 @@
|
||||
<EmbeddedResource Include="Programme\usrCntlProgramme.resx">
|
||||
<DependentUpon>usrCntlProgramme.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="usrCntlMailsender_.resx">
|
||||
<DependentUpon>usrCntlMailsender_.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="usrCntlDatenarchiv.resx">
|
||||
<DependentUpon>usrCntlDatenarchiv.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
@@ -230,7 +230,7 @@ Public Class frmMain
|
||||
|
||||
Private Sub btnMailroutine_Click(sender As Object, e As EventArgs) Handles btnMailroutine.Click
|
||||
clrPnlMain()
|
||||
Dim usrCntl As New usrCntlDatenarchiv("tblMailsender", "ADMIN")
|
||||
Dim usrCntl As New usrCntlMailsender_("tblMailsender", "ADMIN")
|
||||
pnlMain.Controls.Add(usrCntl)
|
||||
usrCntl.Dock = DockStyle.Fill
|
||||
button_Click(sender)
|
||||
|
||||
352
UID/usrCntlMailsender_.Designer.vb
generated
Normal file
352
UID/usrCntlMailsender_.Designer.vb
generated
Normal file
@@ -0,0 +1,352 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class usrCntlMailsender_
|
||||
Inherits System.Windows.Forms.UserControl
|
||||
|
||||
'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.SplitContainer = New System.Windows.Forms.SplitContainer()
|
||||
Me.pnlSearch = New System.Windows.Forms.Panel()
|
||||
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
|
||||
Me.cbxaktiv = New System.Windows.Forms.CheckBox()
|
||||
Me.cboPartnersystem = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.Label8 = New System.Windows.Forms.Label()
|
||||
Me.btnSuche = New System.Windows.Forms.Button()
|
||||
Me.pnlAnzeige = New System.Windows.Forms.Panel()
|
||||
Me.DataGridView = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.btnSave = New System.Windows.Forms.Button()
|
||||
Me.lblErgebnis = New System.Windows.Forms.Label()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.txtMaxSrch = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Button10 = New System.Windows.Forms.Button()
|
||||
Me.Button11 = New System.Windows.Forms.Button()
|
||||
Me.Label9 = New System.Windows.Forms.Label()
|
||||
Me.txtSuche = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
CType(Me.SplitContainer, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer.Panel1.SuspendLayout()
|
||||
Me.SplitContainer.Panel2.SuspendLayout()
|
||||
Me.SplitContainer.SuspendLayout()
|
||||
Me.pnlSearch.SuspendLayout()
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer1.Panel1.SuspendLayout()
|
||||
Me.SplitContainer1.SuspendLayout()
|
||||
Me.pnlAnzeige.SuspendLayout()
|
||||
CType(Me.DataGridView, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'SplitContainer
|
||||
'
|
||||
Me.SplitContainer.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1
|
||||
Me.SplitContainer.IsSplitterFixed = True
|
||||
Me.SplitContainer.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainer.Name = "SplitContainer"
|
||||
Me.SplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal
|
||||
'
|
||||
'SplitContainer.Panel1
|
||||
'
|
||||
Me.SplitContainer.Panel1.Controls.Add(Me.pnlSearch)
|
||||
'
|
||||
'SplitContainer.Panel2
|
||||
'
|
||||
Me.SplitContainer.Panel2.Controls.Add(Me.pnlAnzeige)
|
||||
Me.SplitContainer.Size = New System.Drawing.Size(1020, 687)
|
||||
Me.SplitContainer.SplitterDistance = 80
|
||||
Me.SplitContainer.SplitterWidth = 2
|
||||
Me.SplitContainer.TabIndex = 3
|
||||
'
|
||||
'pnlSearch
|
||||
'
|
||||
Me.pnlSearch.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
|
||||
Me.pnlSearch.BackColor = System.Drawing.Color.White
|
||||
Me.pnlSearch.Controls.Add(Me.SplitContainer1)
|
||||
Me.pnlSearch.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.pnlSearch.Location = New System.Drawing.Point(0, 0)
|
||||
Me.pnlSearch.Name = "pnlSearch"
|
||||
Me.pnlSearch.Size = New System.Drawing.Size(1020, 80)
|
||||
Me.pnlSearch.TabIndex = 0
|
||||
'
|
||||
'SplitContainer1
|
||||
'
|
||||
Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1
|
||||
Me.SplitContainer1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainer1.Name = "SplitContainer1"
|
||||
Me.SplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal
|
||||
'
|
||||
'SplitContainer1.Panel1
|
||||
'
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.txtSuche)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Label9)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.cbxaktiv)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.cboPartnersystem)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Label8)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.btnSuche)
|
||||
Me.SplitContainer1.Panel2Collapsed = True
|
||||
Me.SplitContainer1.Size = New System.Drawing.Size(1020, 80)
|
||||
Me.SplitContainer1.SplitterDistance = 55
|
||||
Me.SplitContainer1.TabIndex = 0
|
||||
'
|
||||
'cbxaktiv
|
||||
'
|
||||
Me.cbxaktiv.AutoSize = True
|
||||
Me.cbxaktiv.Location = New System.Drawing.Point(27, 9)
|
||||
Me.cbxaktiv.Name = "cbxaktiv"
|
||||
Me.cbxaktiv.Size = New System.Drawing.Size(49, 17)
|
||||
Me.cbxaktiv.TabIndex = 55
|
||||
Me.cbxaktiv.Text = "aktiv"
|
||||
Me.cbxaktiv.UseVisualStyleBackColor = True
|
||||
'
|
||||
'cboPartnersystem
|
||||
'
|
||||
Me.cboPartnersystem._allowedValuesFreiText = Nothing
|
||||
Me.cboPartnersystem._allowFreiText = False
|
||||
Me.cboPartnersystem._value = ""
|
||||
Me.cboPartnersystem.DropDownWidth = 250
|
||||
Me.cboPartnersystem.Font = New System.Drawing.Font("Microsoft Tai Le", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.cboPartnersystem.FormattingEnabled = True
|
||||
Me.cboPartnersystem.Location = New System.Drawing.Point(18, 44)
|
||||
Me.cboPartnersystem.Name = "cboPartnersystem"
|
||||
Me.cboPartnersystem.Size = New System.Drawing.Size(73, 22)
|
||||
Me.cboPartnersystem.TabIndex = 54
|
||||
'
|
||||
'Label8
|
||||
'
|
||||
Me.Label8.AutoSize = True
|
||||
Me.Label8.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label8.Location = New System.Drawing.Point(15, 29)
|
||||
Me.Label8.Name = "Label8"
|
||||
Me.Label8.Size = New System.Drawing.Size(46, 13)
|
||||
Me.Label8.TabIndex = 45
|
||||
Me.Label8.Text = "Param:"
|
||||
'
|
||||
'btnSuche
|
||||
'
|
||||
Me.btnSuche.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnSuche.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.btnSuche.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnSuche.Location = New System.Drawing.Point(850, 9)
|
||||
Me.btnSuche.Name = "btnSuche"
|
||||
Me.btnSuche.Size = New System.Drawing.Size(162, 52)
|
||||
Me.btnSuche.TabIndex = 28
|
||||
Me.btnSuche.Text = "Ergebnisse laden"
|
||||
Me.btnSuche.UseVisualStyleBackColor = True
|
||||
'
|
||||
'pnlAnzeige
|
||||
'
|
||||
Me.pnlAnzeige.BackColor = System.Drawing.Color.White
|
||||
Me.pnlAnzeige.Controls.Add(Me.DataGridView)
|
||||
Me.pnlAnzeige.Controls.Add(Me.Panel1)
|
||||
Me.pnlAnzeige.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.pnlAnzeige.Location = New System.Drawing.Point(0, 0)
|
||||
Me.pnlAnzeige.Name = "pnlAnzeige"
|
||||
Me.pnlAnzeige.Size = New System.Drawing.Size(1020, 605)
|
||||
Me.pnlAnzeige.TabIndex = 0
|
||||
'
|
||||
'DataGridView
|
||||
'
|
||||
Me.DataGridView.AKTUALISIERUNGS_INTERVALL = -1
|
||||
Me.DataGridView.AllowUserToDeleteRows = False
|
||||
Me.DataGridView.AllowUserToOrderColumns = True
|
||||
Me.DataGridView.AllowUserToResizeRows = False
|
||||
Me.DataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.DataGridView.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.DataGridView.Location = New System.Drawing.Point(0, 0)
|
||||
Me.DataGridView.Name = "DataGridView"
|
||||
Me.DataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect
|
||||
Me.DataGridView.Size = New System.Drawing.Size(1020, 561)
|
||||
Me.DataGridView.TabIndex = 0
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.Panel1.Controls.Add(Me.btnSave)
|
||||
Me.Panel1.Controls.Add(Me.lblErgebnis)
|
||||
Me.Panel1.Controls.Add(Me.Label4)
|
||||
Me.Panel1.Controls.Add(Me.txtMaxSrch)
|
||||
Me.Panel1.Controls.Add(Me.Button10)
|
||||
Me.Panel1.Controls.Add(Me.Button11)
|
||||
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||
Me.Panel1.Location = New System.Drawing.Point(0, 561)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(1020, 44)
|
||||
Me.Panel1.TabIndex = 1
|
||||
'
|
||||
'btnSave
|
||||
'
|
||||
Me.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnSave.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.btnSave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnSave.Location = New System.Drawing.Point(789, 5)
|
||||
Me.btnSave.Name = "btnSave"
|
||||
Me.btnSave.Size = New System.Drawing.Size(118, 26)
|
||||
Me.btnSave.TabIndex = 56
|
||||
Me.btnSave.Text = "speichern"
|
||||
Me.btnSave.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblErgebnis
|
||||
'
|
||||
Me.lblErgebnis.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblErgebnis.Location = New System.Drawing.Point(864, 25)
|
||||
Me.lblErgebnis.Name = "lblErgebnis"
|
||||
Me.lblErgebnis.Size = New System.Drawing.Size(152, 13)
|
||||
Me.lblErgebnis.TabIndex = 45
|
||||
Me.lblErgebnis.Text = "Max:"
|
||||
Me.lblErgebnis.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Location = New System.Drawing.Point(930, 5)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(30, 13)
|
||||
Me.Label4.TabIndex = 43
|
||||
Me.Label4.Text = "Max:"
|
||||
'
|
||||
'txtMaxSrch
|
||||
'
|
||||
Me.txtMaxSrch._DateTimeOnly = False
|
||||
Me.txtMaxSrch._numbersOnly = True
|
||||
Me.txtMaxSrch._numbersOnlyKommastellen = ""
|
||||
Me.txtMaxSrch._numbersOnlyTrennzeichen = True
|
||||
Me.txtMaxSrch._Prozent = False
|
||||
Me.txtMaxSrch._ShortDateNew = False
|
||||
Me.txtMaxSrch._ShortDateOnly = False
|
||||
Me.txtMaxSrch._TimeOnly = False
|
||||
Me.txtMaxSrch._TimeOnly_Seconds = False
|
||||
Me.txtMaxSrch._value = ""
|
||||
Me.txtMaxSrch._Waehrung = False
|
||||
Me.txtMaxSrch._WaehrungZeichen = True
|
||||
Me.txtMaxSrch.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.txtMaxSrch.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtMaxSrch.Location = New System.Drawing.Point(966, 2)
|
||||
Me.txtMaxSrch.MaxLineLength = -1
|
||||
Me.txtMaxSrch.MaxLines_Warning = ""
|
||||
Me.txtMaxSrch.MaxLines_Warning_Label = Nothing
|
||||
Me.txtMaxSrch.Name = "txtMaxSrch"
|
||||
Me.txtMaxSrch.Size = New System.Drawing.Size(51, 20)
|
||||
Me.txtMaxSrch.TabIndex = 44
|
||||
Me.txtMaxSrch.Text = "1000"
|
||||
Me.txtMaxSrch.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
||||
'
|
||||
'Button10
|
||||
'
|
||||
Me.Button10.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button10.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
||||
Me.Button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button10.Location = New System.Drawing.Point(1117, 1)
|
||||
Me.Button10.Name = "Button10"
|
||||
Me.Button10.Size = New System.Drawing.Size(41, 34)
|
||||
Me.Button10.TabIndex = 3
|
||||
Me.Button10.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button11
|
||||
'
|
||||
Me.Button11.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button11.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.Button11.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button11.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Button11.ForeColor = System.Drawing.Color.Black
|
||||
Me.Button11.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button11.Location = New System.Drawing.Point(1164, 1)
|
||||
Me.Button11.Name = "Button11"
|
||||
Me.Button11.Size = New System.Drawing.Size(41, 34)
|
||||
Me.Button11.TabIndex = 4
|
||||
Me.Button11.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label9
|
||||
'
|
||||
Me.Label9.AutoSize = True
|
||||
Me.Label9.Location = New System.Drawing.Point(108, 26)
|
||||
Me.Label9.Name = "Label9"
|
||||
Me.Label9.Size = New System.Drawing.Size(45, 13)
|
||||
Me.Label9.TabIndex = 56
|
||||
Me.Label9.Text = "Suche*:"
|
||||
'
|
||||
'txtSuche
|
||||
'
|
||||
Me.txtSuche._DateTimeOnly = False
|
||||
Me.txtSuche._numbersOnly = False
|
||||
Me.txtSuche._numbersOnlyKommastellen = ""
|
||||
Me.txtSuche._numbersOnlyTrennzeichen = True
|
||||
Me.txtSuche._Prozent = False
|
||||
Me.txtSuche._ShortDateNew = False
|
||||
Me.txtSuche._ShortDateOnly = False
|
||||
Me.txtSuche._TimeOnly = False
|
||||
Me.txtSuche._TimeOnly_Seconds = False
|
||||
Me.txtSuche._value = ""
|
||||
Me.txtSuche._Waehrung = False
|
||||
Me.txtSuche._WaehrungZeichen = True
|
||||
Me.txtSuche.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtSuche.Location = New System.Drawing.Point(169, 22)
|
||||
Me.txtSuche.MaxLineLength = -1
|
||||
Me.txtSuche.MaxLines_Warning = ""
|
||||
Me.txtSuche.MaxLines_Warning_Label = Nothing
|
||||
Me.txtSuche.Name = "txtSuche"
|
||||
Me.txtSuche.Size = New System.Drawing.Size(217, 20)
|
||||
Me.txtSuche.TabIndex = 57
|
||||
'
|
||||
'usrCntlMailsender_
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.Controls.Add(Me.SplitContainer)
|
||||
Me.Name = "usrCntlMailsender_"
|
||||
Me.Size = New System.Drawing.Size(1020, 687)
|
||||
Me.SplitContainer.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer.ResumeLayout(False)
|
||||
Me.pnlSearch.ResumeLayout(False)
|
||||
Me.SplitContainer1.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer1.Panel1.PerformLayout()
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer1.ResumeLayout(False)
|
||||
Me.pnlAnzeige.ResumeLayout(False)
|
||||
CType(Me.DataGridView, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.Panel1.ResumeLayout(False)
|
||||
Me.Panel1.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents SplitContainer As SplitContainer
|
||||
Friend WithEvents pnlSearch As Panel
|
||||
Friend WithEvents SplitContainer1 As SplitContainer
|
||||
Friend WithEvents btnSuche As Button
|
||||
Friend WithEvents pnlAnzeige As Panel
|
||||
Friend WithEvents DataGridView As VERAG_PROG_ALLGEMEIN.MyDatagridview
|
||||
Friend WithEvents Panel1 As Panel
|
||||
Friend WithEvents Label4 As Label
|
||||
Friend WithEvents txtMaxSrch As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Button10 As Button
|
||||
Friend WithEvents Button11 As Button
|
||||
Friend WithEvents Label8 As Label
|
||||
Friend WithEvents lblErgebnis As Label
|
||||
Friend WithEvents cboPartnersystem As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||
Friend WithEvents cbxaktiv As CheckBox
|
||||
Friend WithEvents btnSave As Button
|
||||
Friend WithEvents Label9 As Label
|
||||
Friend WithEvents txtSuche As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
End Class
|
||||
123
UID/usrCntlMailsender_.resx
Normal file
123
UID/usrCntlMailsender_.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="pnlAnzeige.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
220
UID/usrCntlMailsender_.vb
Normal file
220
UID/usrCntlMailsender_.vb
Normal file
@@ -0,0 +1,220 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.IO
|
||||
Imports System.Windows.Documents
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
Public Class usrCntlMailsender_
|
||||
|
||||
|
||||
Dim DatenarchivBind As cEasyBinding
|
||||
Public table
|
||||
Public BIND_DB
|
||||
Private EditRow As Integer = -1
|
||||
Sub New(table, BIND_DB)
|
||||
Me.table = table
|
||||
Me.BIND_DB = BIND_DB
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub usrCntlDatenarchiv_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
loaddgv()
|
||||
|
||||
'cboPartnersystem.Items.Clear()
|
||||
Dim distinctDT As DataTable = DatenarchivBind.bindingdataTable.DefaultView.ToTable(True, "ms_param")
|
||||
|
||||
For Each d As DataRow In distinctDT.Rows
|
||||
If Not cboPartnersystem.Items.Contains(d.Item(0)) Then cboPartnersystem.Items.Add(d.Item(0))
|
||||
Next
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnSuche_Click(sender As Object, e As EventArgs) Handles btnSuche.Click
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
|
||||
loaddgv()
|
||||
|
||||
Me.Cursor = Cursors.Default
|
||||
End Sub
|
||||
|
||||
|
||||
Function getParamwhere() As String
|
||||
|
||||
Dim sqlstr = ""
|
||||
If cboPartnersystem._value <> "" Then sqlstr &= " AND [ms_param] = '" & cboPartnersystem._value & "'"
|
||||
|
||||
If txtSuche.Text <> "" Then
|
||||
sqlstr &= " AND ([ms_subject] like '" & txtSuche.Text.Replace("*", "%") & "' Or [ms_an] like '" & txtSuche.Text.Replace("*", "%") & "' OR [ms_info] like '" & txtSuche.Text.Replace("*", "%") & "') "
|
||||
End If
|
||||
|
||||
|
||||
sqlstr &= " and ms_aktiv = " & IIf(cbxaktiv.Checked, 1, 0)
|
||||
|
||||
Return sqlstr
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub DataGridView_CellDoubleClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView.CellDoubleClick
|
||||
'Me.Cursor = Cursors.WaitCursor
|
||||
'Dim tmprowindex As Integer = e.RowIndex
|
||||
'If DataGridView.Columns(e.ColumnIndex).Name = "open" Then
|
||||
|
||||
' If DataGridView.CurrentRow.Cells("param").Value IsNot DBNull.Value AndAlso DataGridView.CurrentRow.Cells("param").Value.ToString.StartsWith("\\") Then
|
||||
' Process.Start(DataGridView.CurrentRow.Cells("param").Value)
|
||||
' End If
|
||||
'Else
|
||||
|
||||
'End If
|
||||
'Me.Cursor = Cursors.Default
|
||||
End Sub
|
||||
|
||||
Private Sub cbxProduktivsystem_CheckedChanged(sender As Object, e As EventArgs) Handles cbxaktiv.CheckedChanged
|
||||
|
||||
'DatenarchivBind = New cEasyBinding(BIND_DB)
|
||||
|
||||
Dim sqlstr As String = ""
|
||||
Dim TopMax = If(IsNumeric(txtMaxSrch.Text), " TOP " & txtMaxSrch.Text, "")
|
||||
|
||||
|
||||
DatenarchivBind.initBinding("SELECT " & TopMax & " [ms_id],[ms_param],[ms_an],[ms_cc],[ms_bcc],[ms_subject],[ms_mailtext],[ms_aktiv],[ms_info],[ms_firma] FROM " & table & " WHERE 1 = 1 " & getParamwhere(), table)
|
||||
|
||||
DataGridView.DataSource = DatenarchivBind.bindingdataTable
|
||||
|
||||
Dim distinctDT As DataTable = DatenarchivBind.bindingdataTable.DefaultView.ToTable(True, "ms_param")
|
||||
|
||||
For Each d As DataRow In distinctDT.Rows
|
||||
If Not cboPartnersystem.Items.Contains(d.Item(0)) Then cboPartnersystem.Items.Add(d.Item(0))
|
||||
Next
|
||||
|
||||
Me.usrCntlDatenarchiv_Load(sender, e)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cboPartnersystem_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboPartnersystem.SelectedIndexChanged
|
||||
btnSuche_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub loaddgv()
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = cbxaktiv.Checked
|
||||
|
||||
Try
|
||||
DatenarchivBind = New cEasyBinding(BIND_DB)
|
||||
|
||||
|
||||
Dim sqlstr As String = ""
|
||||
Dim TopMax = If(IsNumeric(txtMaxSrch.Text), " TOP " & txtMaxSrch.Text, "")
|
||||
|
||||
|
||||
DatenarchivBind.initBinding("SELECT " & TopMax & " [ms_id],[ms_param],[ms_an],[ms_cc],[ms_bcc],[ms_subject],[ms_mailtext],[ms_aktiv],[ms_info],[ms_firma] FROM " & table & " WHERE 1 = 1 " & getParamwhere(), table)
|
||||
|
||||
DataGridView.DataSource = DatenarchivBind.bindingdataTable
|
||||
|
||||
|
||||
With DataGridView
|
||||
|
||||
If .RowCount = 0 Then Me.Cursor = Cursors.Default : Exit Sub
|
||||
.RowHeadersVisible = False
|
||||
.ReadOnly = False
|
||||
'.SelectionMode = DataGridViewSelectionMode.FullRowSelect
|
||||
.MultiSelect = False
|
||||
|
||||
|
||||
For Each cc As DataGridViewColumn In .Columns
|
||||
If cc.Name.ToLower.Contains("ms_") Then
|
||||
cc.HeaderText = cc.Name.Replace("ms_", "")
|
||||
If cc.Name.ToLower.Contains("mailtext") Then
|
||||
cc.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||
ElseIf cc.Name.ToLower.Contains("aktiv") Then
|
||||
cc.Width = 50
|
||||
|
||||
ElseIf cc.Name.ToLower.Contains("id") Then
|
||||
cc.Visible = False
|
||||
|
||||
Else
|
||||
cc.Width = 150
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
lblErgebnis.Text = "Ergebnisse: " & .RowCount
|
||||
|
||||
|
||||
'If .Columns("open") Is Nothing Then
|
||||
|
||||
' Dim c As New DataGridViewImageColumn
|
||||
' c.Name = "open" : c.HeaderText = "open"
|
||||
' c.Image = New Bitmap(1, 1)
|
||||
' c.Width = 40 : c.DefaultCellStyle.Padding = New Padding(2) : c.DefaultCellStyle.BackColor = Color.White
|
||||
' c.DefaultCellStyle.Tag = "open"
|
||||
' .Columns.Add(c)
|
||||
|
||||
'End If
|
||||
|
||||
For Each r As DataGridViewRow In .Rows
|
||||
|
||||
'If r.Cells("ms_param").Value IsNot DBNull.Value AndAlso r.Cells("ms_param").Value <> "" Then
|
||||
' Dim path As New System.IO.DirectoryInfo(r.Cells("ms_param").Value)
|
||||
|
||||
' 'If path.Exists Then
|
||||
' ' DirectCast(r.Cells("open"), DataGridViewImageCell).Value = My.Resources.search
|
||||
' 'End If
|
||||
'End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
End With
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnSave.Click
|
||||
|
||||
If DataGridView.Columns.Count = 0 Or DataGridView.SelectedRows.Count = 0 Then 'alles gelöscht oder markierte Zeile gelöscht
|
||||
DatenarchivBind.updateBinding()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DataGridView.CurrentRow.Cells("ms_param").ToString <> "" AndAlso DataGridView.CurrentRow.Cells("ms_an").ToString <> "" AndAlso DataGridView.CurrentRow.Cells("ms_subject").ToString <> "" AndAlso EditRow >= 0 Then
|
||||
DatenarchivBind.updateBinding()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub DataGridView_EditingControlShowing(sender As Object, e As DataGridViewEditingControlShowingEventArgs) Handles DataGridView.EditingControlShowing
|
||||
EditRow = DataGridView.CurrentRow.Index
|
||||
End Sub
|
||||
|
||||
Private Sub DataGridView_SelectionChanged(sender As Object, e As EventArgs) Handles DataGridView.SelectionChanged
|
||||
If EditRow >= 0 Then
|
||||
Dim new_row As Integer = EditRow
|
||||
EditRow = -1
|
||||
DataGridView.CurrentCell = DataGridView.Rows(new_row).Cells(
|
||||
DataGridView.CurrentCell.ColumnIndex)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub txtSuche_KeyDown(sender As Object, e As KeyEventArgs) Handles txtSuche.KeyDown
|
||||
|
||||
If e.KeyCode = Keys.Enter Then
|
||||
|
||||
Me.btnSuche_Click(sender, e)
|
||||
e.Handled = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DataGridView_DefaultValuesNeeded(sender As Object, e As DataGridViewRowEventArgs) Handles DataGridView.DefaultValuesNeeded
|
||||
e.Row.Cells("ms_aktiv").Value = False
|
||||
End Sub
|
||||
End Class
|
||||
@@ -5341,69 +5341,7 @@ Public Class frmStartOptions
|
||||
|
||||
Private Sub Button24_Click(sender As Object, e As EventArgs) Handles Button24.Click
|
||||
|
||||
Dim test As Boolean = False
|
||||
|
||||
Dim dir = IIf(test, "C:\Users\d.breimaier\Desktop\MSE_test\", "C:\Users\d.breimaier\Desktop\MSE\") & Now.ToShortDateString.Replace(":", "") & IIf(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM, "Test", "")
|
||||
|
||||
If Directory.Exists(dir) Then dir &= "_" & Now.ToShortTimeString.Replace(":", "")
|
||||
|
||||
Directory.CreateDirectory(dir)
|
||||
|
||||
|
||||
Dim sql As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
Dim dt_CSV_selected = sql.loadDgvBySql_Param("SELECT TOP (10) controller_id as [Controller ID], 'VERAG 360 GmbH' as [Controller Name] , inv.[invoice_id] as [Invoice ID], inv.invoice_date as [Invoice Date],
|
||||
cust.customer_id as [CustomerID], cust.partner_customer_number as [Customer No], cust.customer_name as [Customer name], bills.specification_page_name as [Specification Page], bills.specification_page_id as [Specification ID], trans.purchase_datetime as [Transaction date], trans.transaction_id as [Transaction ID],
|
||||
trans.supplier_name as [Transaction Supplier/Terminal], trans.transaction_country as [Transaction Country], trans.transaction_product_name as [Product description], trans.transaction_product_id as [Product Description ID], trans.device_product_type as [Card Type], trans.device_product_number as [Card number], trans.license_plate_number as [Load File Licence Plate Number],
|
||||
'' as [Card Licence Plate Number], trans.license_plate_number as [Truck Licence Plate Number], '' as [Truck Fleet Code], '' as [Truck Driver Name], trans.entry_point_name as [Entry Terminal/Direction], trans.entry_datetime as [Start date], trans.entry_datetime as [Start Time], trans.exit_point_name as [Exit Terminal Description], trans.exit_datetime as [End Date], trans.exit_datetime as [End Time],
|
||||
'' as [Eurovignet K-Number], '' as [LKW-Kostenstelle], trans.original_net_amount as [Original Nett Amount], trans.original_vat_amount as [Original VAT Amount], trans.original_gross_amount as [Original Amount], trans.original_currency as [Original Currency],
|
||||
trans.transaction_gross_amount as [Transaction Amount ( EUR )], trans.msts_fee_amount as [Admin Fee Amount ( EUR )], '' as [Fees and Costs Amount ( EUR )], trans.msts_vat_amount as [VAT Amount ( EUR )],trans.total_gross_amount as [Total Amount ( EUR )], '' as [Total Dutch VAT ( EUR )], '' as [Total Foreign VAT ( EUR )], trans.[USteuer_EUR] as [USteuer_EUR]
|
||||
FROM [VERAG].[dbo].[tblMSESettlements] as bills
|
||||
left join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
||||
left join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
||||
left join [VERAG].[dbo].[tblMSEInvoices] as inv on inv.[invoice_id] = bills.[invoice_number] and inv.customer_number = cust.[customer_id] and trans.transaction_country = inv.country
|
||||
where (trans.transaction_gross_amount <> 0 or [msts_fee_amount] <> 0) ", "FMZOLL")
|
||||
|
||||
dt_CSV_selected.ParentRelations.Clear()
|
||||
dt_CSV_selected.ChildRelations.Clear()
|
||||
dt_CSV_selected.Constraints.Clear()
|
||||
|
||||
|
||||
For Each csv As DataRow In dt_CSV_selected.Rows
|
||||
|
||||
Dim teststring As String = csv.Item(2)
|
||||
|
||||
Dim fn As String = dir
|
||||
fn &= "\"
|
||||
fn &= teststring & "_Maut_MSE.csv"
|
||||
Dim outFile As System.IO.StreamWriter = My.Computer.FileSystem.OpenTextFileWriter(fn, False)
|
||||
Dim clmns As String = ""
|
||||
For i = 0 To dt_CSV_selected.Columns.Count - 1
|
||||
clmns &= dt_CSV_selected.Columns(i).ColumnName.ToString().Replace(";", ", ") & ";"
|
||||
Next
|
||||
outFile.WriteLine(clmns)
|
||||
For i = 0 To dt_CSV_selected.Rows.Count - 1
|
||||
clmns = ""
|
||||
For j = 0 To dt_CSV_selected.Columns.Count - 1
|
||||
clmns &= dt_CSV_selected.Rows(i)(j).ToString.Replace(";", ", ") & ";"
|
||||
Next
|
||||
outFile.WriteLine(clmns)
|
||||
Next
|
||||
outFile.Close()
|
||||
Next
|
||||
|
||||
|
||||
Dim dirAnhang = "C:\Users\d.breimaier\Desktop\MSE_ARCHIV\" & IIf(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM, "Test", "") & Now.ToShortDateString
|
||||
If Directory.Exists(dirAnhang) Then 'Directory.Delete(dirAnhang, True)
|
||||
For Each f In Directory.GetFiles(dirAnhang)
|
||||
File.Delete(f)
|
||||
Next
|
||||
Else
|
||||
Directory.CreateDirectory(dirAnhang)
|
||||
End If
|
||||
|
||||
For Each f In Directory.GetFiles(dir)
|
||||
File.Copy(f, dirAnhang & "\" & (New FileInfo(f)).Name)
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user