MS Email-Sending Errors

This commit is contained in:
SchreiberM 2023-05-10 11:59:39 +02:00
parent ab99d5bb6a
commit 7bcf839cb3
17 changed files with 197 additions and 1206 deletions

View File

@ -1,68 +0,0 @@
Imports System.Net.Mail
Public Class ClassDI_Email
Public Sub Send_EMail(ByVal vBody As String, Optional ByVal Test As Boolean = False)
'#### E-MAIL NACHRICHT VERSENDEN
Try
'######
Dim empfaenger As String()
If My.Settings.vDIMailEmpf <> "" Then
If My.Settings.vDIMailEmpf.Contains(";") Then
empfaenger = My.Settings.vDIMailEmpf.Split(";")
Else
ReDim Preserve empfaenger(0)
empfaenger(0) = My.Settings.vDIMailEmpf
End If
'Für jeden Empfänger eine Neue Mail erzeugen
For Each _mailempfaenger As String In empfaenger
' Neue Nachricht erzeugen:
Dim message As New MailMessage(My.Settings.vDIMailFrom, _mailempfaenger, My.Settings.vDIMailBetreff & " Domain: " & Environment.UserDomainName, _
"<font face=""Arial"">" & My.Settings.vDIMailBody & vBody & "<br>>> Maschine: " & Environment.MachineName & "<br>" & "<br>>> Domain-Name: " & Environment.UserDomainName & "<br>" & _
"<br>>> Gesendet am: " & My.Computer.Clock.LocalTime.ToShortDateString & "-" & _
My.Computer.Clock.LocalTime.ToLongTimeString & "</font>")
' create and add the attachment(s) */
'Dim logfile As String = ClassLogger.DateiSpeicherort & "\" & ClassLogger.DateiPrefix & System.DateTime.Now.ToString("yyyy_MM_dd") & ".txt"
'If logfile.Contains("\\") Then
' logfile = logfile.Replace("\\", "\")
'End If
'Dim Attachment As Attachment = New Attachment(logfile)
'message.Attachments.Add(Attachment)
With message
.IsBodyHtml = True
End With
'Einen SMTP Client erzeugen und Anmeldungsinformationen hinterlegen
Dim emailClient As New SmtpClient(My.Settings.vSMTP)
'Email mit Authentifizierung
Dim SMTPUserInfo As New System.Net.NetworkCredential(My.Settings.vMailUser.Trim, My.Settings.vMailPW.Trim) ', My.Settings.vDomain)
emailClient.UseDefaultCredentials = False
emailClient.Credentials = SMTPUserInfo
emailClient.Port = My.Settings.vemailPort
emailClient.DeliveryMethod = SmtpDeliveryMethod.Network
'*Send the message */
emailClient.Send(message)
ClassLoggerDI.Add("==> Fehler Email erfolgreich an " & _mailempfaenger & " versendet!", False)
ClassLoggerDI.Add("==> Text: " & vBody, False)
If Test = True Then
MsgBox("Email an " & _mailempfaenger & "erfolgreich versendet!", MsgBoxStyle.Information, "Erfolgsmeldung:")
End If
Next
End If
'######
Catch ex As Exception
If Test = True Then
MsgBox("Fehler im Mailversand:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler im Mailversand DI:")
Else
ClassLoggerDI.Add(">> Achtung: Fehler in Mailversand: " & ex.Message, False)
End If
End Try
End Sub
End Class

View File

@ -15,12 +15,15 @@ Public Class ClassNIDatenbankzugriff
Private Shared aTimer As System.Timers.Timer Private Shared aTimer As System.Timers.Timer
Private Shared Oracle_Conn As New OracleConnection Private Shared Oracle_Conn As New OracleConnection
Private _firebird As Firebird Private _firebird As Firebird
Sub New(LogConf As DigitalData.Modules.Logging.LogConfig) Sub New(LogConf As DigitalData.Modules.Logging.LogConfig)
_Logger = LogConf.GetLogger() _Logger = LogConf.GetLogger()
If My.Settings.FB_DATASOURCE <> String.Empty Then If My.Settings.FB_DATASOURCE <> String.Empty Then
_firebird = New Firebird(LogConf, My.Settings.FB_DATASOURCE, My.Settings.FB_DATABASE, My.Settings.FB_USER, My.Settings.FB_PW) _firebird = New Firebird(LogConf, My.Settings.FB_DATASOURCE, My.Settings.FB_DATABASE, My.Settings.FB_USER, My.Settings.FB_PW)
End If End If
'Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd
End Sub End Sub
''' <summary> ''' <summary>
@ -61,7 +64,6 @@ Public Class ClassNIDatenbankzugriff
' End If ' End If
End If End If
End Sub End Sub
Private email As New ClassNIEmail
' führt eine SQL-Anweisung auf der DB aus ' führt eine SQL-Anweisung auf der DB aus
Public Function GetValueFromOracleDb(Profilname As String, ByVal selectAnweisung As String, ByVal host As String, ByVal servicename As String, ByVal User As String, ByVal pw As String, ByVal myDS As DataSet, Optional ByVal Indexname As String = "", Optional ByVal QuellVektor As Boolean = False) Public Function GetValueFromOracleDb(Profilname As String, ByVal selectAnweisung As String, ByVal host As String, ByVal servicename As String, ByVal User As String, ByVal pw As String, ByVal myDS As DataSet, Optional ByVal Indexname As String = "", Optional ByVal QuellVektor As Boolean = False)
Dim swGvfO As New ClassStopwatch("GetValueFromOracleDb") Dim swGvfO As New ClassStopwatch("GetValueFromOracleDb")
@ -108,9 +110,7 @@ Public Class ClassNIDatenbankzugriff
_LastStep = "OracleCon.State: " & Oracle_Conn.State.ToString _LastStep = "OracleCon.State: " & Oracle_Conn.State.ToString
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.GetValueFromOracleDb - Verbindung zur Datenbank aufbauen: " & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
Me.CloseOracleDb(Oracle_Conn) Me.CloseOracleDb(Oracle_Conn)
Return Nothing Return Nothing
@ -124,9 +124,7 @@ Public Class ClassNIDatenbankzugriff
_LastStep = "ORACLE Command definiert" _LastStep = "ORACLE Command definiert"
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.GetValueFromOracleDb - SQL-Abfrage definieren: " & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
Me.CloseOracleDb(Oracle_Conn) Me.CloseOracleDb(Oracle_Conn)
Return Nothing Return Nothing
@ -196,9 +194,6 @@ Public Class ClassNIDatenbankzugriff
' bei einem Fehler einen Eintrag in der Logdatei erzeugen ' bei einem Fehler einen Eintrag in der Logdatei erzeugen
_Logger.Error(ex) _Logger.Error(ex)
_Logger.Warn($"Unexpected error in GetValueFromOracleDB - Oracle-Command: {selectAnweisung}") _Logger.Warn($"Unexpected error in GetValueFromOracleDB - Oracle-Command: {selectAnweisung}")
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.GetValueFromOracleDb - Daten auslesen => SQL-Anweisungen prüfen: <br>" & selectAnweisung & " <br>Fehler: <br>" & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
Oracle_Conn.Close() Oracle_Conn.Close()
Dim msg = swGvfO.Done Dim msg = swGvfO.Done
@ -210,9 +205,6 @@ Public Class ClassNIDatenbankzugriff
' kann eintreten, wenn entweder die SQL-Anweisung falsch ist oder wenn die DataConnection nicht richtig aufgebaut werden konnte ' kann eintreten, wenn entweder die SQL-Anweisung falsch ist oder wenn die DataConnection nicht richtig aufgebaut werden konnte
' Eintrag in Logdatei machen ' Eintrag in Logdatei machen
_Logger.Warn("ClassNIDatenbankzugriff.GetValueFromOracleDb", "SQL-Anweisung ist ungültig. Command-Objekt konnte nicht erstellt werden. (SQL: " & selectAnweisung & ")") _Logger.Warn("ClassNIDatenbankzugriff.GetValueFromOracleDb", "SQL-Anweisung ist ungültig. Command-Objekt konnte nicht erstellt werden. (SQL: " & selectAnweisung & ")")
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.GetValueFromOracleDb - SQL-Anweisung ist ungültig. Command-Objekt konnte nicht erstellt werden. ")
End If
Dim msg = swGvfO.Done Dim msg = swGvfO.Done
If msg <> "" Then _Logger.Debug($"SWResult: {msg}") If msg <> "" Then _Logger.Debug($"SWResult: {msg}")
Return Nothing Return Nothing
@ -223,9 +215,6 @@ Public Class ClassNIDatenbankzugriff
_Logger.Error(ex) _Logger.Error(ex)
_Logger.Warn($"Unexpected error in GetValueFromOracleDB: [{ex.Message}] -Oracle-Command: " & selectAnweisung) _Logger.Warn($"Unexpected error in GetValueFromOracleDB: [{ex.Message}] -Oracle-Command: " & selectAnweisung)
' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden ' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.GetValueFromOracleDb - Ein unbekannter Fehler: " & ex.Message)
End If
Dim msg = swGvfO.Done Dim msg = swGvfO.Done
If msg <> "" Then _Logger.Debug($"SWResult: {msg}") If msg <> "" Then _Logger.Debug($"SWResult: {msg}")
Return Nothing Return Nothing
@ -263,9 +252,6 @@ Public Class ClassNIDatenbankzugriff
Oracle_Conn.Open() Oracle_Conn.Open()
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.ExecuteonOracleDb - Verbindung zur Datenbank aufbauen: " & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
Me.CloseOracleDb(Oracle_Conn) Me.CloseOracleDb(Oracle_Conn)
Return 0 Return 0
@ -279,9 +265,6 @@ Public Class ClassNIDatenbankzugriff
_Logger.Debug(">> Oracle-Command: " & plsqlcommand) _Logger.Debug(">> Oracle-Command: " & plsqlcommand)
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.ExecuteonOracleDb - plsqlcommand definieren: " & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
Me.CloseOracleDb(Oracle_Conn) Me.CloseOracleDb(Oracle_Conn)
Return 0 Return 0
@ -300,9 +283,6 @@ Public Class ClassNIDatenbankzugriff
Catch ex As Exception Catch ex As Exception
' bei einem Fehler einen Eintrag in der Logdatei erzeugen ' bei einem Fehler einen Eintrag in der Logdatei erzeugen
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.ExecuteonOracleDb - Execute Command => (" & plsqlcommand & "): " & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
Me.CloseOracleDb(Oracle_Conn) Me.CloseOracleDb(Oracle_Conn)
Return 0 Return 0
@ -320,9 +300,9 @@ Public Class ClassNIDatenbankzugriff
Catch ex As Exception Catch ex As Exception
' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden ' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then 'If My.Settings.vMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.ExecuteonOracleDb - Ein unbekannter Fehler in ExecuteonOracleDb: " & ex.Message) ' email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.ExecuteonOracleDb - Ein unbekannter Fehler in ExecuteonOracleDb: " & ex.Message)
End If 'End If
Timer_Stop() Timer_Stop()
Return 0 Return 0
End Try End Try
@ -356,9 +336,7 @@ Public Class ClassNIDatenbankzugriff
Oracle_Conn.Open() Oracle_Conn.Open()
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.ExecuteonOracleClient - Verbindung zur Datenbank aufbauen: " & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
Oracle_Conn.Close() Oracle_Conn.Close()
Timer_Stop() Timer_Stop()
@ -373,9 +351,7 @@ Public Class ClassNIDatenbankzugriff
_Logger.Debug(">> Oracle-Command: " & plsqlcommand) _Logger.Debug(">> Oracle-Command: " & plsqlcommand)
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.ExecuteonOracleClient - plsqlcommand definieren: " & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
Oracle_Conn.Close() Oracle_Conn.Close()
Timer_Stop() Timer_Stop()
@ -407,9 +383,6 @@ Public Class ClassNIDatenbankzugriff
Catch ex As Exception Catch ex As Exception
' bei einem Fehler einen Eintrag in der Logdatei erzeugen ' bei einem Fehler einen Eintrag in der Logdatei erzeugen
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.ExecuteonOracleClient - Execute Command => (" & plsqlcommand & "): " & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
Oracle_Conn.Close() Oracle_Conn.Close()
Timer_Stop() Timer_Stop()
@ -428,9 +401,6 @@ Public Class ClassNIDatenbankzugriff
Catch ex As Exception Catch ex As Exception
' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden ' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.ExecuteonOracleClient - Ein unbekannter Fehler in ExecuteonOracleClient: " & ex.Message)
End If
Timer_Stop() Timer_Stop()
Return 0 Return 0
End Try End Try
@ -500,9 +470,6 @@ Public Class ClassNIDatenbankzugriff
Connection.Open() Connection.Open()
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.CheckIndex_mssql - Verbindung zur Datenbank aufbauen: " & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
Me.CloseMssqlDb(Connection) Me.CloseMssqlDb(Connection)
Return Nothing Return Nothing
@ -562,9 +529,6 @@ Public Class ClassNIDatenbankzugriff
SQLconnect.Open() SQLconnect.Open()
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.GetValueFromMssqlDb - Verbindung zur Datenbank aufbauen: " & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
Return Nothing Return Nothing
End Try End Try
@ -574,9 +538,9 @@ Public Class ClassNIDatenbankzugriff
SQLcommand.CommandText = selectAnweisung SQLcommand.CommandText = selectAnweisung
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.GetValueFromMssqlDb - SQL-Abfrage definieren: " & ex.Message) EMAIL_DD.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.GetValueFromMssqlDb - SQL-Abfrage definieren: " & ex.Message, "NIDB_GetValueFromMssqlDb")
End If
' DB-Connection schliessen ' DB-Connection schliessen
SQLconnect.Close() SQLconnect.Close()
Return Nothing Return Nothing
@ -661,9 +625,6 @@ Public Class ClassNIDatenbankzugriff
Catch ex As Exception Catch ex As Exception
_Logger.Warn("ClassNIDatenbankzugriff.GetValueFromMssqlDb" & ex.Message) _Logger.Warn("ClassNIDatenbankzugriff.GetValueFromMssqlDb" & ex.Message)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.GetValueFromMssqlDb - Datatable durchlaufen: " & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
SQLconnect.Close() SQLconnect.Close()
Return Nothing Return Nothing
@ -671,9 +632,6 @@ Public Class ClassNIDatenbankzugriff
Else Else
'Eintrag in Logdatei machen 'Eintrag in Logdatei machen
_Logger.Warn("Die Datatable ist unerwartet nothing. (SQL: " & selectAnweisung & ")") _Logger.Warn("Die Datatable ist unerwartet nothing. (SQL: " & selectAnweisung & ")")
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.GetValueFromMssqlDb - Die Datatable ist unerwartet nothing. (SQL: " & selectAnweisung & ")")
End If
SQLconnect.Close() SQLconnect.Close()
Return Nothing Return Nothing
End If End If
@ -681,9 +639,7 @@ Public Class ClassNIDatenbankzugriff
'kann eintreten, wenn entweder die SQL-Anweisung falsch ist oder wenn die DataConnection nicht richtig aufgebaut werden konnte 'kann eintreten, wenn entweder die SQL-Anweisung falsch ist oder wenn die DataConnection nicht richtig aufgebaut werden konnte
'Eintrag in Logdatei machen 'Eintrag in Logdatei machen
_Logger.Warn("SQL-Anweisung ist ungültig. Command-Objekt konnte nicht erstellt werden. (SQL: " & selectAnweisung & ")") _Logger.Warn("SQL-Anweisung ist ungültig. Command-Objekt konnte nicht erstellt werden. (SQL: " & selectAnweisung & ")")
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.GetValueFromMssqlDb - SQL-Anweisung ist ungültig. Command-Objekt konnte nicht erstellt werden. (SQL: " & selectAnweisung & ")")
End If
SQLconnect.Close() SQLconnect.Close()
Return Nothing Return Nothing
End If End If
@ -693,9 +649,6 @@ Public Class ClassNIDatenbankzugriff
' bei einem Fehler einen Eintrag in der Logdatei erzeugen ' bei einem Fehler einen Eintrag in der Logdatei erzeugen
_Logger.Error(ex) _Logger.Error(ex)
_Logger.Warn($"SQL-Command [{selectAnweisung}]") _Logger.Warn($"SQL-Command [{selectAnweisung}]")
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.GetValueFromMssqlDb - Build Datenadapter => SQL-Anweisungen prüfen (" & selectAnweisung & "): " & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
SQLconnect.Close() SQLconnect.Close()
Return Nothing Return Nothing
@ -708,9 +661,6 @@ Public Class ClassNIDatenbankzugriff
' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden ' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.GetValueFromMssqlDb - Ein unbekannter Fehler: " & ex.Message)
End If
Return Nothing Return Nothing
End Try End Try
End Function End Function
@ -766,10 +716,6 @@ Public Class ClassNIDatenbankzugriff
Connection.Open() Connection.Open()
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.ExecuteonMSSQL - Verbindung zur Datenbank aufbauen: " & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
Me.CloseMssqlDb(Connection) Me.CloseMssqlDb(Connection)
Return 0 Return 0
@ -781,9 +727,6 @@ Public Class ClassNIDatenbankzugriff
Command = New SqlCommand(sqlcommand, Connection) Command = New SqlCommand(sqlcommand, Connection)
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.ExecuteonMSSQL - sqlcommand definieren: " & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
Me.CloseMssqlDb(Connection) Me.CloseMssqlDb(Connection)
Return 0 Return 0
@ -800,9 +743,6 @@ Public Class ClassNIDatenbankzugriff
Catch ex As Exception Catch ex As Exception
' bei einem Fehler einen Eintrag in der Logdatei erzeugen ' bei einem Fehler einen Eintrag in der Logdatei erzeugen
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.ExecuteonMSSQL - Execute Command => SQL-Anweisungen prüfen (" & sqlcommand & "): " & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
Me.CloseMssqlDb(Connection) Me.CloseMssqlDb(Connection)
Return 0 Return 0
@ -811,18 +751,11 @@ Public Class ClassNIDatenbankzugriff
' kann eintreten, wenn entweder die SQL-Anweisung falsch ist oder wenn die DataConnection nicht richtig aufgebaut werden konnte ' kann eintreten, wenn entweder die SQL-Anweisung falsch ist oder wenn die DataConnection nicht richtig aufgebaut werden konnte
' Eintrag in Logdatei machen ' Eintrag in Logdatei machen
_Logger.Warn("Unexpected error in Execute on MSSQL Row 774") _Logger.Warn("Unexpected error in Execute on MSSQL Row 774")
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.ExecuteonMSSQL - SQL-Command ist ungültig. Command-Objekt konnte nicht erstellt werden.")
End If
Return 0 Return 0
End If End If
Catch ex As Exception Catch ex As Exception
' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden ' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.ExecuteonMSSQL - Ein unbekannter Fehler in ExecuteonMSSQL: " & ex.Message)
End If
Return 0 Return 0
End Try End Try
@ -870,9 +803,6 @@ Public Class ClassNIDatenbankzugriff
Connection.Open() Connection.Open()
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>CheckIndex_MSSSQL - Verbindung zur Datenbank aufbauen: " & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
Me.CloseMssqlDb(Connection) Me.CloseMssqlDb(Connection)
Return Nothing Return Nothing
@ -883,9 +813,6 @@ Public Class ClassNIDatenbankzugriff
Command = New SqlCommand(scalar_select, Connection) Command = New SqlCommand(scalar_select, Connection)
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>CheckIndex_MSSSQL - sqlcommand definieren: " & ex.Message)
End If
' DB-Connection schliessen ' DB-Connection schliessen
Me.CloseMssqlDb(Connection) Me.CloseMssqlDb(Connection)
Return Nothing Return Nothing

View File

@ -1,153 +1,39 @@
Imports System.Net.Mail Imports System.Net.Mail
Imports System.IO Imports System.IO
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Public Class ClassNIEmail Public Class ClassEmail
Private Shared _Logger As DigitalData.Modules.Logging.Logger Private Shared _Logger As DigitalData.Modules.Logging.Logger
Public Shared err_message As String Public Shared err_message As String
Public Shared Sub Add(ByVal errmsg As String)
err_message &= vbNewLine & errmsg
End Sub
Public Shared Sub Send_EMail(ByVal vBody As String, Optional ByVal Test As Boolean = False)
Public Sub New(pLogConf As DigitalData.Modules.Logging.LogConfig)
_Logger = pLogConf.GetLogger()
End Sub
Public Sub Send_EMail(ByVal vBody As String, ByVal pRefString As String)
'#### E-MAIL NACHRICHT VERSENDEN '#### E-MAIL NACHRICHT VERSENDEN
Try Try
'######### If My.Settings.vMailRecipient <> "" And My.Settings.vMailsenden = True Then
Dim empfaenger As String() If My.Settings.vMailRecipient.Contains(";") Then
If My.Settings.vNIEmailEmpf <> "" Then Dim oPROC As String
If My.Settings.vNIEmailEmpf.Contains(";") Then Dim oBody As String = ""
empfaenger = My.Settings.vNIEmailEmpf.Split(";") If My.Settings.vMailBodyPraefix <> String.Empty Then
Else oBody = My.Settings.vMailBodyPraefix
ReDim Preserve empfaenger(0)
empfaenger(0) = My.Settings.vNIEmailEmpf
End If
'Für jeden Empfänger eine Neue Mail erzeugen
For Each _mailempfaenger As String In empfaenger
' Neue Nachricht erzeugen:
Dim message As New MailMessage(My.Settings.vNIMailfrom, _mailempfaenger, My.Settings.vNIMailBetreff & " Domain: " & Environment.UserDomainName, _
"<font face=""Arial"">" & My.Settings.vNIMailBody & vBody & "<br>>> Maschine: " & Environment.MachineName & _
"<br>Kunde: " & frmStart._company & "<br>" & _
"<br>Domain-Name: " & Environment.UserDomainName & "<br>" & _
"<br>Gesendet am: " & My.Computer.Clock.LocalTime.ToShortDateString & "-" & _
My.Computer.Clock.LocalTime.ToLongTimeString & "</font>")
' create and add the attachment(s) */
'Dim logfile As String = ClassLogger.DateiSpeicherort & "\" & ClassLogger.DateiPrefix & System.DateTime.Now.ToString("yyyy_MM_dd") & ".txt"
'If logfile.Contains("\\") Then
' logfile = logfile.Replace("\\", "\")
'End If
'Dim Attachment As Attachment = New Attachment(logfile)
'message.Attachments.Add(Attachment)
With message
.IsBodyHtml = True
End With
'Einen SMTP Client erzeugen und Anmeldungsinformationen hinterlegen
Dim emailClient As New SmtpClient(My.Settings.vSMTP)
'Email mit Authentifizierung
Dim SMTPUserInfo As New System.Net.NetworkCredential(My.Settings.vMailUser.Trim, My.Settings.vMailPW.Trim) ', My.Settings.vDomain)
emailClient.UseDefaultCredentials = False
emailClient.Credentials = SMTPUserInfo
emailClient.Port = My.Settings.vemailPort
emailClient.DeliveryMethod = SmtpDeliveryMethod.Network
'*Send the message */
emailClient.Send(message)
_Logger.Info("==> Fehler Email erfolgreich an " & _mailempfaenger & " versendet!")
_Logger.Info("==> Text: " & vBody)
If Test = True Then
MsgBox("Email an " & _mailempfaenger & " erfolgreich versendet!", MsgBoxStyle.Information, "Erfolgsmeldung:")
End If End If
Next oBody += "<br>>> machinename: " & Environment.MachineName
oBody += "<br>>> Domain-Name: " & Environment.UserDomainName
oPROC = $"EXEC PREMAIL_NEW_EMAIL {My.Settings.vMailProfilID},'{My.Settings.vMailRecipient}','{My.Settings.vMailSubject}','{oBody}','{pRefString}',9999,8888,'ToolCollection'"
If Not IsNothing(DB_ECM) Then
If DB_ECM.DBInitialized Then
DB_ECM.ExecuteNonQuery(oPROC)
End If
End If
End If
End If End If
'######## '########
Catch ex As Exception Catch ex As Exception
If Test = True Then _Logger.Warn(">> Achtung: Fehler in Mailversand: " & ex.Message)
MsgBox("Fehler im Mailversand:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler im Mailversand NI:")
Else
_Logger.Warn(">> Achtung: Fehler in Mailversand: " & ex.Message)
End If
End Try End Try
End Sub End Sub
Public Shared Sub Send_Urgent(ByVal vBody As String, Optional ByVal Test As Boolean = False)
'#### E-MAIL NACHRICHT VERSENDEN
Try
Dim tempFilename = My.Computer.FileSystem.GetTempFileName()
Try
'Eine tempfile generieren
Dim name = Path.GetFileNameWithoutExtension(tempFilename)
tempFilename = Path.Combine(Path.GetDirectoryName(tempFilename), name & ".log")
' File.Copy(Logger.LogDateiname, tempFilename)
' create and add the attachment(s) */
'If logfile.Contains("\\") Then
' logfile = logfile.Replace("\\", "\")
'End If
Catch ex As Exception
MsgBox("Fehler im Mailversand Urgent - Add LogFile: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
_Logger.Warn(">> Achtung: Fehler in Mailversand Urgent - Add LogFile: " & ex.Message)
End Try
'#########
Dim empfaenger As String()
Dim EMAIL_EMP As String = "support-flow@digitaldata.works"
'If EMAIL_EMP.Contains(";") Then
empfaenger = EMAIL_EMP.Split(";")
'Else
'ReDim Preserve empfaenger(0)
'empfaenger(0) = EMAIL_EMP
' End If
'Für jeden Empfänger eine Neue Mail erzeugen
For Each _mailempfaenger As String In empfaenger
' Neue Nachricht erzeugen:
Dim message As New MailMessage("support-flow@digitaldata.works", _mailempfaenger, "Tool Collection - Urgent Error - Domain: " & Environment.UserDomainName,
"<font face=""Arial"">" & vBody & "<br>>> Machine: " & Environment.MachineName &
"<br>Kunde: " & frmStart._company & "<br>" &
"<br>Domain: " & Environment.UserDomainName & "<br>" &
"<br>Send-Time: " & My.Computer.Clock.LocalTime.ToShortDateString & "-" &
My.Computer.Clock.LocalTime.ToLongTimeString & "</font>")
With message
.IsBodyHtml = True
End With
Dim Attachment As Attachment = New Attachment(tempFilename)
message.Attachments.Add(Attachment)
'Einen SMTP Client erzeugen und Anmeldungsinformationen hinterlegen
Dim emailClient As New SmtpClient("mail.triplew.de")
'Email mit Authentifizierung
Dim SMTPUserInfo As New System.Net.NetworkCredential("support-flow@digitaldata.works", "ddemail105")
emailClient.UseDefaultCredentials = False
emailClient.Credentials = SMTPUserInfo
emailClient.Port = My.Settings.vemailPort
emailClient.DeliveryMethod = SmtpDeliveryMethod.Network
'*Send the message */
emailClient.Send(message)
'tempfile löschen
If My.Computer.FileSystem.FileExists(tempFilename) Then
'My.Computer.FileSystem.DeleteFile(tempFilename)
End If
_Logger.Info(">> Urgent Email erfolgreich an " & _mailempfaenger & " versendet!")
If Test = True Then
MsgBox("Email an " & _mailempfaenger & " erfolgreich versendet!", MsgBoxStyle.Information, "Erfolgsmeldung:")
End If
Next
'########
Catch ex As Exception
If Test = True Then
MsgBox("Fehler im Mailversand Urgent:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
Else
_Logger.Warn(">> Achtung: Fehler in Mailversand Urgent: " & ex.Message)
End If
End Try
End Sub
End Class End Class

View File

@ -684,7 +684,7 @@ Public Class ClassNIWindream
i1 += 1 i1 += 1
Next Next
End If End If
If My.Settings.vNIMailsenden = True Then If My.Settings.vMailsenden = True Then
'email.Send_EMail("Fehler bei RunIndexing - Datei: " & oDocument.aName.ToString & "<br>Profilname: " & Profil & "<br>Fehler: " & ex.Message) 'email.Send_EMail("Fehler bei RunIndexing - Datei: " & oDocument.aName.ToString & "<br>Profilname: " & Profil & "<br>Fehler: " & ex.Message)
End If End If
oDocument.Save() oDocument.Save()
@ -908,7 +908,7 @@ Public Class ClassNIWindream
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then If My.Settings.vMailsenden = True Then
'email.Send_EMail("Fehler bei SetfinalIndex - Datei: " & oDocument.aName.ToString & " - Fehler: " & ex.Message) 'email.Send_EMail("Fehler bei SetfinalIndex - Datei: " & oDocument.aName.ToString & " - Fehler: " & ex.Message)
End If End If
oDocument.Save() oDocument.Save()
@ -1038,6 +1038,7 @@ Public Class ClassNIWindream
Const WMEntityDocument = 1 Const WMEntityDocument = 1
Dim IndexwertAusWindream As Object = Nothing Dim IndexwertAusWindream As Object = Nothing
_Logger.Debug($"NEW_MOVE_FILE getting WMObject for: {sourcepath}")
oWMFile = oWMSession.GetWMObjectByPath(WMEntityDocument, sourcepath) oWMFile = oWMSession.GetWMObjectByPath(WMEntityDocument, sourcepath)
If oWMFile.lock Then If oWMFile.lock Then
oWMFile.aPath = targetpath oWMFile.aPath = targetpath

View File

@ -1,7 +1,6 @@
Imports System.Xml Imports System.Xml
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Public Class ClassxmlZugriff Public Class ClassxmlZugriff
Private email As New ClassNIEmail
Private Shared _Logger As DigitalData.Modules.Logging.Logger Private Shared _Logger As DigitalData.Modules.Logging.Logger
'führt eine SQL-Anweisung auf der DB aus 'führt eine SQL-Anweisung auf der DB aus
Public Function GetValueFromLuratechxml(ByVal vfilename As String, ByVal vfullfilepath As String, ByVal KnotenString As String, ByVal Profil As String) ' Public Function GetValueFromLuratechxml(ByVal vfilename As String, ByVal vfullfilepath As String, ByVal KnotenString As String, ByVal Profil As String) '
@ -69,9 +68,7 @@ Public Class ClassxmlZugriff
Catch ex As Exception Catch ex As Exception
' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden ' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("ClassxmlZugriff.GetValueFromLuratechxml " & "<br> Profil: " & Profil & "<br> Datei: " & vfullfilepath & "<br> Ein unbekannter Fehler: " & ex.Message)
End If
Return Nothing Return Nothing
End Try End Try
End Function End Function
@ -114,9 +111,6 @@ Public Class ClassxmlZugriff
Catch ex As Exception Catch ex As Exception
' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden ' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden
_Logger.Error(ex) _Logger.Error(ex)
If My.Settings.vNIMailsenden = True Then
email.Send_EMail("ClassxmlZugriff.GetValueFromZugFerdxml " & "<br> Profil: " & Profil & "<br> Datei: " & vfullfilepath & "<br> Ein unbekannter Fehler: " & ex.Message)
End If
Return Nothing Return Nothing
End Try End Try
End Function End Function

View File

@ -1,5 +1,5 @@
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Database
Module ModuleCURRENT Module ModuleCURRENT
Public CURRENT_START_DATETIME As Date Public CURRENT_START_DATETIME As Date
Public NI_Restart As Boolean = False Public NI_Restart As Boolean = False
@ -31,5 +31,7 @@ Module ModuleCURRENT
Public CURRENT_UNTERV As List(Of String) Public CURRENT_UNTERV As List(Of String)
Public CURRENT_DOCID As Int64 Public CURRENT_DOCID As Int64
Public WMSearchIsSQL As Boolean = False Public WMSearchIsSQL As Boolean = False
Public DB_ECM As MSSQLServer
Public EMAIL_DD As ClassEmail
End Module End Module

View File

@ -106,42 +106,34 @@ Namespace My
End Set End Set
End Property End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _ <Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("absender@IhrServer.de"), _ Global.System.Configuration.DefaultSettingValueAttribute("1")> _
Global.System.Configuration.SettingsManageabilityAttribute(Global.System.Configuration.SettingsManageability.Roaming)> _ Public ReadOnly Property vMailProfilID() As Integer
Public Property vNIMailfrom() As String
Get Get
Return CType(Me("vNIMailfrom"),String) Return CType(Me("vMailProfilID"),Integer)
End Get
End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("support-flow@digitaldata.works")> _
Public ReadOnly Property vMailRecipient() As String
Get
Return CType(Me("vMailRecipient"),String)
End Get End Get
Set
Me("vNIMailfrom") = value
End Set
End Property End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _ <Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute(""), _ Global.System.Configuration.DefaultSettingValueAttribute("Fehler in Modul ToolCollection"), _
Global.System.Configuration.SettingsManageabilityAttribute(Global.System.Configuration.SettingsManageability.Roaming)> _ Global.System.Configuration.SettingsManageabilityAttribute(Global.System.Configuration.SettingsManageability.Roaming)> _
Public Property vNIEmailEmpf() As String Public Property vMailSubject() As String
Get Get
Return CType(Me("vNIEmailEmpf"),String) Return CType(Me("vMailSubject"),String)
End Get End Get
Set Set
Me("vNIEmailEmpf") = value Me("vMailSubject") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("Fehler im Modul Nachindexierung"), _
Global.System.Configuration.SettingsManageabilityAttribute(Global.System.Configuration.SettingsManageability.Roaming)> _
Public Property vNIMailBetreff() As String
Get
Return CType(Me("vNIMailBetreff"),String)
End Get
Set
Me("vNIMailBetreff") = value
End Set End Set
End Property End Property
@ -150,65 +142,22 @@ Namespace My
Global.System.Configuration.DefaultSettingValueAttribute("<p>__________________<br>"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" <b><font face=""Arial"">Achtung Fehler:</font></b><fon"& _ Global.System.Configuration.DefaultSettingValueAttribute("<p>__________________<br>"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" <b><font face=""Arial"">Achtung Fehler:</font></b><fon"& _
"t face=""Arial""><br>"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" <br>"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" Folgender Fehler wurde festgestellt:</font> </p>"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)), _ "t face=""Arial""><br>"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" <br>"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" Folgender Fehler wurde festgestellt:</font> </p>"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)), _
Global.System.Configuration.SettingsManageabilityAttribute(Global.System.Configuration.SettingsManageability.Roaming)> _ Global.System.Configuration.SettingsManageabilityAttribute(Global.System.Configuration.SettingsManageability.Roaming)> _
Public Property vNIMailBody() As String Public Property vMailBodyPraefix() As String
Get Get
Return CType(Me("vNIMailBody"),String) Return CType(Me("vMailBodyPraefix"),String)
End Get End Get
Set Set
Me("vNIMailBody") = value Me("vMailBodyPraefix") = value
End Set End Set
End Property End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _ <Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("mailODERpop.smtp.de"), _ Global.System.Configuration.DefaultSettingValueAttribute("False")> _
Global.System.Configuration.SettingsManageabilityAttribute(Global.System.Configuration.SettingsManageability.Roaming)> _ Public ReadOnly Property vMailsenden() As Boolean
Public Property vSMTP() As String
Get Get
Return CType(Me("vSMTP"),String) Return CType(Me("vMailsenden"),Boolean)
End Get End Get
Set
Me("vSMTP") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("Ihr User"), _
Global.System.Configuration.SettingsManageabilityAttribute(Global.System.Configuration.SettingsManageability.Roaming)> _
Public Property vMailUser() As String
Get
Return CType(Me("vMailUser"),String)
End Get
Set
Me("vMailUser") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute(""), _
Global.System.Configuration.SettingsManageabilityAttribute(Global.System.Configuration.SettingsManageability.Roaming)> _
Public Property vMailPW() As String
Get
Return CType(Me("vMailPW"),String)
End Get
Set
Me("vMailPW") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("False"), _
Global.System.Configuration.SettingsManageabilityAttribute(Global.System.Configuration.SettingsManageability.Roaming)> _
Public Property vNIMailsenden() As Boolean
Get
Return CType(Me("vNIMailsenden"),Boolean)
End Get
Set
Me("vNIMailsenden") = value
End Set
End Property End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _ <Global.System.Configuration.UserScopedSettingAttribute(), _
@ -250,59 +199,6 @@ Namespace My
End Set End Set
End Property End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("absender@IhrServer.de"), _
Global.System.Configuration.SettingsManageabilityAttribute(Global.System.Configuration.SettingsManageability.Roaming)> _
Public Property vDIMailFrom() As String
Get
Return CType(Me("vDIMailFrom"),String)
End Get
Set
Me("vDIMailFrom") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute(""), _
Global.System.Configuration.SettingsManageabilityAttribute(Global.System.Configuration.SettingsManageability.Roaming)> _
Public Property vDIMailEmpf() As String
Get
Return CType(Me("vDIMailEmpf"),String)
End Get
Set
Me("vDIMailEmpf") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("Fehler im Modul Dateiimporter"), _
Global.System.Configuration.SettingsManageabilityAttribute(Global.System.Configuration.SettingsManageability.Roaming)> _
Public Property vDIMailBetreff() As String
Get
Return CType(Me("vDIMailBetreff"),String)
End Get
Set
Me("vDIMailBetreff") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("<p>__________________<br>"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" <b><font face=""Arial"">Achtung Fehler:</font></b><fon"& _
"t face=""Arial""><br>"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" <br>"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" Folgender Fehler wurde festgestellt:</font> </p>"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)), _
Global.System.Configuration.SettingsManageabilityAttribute(Global.System.Configuration.SettingsManageability.Roaming)> _
Public Property vDIMailBody() As String
Get
Return CType(Me("vDIMailBody"),String)
End Get
Set
Me("vDIMailBody") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _ <Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("False"), _ Global.System.Configuration.DefaultSettingValueAttribute("False"), _
@ -316,19 +212,6 @@ Namespace My
End Set End Set
End Property End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("False"), _
Global.System.Configuration.SettingsManageabilityAttribute(Global.System.Configuration.SettingsManageability.Roaming)> _
Public Property vDIMailSenden() As Boolean
Get
Return CType(Me("vDIMailSenden"),Boolean)
End Get
Set
Me("vDIMailSenden") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _ <Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("0, 0"), _ Global.System.Configuration.DefaultSettingValueAttribute("0, 0"), _

View File

@ -14,32 +14,23 @@
<Setting Name="vDIConfigDatei" Roaming="true" Type="System.String" Scope="User"> <Setting Name="vDIConfigDatei" Roaming="true" Type="System.String" Scope="User">
<Value Profile="(Default)">modDateiimportConfig.xml</Value> <Value Profile="(Default)">modDateiimportConfig.xml</Value>
</Setting> </Setting>
<Setting Name="vNIMailfrom" Roaming="true" Type="System.String" Scope="User"> <Setting Name="vMailProfilID" Roaming="true" Type="System.Int32" Scope="Application">
<Value Profile="(Default)">absender@IhrServer.de</Value> <Value Profile="(Default)">1</Value>
</Setting> </Setting>
<Setting Name="vNIEmailEmpf" Roaming="true" Type="System.String" Scope="User"> <Setting Name="vMailRecipient" Roaming="true" Type="System.String" Scope="Application">
<Value Profile="(Default)" /> <Value Profile="(Default)">support-flow@digitaldata.works</Value>
</Setting> </Setting>
<Setting Name="vNIMailBetreff" Roaming="true" Type="System.String" Scope="User"> <Setting Name="vMailSubject" Roaming="true" Type="System.String" Scope="User">
<Value Profile="(Default)">Fehler im Modul Nachindexierung</Value> <Value Profile="(Default)">Fehler in Modul ToolCollection</Value>
</Setting> </Setting>
<Setting Name="vNIMailBody" Roaming="true" Type="System.String" Scope="User"> <Setting Name="vMailBodyPraefix" Roaming="true" Type="System.String" Scope="User">
<Value Profile="(Default)">&lt;p&gt;__________________&lt;br&gt; <Value Profile="(Default)">&lt;p&gt;__________________&lt;br&gt;
&lt;b&gt;&lt;font face="Arial"&gt;Achtung Fehler:&lt;/font&gt;&lt;/b&gt;&lt;font face="Arial"&gt;&lt;br&gt; &lt;b&gt;&lt;font face="Arial"&gt;Achtung Fehler:&lt;/font&gt;&lt;/b&gt;&lt;font face="Arial"&gt;&lt;br&gt;
&lt;br&gt; &lt;br&gt;
Folgender Fehler wurde festgestellt:&lt;/font&gt; &lt;/p&gt; Folgender Fehler wurde festgestellt:&lt;/font&gt; &lt;/p&gt;
</Value> </Value>
</Setting> </Setting>
<Setting Name="vSMTP" Roaming="true" Type="System.String" Scope="User"> <Setting Name="vMailsenden" Roaming="true" Type="System.Boolean" Scope="Application">
<Value Profile="(Default)">mailODERpop.smtp.de</Value>
</Setting>
<Setting Name="vMailUser" Roaming="true" Type="System.String" Scope="User">
<Value Profile="(Default)">Ihr User</Value>
</Setting>
<Setting Name="vMailPW" Roaming="true" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="vNIMailsenden" Roaming="true" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value> <Value Profile="(Default)">False</Value>
</Setting> </Setting>
<Setting Name="frmNI_SQL_Loc" Roaming="true" Type="System.Drawing.Point" Scope="User"> <Setting Name="frmNI_SQL_Loc" Roaming="true" Type="System.Drawing.Point" Scope="User">
@ -51,28 +42,9 @@
<Setting Name="NIDurchlauf_Intervall" Roaming="true" Type="System.Int32" Scope="User"> <Setting Name="NIDurchlauf_Intervall" Roaming="true" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value> <Value Profile="(Default)">0</Value>
</Setting> </Setting>
<Setting Name="vDIMailFrom" Roaming="true" Type="System.String" Scope="User">
<Value Profile="(Default)">absender@IhrServer.de</Value>
</Setting>
<Setting Name="vDIMailEmpf" Roaming="true" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="vDIMailBetreff" Roaming="true" Type="System.String" Scope="User">
<Value Profile="(Default)">Fehler im Modul Dateiimporter</Value>
</Setting>
<Setting Name="vDIMailBody" Roaming="true" Type="System.String" Scope="User">
<Value Profile="(Default)">&lt;p&gt;__________________&lt;br&gt;
&lt;b&gt;&lt;font face="Arial"&gt;Achtung Fehler:&lt;/font&gt;&lt;/b&gt;&lt;font face="Arial"&gt;&lt;br&gt;
&lt;br&gt;
Folgender Fehler wurde festgestellt:&lt;/font&gt; &lt;/p&gt;
</Value>
</Setting>
<Setting Name="vDIDurchlaufRunning" Roaming="true" Type="System.Boolean" Scope="User"> <Setting Name="vDIDurchlaufRunning" Roaming="true" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value> <Value Profile="(Default)">False</Value>
</Setting> </Setting>
<Setting Name="vDIMailSenden" Roaming="true" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="frmNIHauptseite_Loc" Roaming="true" Type="System.Drawing.Point" Scope="User"> <Setting Name="frmNIHauptseite_Loc" Roaming="true" Type="System.Drawing.Point" Scope="User">
<Value Profile="(Default)">0, 0</Value> <Value Profile="(Default)">0, 0</Value>
</Setting> </Setting>
@ -222,7 +194,7 @@
</Setting> </Setting>
<Setting Name="DDECMConString" Type="(Connection string)" Scope="Application"> <Setting Name="DDECMConString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt; <DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; &lt;SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
&lt;ConnectionString&gt;Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd&lt;/ConnectionString&gt; &lt;ConnectionString&gt;Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt; &lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue> &lt;/SerializableConnectionString&gt;</DesignTimeValue>

View File

@ -190,7 +190,6 @@
<Compile Include="ClassDIProfile.vb" /> <Compile Include="ClassDIProfile.vb" />
<Compile Include="ClassDIRegel.vb" /> <Compile Include="ClassDIRegel.vb" />
<Compile Include="ClassDIRegeln.vb" /> <Compile Include="ClassDIRegeln.vb" />
<Compile Include="ClassDI_Email.vb" />
<Compile Include="ClassLDAP.vb" /> <Compile Include="ClassLDAP.vb" />
<Compile Include="ClassLicense.vb" /> <Compile Include="ClassLicense.vb" />
<Compile Include="ClassLicenseManager.vb" /> <Compile Include="ClassLicenseManager.vb" />

View File

@ -11,7 +11,8 @@
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections> </configSections>
<connectionStrings> <connectionStrings>
<add name="ToolCollection.My.MySettings.DDECMConString" connectionString="Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd" providerName="System.Data.SqlClient" /> <add name="ToolCollection.My.MySettings.DDECMConString" connectionString="Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd"
providerName="System.Data.SqlClient" />
</connectionStrings> </connectionStrings>
<system.diagnostics> <system.diagnostics>
<sources> <sources>
@ -47,34 +48,16 @@
<setting name="vDIConfigDatei" serializeAs="String"> <setting name="vDIConfigDatei" serializeAs="String">
<value>modDateiimportConfig.xml</value> <value>modDateiimportConfig.xml</value>
</setting> </setting>
<setting name="vNIMailfrom" serializeAs="String"> <setting name="vMailSubject" serializeAs="String">
<value>absender@IhrServer.de</value> <value>Fehler in Modul ToolCollection</value>
</setting> </setting>
<setting name="vNIEmailEmpf" serializeAs="String"> <setting name="vMailBodyPraefix" serializeAs="String">
<value />
</setting>
<setting name="vNIMailBetreff" serializeAs="String">
<value>Fehler im Modul Nachindexierung</value>
</setting>
<setting name="vNIMailBody" serializeAs="String">
<value>&lt;p&gt;__________________&lt;br&gt; <value>&lt;p&gt;__________________&lt;br&gt;
&lt;b&gt;&lt;font face="Arial"&gt;Achtung Fehler:&lt;/font&gt;&lt;/b&gt;&lt;font face="Arial"&gt;&lt;br&gt; &lt;b&gt;&lt;font face="Arial"&gt;Achtung Fehler:&lt;/font&gt;&lt;/b&gt;&lt;font face="Arial"&gt;&lt;br&gt;
&lt;br&gt; &lt;br&gt;
Folgender Fehler wurde festgestellt:&lt;/font&gt; &lt;/p&gt; Folgender Fehler wurde festgestellt:&lt;/font&gt; &lt;/p&gt;
</value> </value>
</setting> </setting>
<setting name="vSMTP" serializeAs="String">
<value>mailODERpop.smtp.de</value>
</setting>
<setting name="vMailUser" serializeAs="String">
<value>Ihr User</value>
</setting>
<setting name="vMailPW" serializeAs="String">
<value />
</setting>
<setting name="vNIMailsenden" serializeAs="String">
<value>False</value>
</setting>
<setting name="frmNI_SQL_Loc" serializeAs="String"> <setting name="frmNI_SQL_Loc" serializeAs="String">
<value>0, 0</value> <value>0, 0</value>
</setting> </setting>
@ -84,28 +67,9 @@
<setting name="NIDurchlauf_Intervall" serializeAs="String"> <setting name="NIDurchlauf_Intervall" serializeAs="String">
<value>0</value> <value>0</value>
</setting> </setting>
<setting name="vDIMailFrom" serializeAs="String">
<value>absender@IhrServer.de</value>
</setting>
<setting name="vDIMailEmpf" serializeAs="String">
<value />
</setting>
<setting name="vDIMailBetreff" serializeAs="String">
<value>Fehler im Modul Dateiimporter</value>
</setting>
<setting name="vDIMailBody" serializeAs="String">
<value>&lt;p&gt;__________________&lt;br&gt;
&lt;b&gt;&lt;font face="Arial"&gt;Achtung Fehler:&lt;/font&gt;&lt;/b&gt;&lt;font face="Arial"&gt;&lt;br&gt;
&lt;br&gt;
Folgender Fehler wurde festgestellt:&lt;/font&gt; &lt;/p&gt;
</value>
</setting>
<setting name="vDIDurchlaufRunning" serializeAs="String"> <setting name="vDIDurchlaufRunning" serializeAs="String">
<value>False</value> <value>False</value>
</setting> </setting>
<setting name="vDIMailSenden" serializeAs="String">
<value>False</value>
</setting>
<setting name="frmNIHauptseite_Loc" serializeAs="String"> <setting name="frmNIHauptseite_Loc" serializeAs="String">
<value>0, 0</value> <value>0, 0</value>
</setting> </setting>
@ -212,6 +176,15 @@
</userSettings> </userSettings>
<applicationSettings> <applicationSettings>
<ToolCollection.My.MySettings> <ToolCollection.My.MySettings>
<setting name="vMailProfilID" serializeAs="String">
<value>1</value>
</setting>
<setting name="vMailRecipient" serializeAs="String">
<value>support-flow@digitaldata.works</value>
</setting>
<setting name="vMailsenden" serializeAs="String">
<value>False</value>
</setting>
<setting name="MRWD_Laufwerk" serializeAs="String"> <setting name="MRWD_Laufwerk" serializeAs="String">
<value>W</value> <value>W</value>
</setting> </setting>

View File

@ -62,9 +62,9 @@ Public Class clsNI_WorkFile
Catch ex As Exception Catch ex As Exception
'bei einem Fehler einen Eintrag in der Logdatei machen 'bei einem Fehler einen Eintrag in der Logdatei machen
_Logger.Warn("ACHTUNG Schwerwiegender Fehler in Work_File: " & ex.Message) _Logger.Warn("ACHTUNG Schwerwiegender Fehler in Work_File: " & ex.Message)
If My.Settings.vNIMailsenden = True Then
ClassNIEmail.Add("Schwerwiegender Fehler bei Work_File - <br> Profil: " & aktivesProfil.Profilname & "<br> Datei: " & dokument.aName.ToString & "<br> Fehler: " & ex.Message) EMAIL_DD.Send_EMail("Schwerwiegender Fehler bei Work_File - <br> Profil: " & aktivesProfil.Profilname & "<br> Datei: " & dokument.aName.ToString & "<br> Fehler: " & ex.Message, "clsNIWorkFileWorkFile")
End If
Return False Return False
End Try End Try
End Function End Function
@ -174,9 +174,6 @@ Public Class clsNI_WorkFile
Catch ex As Exception Catch ex As Exception
Dim errormsg As String = "UNVORHERGESEHENER FEHLER in bei Get_Desk_index (GetVariableValue für Index '" & aktivesProfil.Desk_windreamIndex & "'): " & ex.Message Dim errormsg As String = "UNVORHERGESEHENER FEHLER in bei Get_Desk_index (GetVariableValue für Index '" & aktivesProfil.Desk_windreamIndex & "'): " & ex.Message
_Logger.Warn(errormsg) _Logger.Warn(errormsg)
If My.Settings.vNIMailsenden = True Then
ClassNIEmail.Add(errormsg)
End If
End Try End Try
If _file_DeskriptiverWert Is Nothing Then If _file_DeskriptiverWert Is Nothing Then
_Logger.Warn("- ACHTUNG: Deskriptiver Indexwert ist NOTHING", False) _Logger.Warn("- ACHTUNG: Deskriptiver Indexwert ist NOTHING", False)

View File

@ -59,26 +59,6 @@ Partial Class frmDIHauptseite
Me.tvLog = New System.Windows.Forms.TreeView() Me.tvLog = New System.Windows.Forms.TreeView()
Me.Label5 = New System.Windows.Forms.Label() Me.Label5 = New System.Windows.Forms.Label()
Me.tpKonfiguration = New System.Windows.Forms.TabPage() Me.tpKonfiguration = New System.Windows.Forms.TabPage()
Me.gbEmail = New System.Windows.Forms.GroupBox()
Me.Label16 = New System.Windows.Forms.Label()
Me.txtBody = New System.Windows.Forms.TextBox()
Me.btntestmail = New System.Windows.Forms.Button()
Me.txtEmpfaenger = New System.Windows.Forms.TextBox()
Me.Label13 = New System.Windows.Forms.Label()
Me.txtBetreff = New System.Windows.Forms.TextBox()
Me.Label12 = New System.Windows.Forms.Label()
Me.txtPasswort = New System.Windows.Forms.TextBox()
Me.Label11 = New System.Windows.Forms.Label()
Me.txtUser = New System.Windows.Forms.TextBox()
Me.Label8 = New System.Windows.Forms.Label()
Me.txtSMTP = New System.Windows.Forms.TextBox()
Me.Label7 = New System.Windows.Forms.Label()
Me.txtMail_from = New System.Windows.Forms.TextBox()
Me.Label4 = New System.Windows.Forms.Label()
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
Me.Label3 = New System.Windows.Forms.Label()
Me.txtAusschluss = New System.Windows.Forms.TextBox()
Me.chkbEmail = New System.Windows.Forms.CheckBox()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.TableAdapterManager = New ToolCollection.MyDatasetTableAdapters.TableAdapterManager() Me.TableAdapterManager = New ToolCollection.MyDatasetTableAdapters.TableAdapterManager()
Me.TBTC_DI_REGEX_MATCHTableAdapter = New ToolCollection.MyDatasetTableAdapters.TBTC_DI_REGEX_MATCHTableAdapter() Me.TBTC_DI_REGEX_MATCHTableAdapter = New ToolCollection.MyDatasetTableAdapters.TBTC_DI_REGEX_MATCHTableAdapter()
@ -89,9 +69,6 @@ Partial Class frmDIHauptseite
CType(Me.numIntervallDurchlauf, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.numIntervallDurchlauf, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TBTC_DI_REGEX_MATCHBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TBTC_DI_REGEX_MATCHBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.MyDataset, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.MyDataset, System.ComponentModel.ISupportInitialize).BeginInit()
Me.tpKonfiguration.SuspendLayout()
Me.gbEmail.SuspendLayout()
Me.GroupBox3.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
' '
'timRun_Dateiimport 'timRun_Dateiimport
@ -430,8 +407,6 @@ Partial Class frmDIHauptseite
' '
'tpKonfiguration 'tpKonfiguration
' '
Me.tpKonfiguration.Controls.Add(Me.gbEmail)
Me.tpKonfiguration.Controls.Add(Me.GroupBox3)
Me.tpKonfiguration.Location = New System.Drawing.Point(4, 22) Me.tpKonfiguration.Location = New System.Drawing.Point(4, 22)
Me.tpKonfiguration.Name = "tpKonfiguration" Me.tpKonfiguration.Name = "tpKonfiguration"
Me.tpKonfiguration.Padding = New System.Windows.Forms.Padding(3) Me.tpKonfiguration.Padding = New System.Windows.Forms.Padding(3)
@ -440,218 +415,6 @@ Partial Class frmDIHauptseite
Me.tpKonfiguration.Text = "Einstellungen" Me.tpKonfiguration.Text = "Einstellungen"
Me.tpKonfiguration.UseVisualStyleBackColor = True Me.tpKonfiguration.UseVisualStyleBackColor = True
' '
'gbEmail
'
Me.gbEmail.Controls.Add(Me.Label16)
Me.gbEmail.Controls.Add(Me.txtBody)
Me.gbEmail.Controls.Add(Me.btntestmail)
Me.gbEmail.Controls.Add(Me.txtEmpfaenger)
Me.gbEmail.Controls.Add(Me.Label13)
Me.gbEmail.Controls.Add(Me.txtBetreff)
Me.gbEmail.Controls.Add(Me.Label12)
Me.gbEmail.Controls.Add(Me.txtPasswort)
Me.gbEmail.Controls.Add(Me.Label11)
Me.gbEmail.Controls.Add(Me.txtUser)
Me.gbEmail.Controls.Add(Me.Label8)
Me.gbEmail.Controls.Add(Me.txtSMTP)
Me.gbEmail.Controls.Add(Me.Label7)
Me.gbEmail.Controls.Add(Me.txtMail_from)
Me.gbEmail.Controls.Add(Me.Label4)
Me.gbEmail.Dock = System.Windows.Forms.DockStyle.Fill
Me.gbEmail.Enabled = False
Me.gbEmail.Location = New System.Drawing.Point(3, 83)
Me.gbEmail.Name = "gbEmail"
Me.gbEmail.Size = New System.Drawing.Size(708, 401)
Me.gbEmail.TabIndex = 1
Me.gbEmail.TabStop = False
Me.gbEmail.Text = "E-Mail Konfiguration"
'
'Label16
'
Me.Label16.AutoSize = True
Me.Label16.Location = New System.Drawing.Point(6, 237)
Me.Label16.Name = "Label16"
Me.Label16.Size = New System.Drawing.Size(503, 13)
Me.Label16.TabIndex = 16
Me.Label16.Text = "Standard Einleitungstext: (HTML fähig: <br> = Zeilenwechsel;<b>= Fett Formatiert;" &
"</b>= Ende)"
'
'txtBody
'
Me.txtBody.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ToolCollection.My.MySettings.Default, "vDIMailBody", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtBody.Location = New System.Drawing.Point(9, 253)
Me.txtBody.Multiline = True
Me.txtBody.Name = "txtBody"
Me.txtBody.Size = New System.Drawing.Size(699, 64)
Me.txtBody.TabIndex = 15
Me.txtBody.Text = Global.ToolCollection.My.MySettings.Default.vDIMailBody
'
'btntestmail
'
Me.btntestmail.Image = Global.ToolCollection.My.Resources.Resources.mail_write
Me.btntestmail.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btntestmail.Location = New System.Drawing.Point(9, 323)
Me.btntestmail.Name = "btntestmail"
Me.btntestmail.Size = New System.Drawing.Size(96, 37)
Me.btntestmail.TabIndex = 12
Me.btntestmail.Text = "Test-Mail"
Me.btntestmail.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btntestmail.UseVisualStyleBackColor = True
'
'txtEmpfaenger
'
Me.txtEmpfaenger.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ToolCollection.My.MySettings.Default, "vDIMailEmpf", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtEmpfaenger.Location = New System.Drawing.Point(9, 211)
Me.txtEmpfaenger.Name = "txtEmpfaenger"
Me.txtEmpfaenger.Size = New System.Drawing.Size(699, 22)
Me.txtEmpfaenger.TabIndex = 11
Me.txtEmpfaenger.Text = Global.ToolCollection.My.MySettings.Default.vDIMailEmpf
'
'Label13
'
Me.Label13.AutoSize = True
Me.Label13.Location = New System.Drawing.Point(6, 195)
Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(298, 13)
Me.Label13.TabIndex = 10
Me.Label13.Text = "Empfänger: (Mehrere Empfänger bitte durch "";"" trennen )"
'
'txtBetreff
'
Me.txtBetreff.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ToolCollection.My.MySettings.Default, "vDIMailBetreff", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtBetreff.Location = New System.Drawing.Point(9, 166)
Me.txtBetreff.Name = "txtBetreff"
Me.txtBetreff.Size = New System.Drawing.Size(344, 22)
Me.txtBetreff.TabIndex = 9
Me.txtBetreff.Text = Global.ToolCollection.My.MySettings.Default.vDIMailBetreff
'
'Label12
'
Me.Label12.AutoSize = True
Me.Label12.Location = New System.Drawing.Point(6, 150)
Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(238, 13)
Me.Label12.TabIndex = 8
Me.Label12.Text = "Betreff: (Text für den Betreff der Fehler-Email)"
'
'txtPasswort
'
Me.txtPasswort.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ToolCollection.My.MySettings.Default, "vMailPW", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtPasswort.Location = New System.Drawing.Point(364, 120)
Me.txtPasswort.Name = "txtPasswort"
Me.txtPasswort.Size = New System.Drawing.Size(189, 22)
Me.txtPasswort.TabIndex = 7
Me.txtPasswort.Text = Global.ToolCollection.My.MySettings.Default.vMailPW
Me.txtPasswort.UseSystemPasswordChar = True
'
'Label11
'
Me.Label11.AutoSize = True
Me.Label11.Location = New System.Drawing.Point(361, 104)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(86, 13)
Me.Label11.TabIndex = 6
Me.Label11.Text = "User-Passwort: "
'
'txtUser
'
Me.txtUser.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ToolCollection.My.MySettings.Default, "vMailUser", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtUser.Location = New System.Drawing.Point(364, 78)
Me.txtUser.Name = "txtUser"
Me.txtUser.Size = New System.Drawing.Size(344, 22)
Me.txtUser.TabIndex = 5
Me.txtUser.Text = Global.ToolCollection.My.MySettings.Default.vMailUser
'
'Label8
'
Me.Label8.AutoSize = True
Me.Label8.Location = New System.Drawing.Point(361, 62)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(133, 13)
Me.Label8.TabIndex = 4
Me.Label8.Text = "User: (Authentifizierung)"
'
'txtSMTP
'
Me.txtSMTP.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ToolCollection.My.MySettings.Default, "vSMTP", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtSMTP.Location = New System.Drawing.Point(9, 78)
Me.txtSMTP.Name = "txtSMTP"
Me.txtSMTP.Size = New System.Drawing.Size(344, 22)
Me.txtSMTP.TabIndex = 3
Me.txtSMTP.Text = Global.ToolCollection.My.MySettings.Default.vSMTP
'
'Label7
'
Me.Label7.AutoSize = True
Me.Label7.Location = New System.Drawing.Point(6, 62)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(138, 13)
Me.Label7.TabIndex = 2
Me.Label7.Text = "SMTP-Server: (Mail-Server)"
'
'txtMail_from
'
Me.txtMail_from.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ToolCollection.My.MySettings.Default, "vDIMailfrom", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtMail_from.Location = New System.Drawing.Point(9, 34)
Me.txtMail_from.Name = "txtMail_from"
Me.txtMail_from.Size = New System.Drawing.Size(344, 22)
Me.txtMail_from.TabIndex = 1
Me.txtMail_from.Text = Global.ToolCollection.My.MySettings.Default.vDIMailFrom
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(6, 18)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(139, 13)
Me.Label4.TabIndex = 0
Me.Label4.Text = "Absender: (Email-Adresse)"
'
'GroupBox3
'
Me.GroupBox3.Controls.Add(Me.Label3)
Me.GroupBox3.Controls.Add(Me.txtAusschluss)
Me.GroupBox3.Controls.Add(Me.chkbEmail)
Me.GroupBox3.Dock = System.Windows.Forms.DockStyle.Top
Me.GroupBox3.Location = New System.Drawing.Point(3, 3)
Me.GroupBox3.Name = "GroupBox3"
Me.GroupBox3.Size = New System.Drawing.Size(708, 80)
Me.GroupBox3.TabIndex = 0
Me.GroupBox3.TabStop = False
Me.GroupBox3.Text = "Allgemeine Einstellungen:"
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label3.Location = New System.Drawing.Point(6, 40)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(431, 13)
Me.Label3.TabIndex = 8
Me.Label3.Text = "Dateien ausschließen die folgende Zeichen in Namen enthalten (Trennen mit ""/""):"
'
'txtAusschluss
'
Me.txtAusschluss.BackColor = System.Drawing.SystemColors.Window
Me.txtAusschluss.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ToolCollection.My.MySettings.Default, "vDIAusschluss", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtAusschluss.Location = New System.Drawing.Point(9, 58)
Me.txtAusschluss.Name = "txtAusschluss"
Me.txtAusschluss.Size = New System.Drawing.Size(687, 22)
Me.txtAusschluss.TabIndex = 7
Me.txtAusschluss.Text = Global.ToolCollection.My.MySettings.Default.vDIAusschluss
'
'chkbEmail
'
Me.chkbEmail.AutoSize = True
Me.chkbEmail.Checked = Global.ToolCollection.My.MySettings.Default.vDIMailSenden
Me.chkbEmail.DataBindings.Add(New System.Windows.Forms.Binding("Checked", Global.ToolCollection.My.MySettings.Default, "vDIMailSenden", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.chkbEmail.Location = New System.Drawing.Point(9, 21)
Me.chkbEmail.Name = "chkbEmail"
Me.chkbEmail.Size = New System.Drawing.Size(146, 17)
Me.chkbEmail.TabIndex = 0
Me.chkbEmail.Text = "Fehler E-Mail aktivieren"
Me.chkbEmail.UseVisualStyleBackColor = True
'
'ContextMenuStrip1 'ContextMenuStrip1
' '
Me.ContextMenuStrip1.Name = "ContextMenuStrip1" Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
@ -691,11 +454,6 @@ Partial Class frmDIHauptseite
CType(Me.numIntervallDurchlauf, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.numIntervallDurchlauf, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.TBTC_DI_REGEX_MATCHBindingSource, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TBTC_DI_REGEX_MATCHBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.MyDataset, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.MyDataset, System.ComponentModel.ISupportInitialize).EndInit()
Me.tpKonfiguration.ResumeLayout(False)
Me.gbEmail.ResumeLayout(False)
Me.gbEmail.PerformLayout()
Me.GroupBox3.ResumeLayout(False)
Me.GroupBox3.PerformLayout()
Me.ResumeLayout(False) Me.ResumeLayout(False)
End Sub End Sub
@ -728,31 +486,11 @@ Partial Class frmDIHauptseite
Friend WithEvents tvLog As System.Windows.Forms.TreeView Friend WithEvents tvLog As System.Windows.Forms.TreeView
Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents tpKonfiguration As System.Windows.Forms.TabPage Friend WithEvents tpKonfiguration As System.Windows.Forms.TabPage
Friend WithEvents gbEmail As System.Windows.Forms.GroupBox
Friend WithEvents Label16 As System.Windows.Forms.Label
Friend WithEvents txtBody As System.Windows.Forms.TextBox
Friend WithEvents btntestmail As System.Windows.Forms.Button
Friend WithEvents txtEmpfaenger As System.Windows.Forms.TextBox
Friend WithEvents Label13 As System.Windows.Forms.Label
Friend WithEvents txtBetreff As System.Windows.Forms.TextBox
Friend WithEvents Label12 As System.Windows.Forms.Label
Friend WithEvents txtPasswort As System.Windows.Forms.TextBox
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents txtUser As System.Windows.Forms.TextBox
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents txtSMTP As System.Windows.Forms.TextBox
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents txtMail_from As System.Windows.Forms.TextBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
Friend WithEvents chkbEmail As System.Windows.Forms.CheckBox
Friend WithEvents rbAutomatisch As System.Windows.Forms.RadioButton Friend WithEvents rbAutomatisch As System.Windows.Forms.RadioButton
Friend WithEvents rbManuell As System.Windows.Forms.RadioButton Friend WithEvents rbManuell As System.Windows.Forms.RadioButton
Friend WithEvents lblLetzter_Durchlauf As System.Windows.Forms.Label Friend WithEvents lblLetzter_Durchlauf As System.Windows.Forms.Label
Friend WithEvents lblmanuell_letzterDurchlauf As System.Windows.Forms.Label Friend WithEvents lblmanuell_letzterDurchlauf As System.Windows.Forms.Label
Friend WithEvents ContextMenuStrip1 As System.Windows.Forms.ContextMenuStrip Friend WithEvents ContextMenuStrip1 As System.Windows.Forms.ContextMenuStrip
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents txtAusschluss As System.Windows.Forms.TextBox
Friend WithEvents MyDataset As ToolCollection.MyDataset Friend WithEvents MyDataset As ToolCollection.MyDataset
Friend WithEvents TableAdapterManager As ToolCollection.MyDatasetTableAdapters.TableAdapterManager Friend WithEvents TableAdapterManager As ToolCollection.MyDatasetTableAdapters.TableAdapterManager
Friend WithEvents TBTC_DI_REGEX_MATCHBindingSource As BindingSource Friend WithEvents TBTC_DI_REGEX_MATCHBindingSource As BindingSource

View File

@ -14,7 +14,6 @@ Public Class frmDIHauptseite
Private Shared _Instance As frmDIHauptseite = Nothing Private Shared _Instance As frmDIHauptseite = Nothing
Private _running As Boolean = False Private _running As Boolean = False
Dim In_Use As Boolean Dim In_Use As Boolean
Private email As New ClassDI_Email
Public Shared _windream As ClassWindream_allgemein Public Shared _windream As ClassWindream_allgemein
Public Shared _Link2NavDokumentart, _Link2NavIndexwert As String Public Shared _Link2NavDokumentart, _Link2NavIndexwert As String
Private Shared _Logger As DigitalData.Modules.Logging.Logger Private Shared _Logger As DigitalData.Modules.Logging.Logger
@ -723,17 +722,15 @@ Public Class frmDIHauptseite
'DAS Windream-Laufwerk ist nicht verfügbar! 'DAS Windream-Laufwerk ist nicht verfügbar!
CriticalErrorInBackgroundWorker = True CriticalErrorInBackgroundWorker = True
Import_Abbrechen() Import_Abbrechen()
If My.Settings.vDIMailSenden = True Then EMAIL_DD.Send_EMail("ESKALATIONSTUFE 1: Schwerwiegender Fehler in Dateiimporter windream <br>ERROR: " & Err.Description & "<br> DAS WINDREAM-LAUFWERK oder der Netzwerkname IST NICHT VERFÜGBAR!<br>" &
email.Send_EMail("ESKALATIONSTUFE 1: Schwerwiegender Fehler in Dateiimporter windream <br>ERROR: " & Err.Description & "<br> DAS WINDREAM-LAUFWERK oder der Netzwerkname IST NICHT VERFÜGBAR!<br>" & "Der Importvorgang wurde abgebrochen!<br>Fehlerbehebung: ==> Starten Sie windream und den den Dateiimporter neu!", "DI_WMNOTACCESSIBLE")
"Der Importvorgang wurde abgebrochen!<br>Fehlerbehebung: ==> Starten Sie windream und den den Dateiimporter neu!")
End If
MsgBox("Schwerwiegender Fehler in Dateiimporter windream!" & vbNewLine & "ERROR: " & Err.Description & vbNewLine & "DAS WINDREAM-LAUFWERK IST NICHT VERFÜGBAR!" & vbNewLine & MsgBox("Schwerwiegender Fehler in Dateiimporter windream!" & vbNewLine & "ERROR: " & Err.Description & vbNewLine & "DAS WINDREAM-LAUFWERK IST NICHT VERFÜGBAR!" & vbNewLine &
"Der Importvorgang wurde abgebrochen!" & vbNewLine & "Fehlerbehebung: ==> Starten Sie windream und den den Dateiimporter neu!") "Der Importvorgang wurde abgebrochen!" & vbNewLine & "Fehlerbehebung: ==> Starten Sie windream und den den Dateiimporter neu!")
Exit Sub Exit Sub
Else Else
If My.Settings.vDIMailSenden = True Then EMAIL_DD.Send_EMail("Fehler bei Datei: " & oFilenameQuelle & " <br\>ERROR: " & Err.Description, "DI_WMFILEACCESS")
email.Send_EMail("Fehler bei Datei: " & oFilenameQuelle & " <br\>ERROR: " & Err.Description)
End If
End If End If
@ -2370,41 +2367,11 @@ Public Class frmDIHauptseite
Me.startBackgroundTask() Me.startBackgroundTask()
End Sub End Sub
Private Sub chkbEmail_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkbEmail.CheckedChanged
If chkbEmail.Checked Then
gbEmail.Enabled = True
Else
gbEmail.Enabled = False
End If
End Sub
Private Sub btntestmail_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btntestmail.Click
My.Settings.Save()
If Me.txtBetreff.Text = "" Or Me.txtEmpfaenger.Text = "" Or Me.txtMail_from.Text = "" Or Me.txtUser.Text = "" Or Me.txtPasswort.Text = "" Or
Me.txtSMTP.Text = "" Then
MsgBox("Bitte achten sie darauf alle Konfigurationsfelder für die Fehler-Email auszufüllen!", MsgBoxStyle.Critical, "Fehlende Eingaben:")
Else
email.Send_EMail("TEST-EMAIL", True) ' Gesendet am: " & My.Computer.Clock.LocalTime.ToShortDateString & "-" & My.Computer.Clock.LocalTime.ToLongTimeString
End If
End Sub
Private Sub frmDIHauptseite_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing Private Sub frmDIHauptseite_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
End Sub End Sub
Private Sub TextBoxen_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles _
_
txtUser.LostFocus, txtSMTP.LostFocus, txtPasswort.LostFocus,
txtMail_from.LostFocus, txtEmpfaenger.LostFocus, txtBody.LostFocus, txtBetreff.LostFocus
CType(sender, TextBox).BackColor = Color.White
My.Settings.Save()
End Sub
Private Sub TextBoxen_gotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles _
_
txtUser.GotFocus, txtSMTP.GotFocus, txtPasswort.GotFocus,
txtMail_from.GotFocus, txtEmpfaenger.GotFocus, txtBody.GotFocus, txtBetreff.GotFocus
CType(sender, TextBox).BackColor = Color.Lime
End Sub
Private Sub tcMain_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles tcMain.SelectedIndexChanged Private Sub tcMain_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles tcMain.SelectedIndexChanged
My.Settings.Save() My.Settings.Save()

View File

@ -49,27 +49,6 @@ Partial Class frmNIHauptseite
Me.Label4 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label()
Me.numIntervall = New System.Windows.Forms.NumericUpDown() Me.numIntervall = New System.Windows.Forms.NumericUpDown()
Me.TabPage2 = New System.Windows.Forms.TabPage() Me.TabPage2 = New System.Windows.Forms.TabPage()
Me.gbEmail = New System.Windows.Forms.GroupBox()
Me.txtPort = New System.Windows.Forms.TextBox()
Me.Label17 = New System.Windows.Forms.Label()
Me.Label16 = New System.Windows.Forms.Label()
Me.txtBody = New System.Windows.Forms.TextBox()
Me.btntestmail = New System.Windows.Forms.Button()
Me.txtEmpfaenger = New System.Windows.Forms.TextBox()
Me.Label13 = New System.Windows.Forms.Label()
Me.txtBetreff = New System.Windows.Forms.TextBox()
Me.Label12 = New System.Windows.Forms.Label()
Me.txtPasswort = New System.Windows.Forms.TextBox()
Me.Label11 = New System.Windows.Forms.Label()
Me.txtUser = New System.Windows.Forms.TextBox()
Me.Label10 = New System.Windows.Forms.Label()
Me.txtSMTP = New System.Windows.Forms.TextBox()
Me.Label14 = New System.Windows.Forms.Label()
Me.txtMail_from = New System.Windows.Forms.TextBox()
Me.Label15 = New System.Windows.Forms.Label()
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.chkbEmail = New System.Windows.Forms.CheckBox()
Me.timRun = New System.Windows.Forms.Timer(Me.components) Me.timRun = New System.Windows.Forms.Timer(Me.components)
Me.DS_More = New ToolCollection.DS_More() Me.DS_More = New ToolCollection.DS_More()
Me.VWMO_RE_DOKUMENTARTZUORDNUNGBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.VWMO_RE_DOKUMENTARTZUORDNUNGBindingSource = New System.Windows.Forms.BindingSource(Me.components)
@ -88,9 +67,6 @@ Partial Class frmNIHauptseite
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlInfos.SuspendLayout() Me.pnlInfos.SuspendLayout()
CType(Me.numIntervall, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.numIntervall, System.ComponentModel.ISupportInitialize).BeginInit()
Me.TabPage2.SuspendLayout()
Me.gbEmail.SuspendLayout()
Me.GroupBox3.SuspendLayout()
CType(Me.DS_More, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.DS_More, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.VWMO_RE_DOKUMENTARTZUORDNUNGBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.VWMO_RE_DOKUMENTARTZUORDNUNGBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TBMO_RE_HISTORYBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TBMO_RE_HISTORYBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
@ -358,8 +334,6 @@ Partial Class frmNIHauptseite
' '
'TabPage2 'TabPage2
' '
Me.TabPage2.Controls.Add(Me.gbEmail)
Me.TabPage2.Controls.Add(Me.GroupBox3)
Me.TabPage2.Location = New System.Drawing.Point(4, 22) Me.TabPage2.Location = New System.Drawing.Point(4, 22)
Me.TabPage2.Name = "TabPage2" Me.TabPage2.Name = "TabPage2"
Me.TabPage2.Padding = New System.Windows.Forms.Padding(3) Me.TabPage2.Padding = New System.Windows.Forms.Padding(3)
@ -368,224 +342,6 @@ Partial Class frmNIHauptseite
Me.TabPage2.Text = "Konfigurationen" Me.TabPage2.Text = "Konfigurationen"
Me.TabPage2.UseVisualStyleBackColor = True Me.TabPage2.UseVisualStyleBackColor = True
' '
'gbEmail
'
Me.gbEmail.Controls.Add(Me.txtPort)
Me.gbEmail.Controls.Add(Me.Label17)
Me.gbEmail.Controls.Add(Me.Label16)
Me.gbEmail.Controls.Add(Me.txtBody)
Me.gbEmail.Controls.Add(Me.btntestmail)
Me.gbEmail.Controls.Add(Me.txtEmpfaenger)
Me.gbEmail.Controls.Add(Me.Label13)
Me.gbEmail.Controls.Add(Me.txtBetreff)
Me.gbEmail.Controls.Add(Me.Label12)
Me.gbEmail.Controls.Add(Me.txtPasswort)
Me.gbEmail.Controls.Add(Me.Label11)
Me.gbEmail.Controls.Add(Me.txtUser)
Me.gbEmail.Controls.Add(Me.Label10)
Me.gbEmail.Controls.Add(Me.txtSMTP)
Me.gbEmail.Controls.Add(Me.Label14)
Me.gbEmail.Controls.Add(Me.txtMail_from)
Me.gbEmail.Controls.Add(Me.Label15)
Me.gbEmail.Dock = System.Windows.Forms.DockStyle.Fill
Me.gbEmail.Enabled = False
Me.gbEmail.Location = New System.Drawing.Point(3, 44)
Me.gbEmail.Name = "gbEmail"
Me.gbEmail.Size = New System.Drawing.Size(760, 474)
Me.gbEmail.TabIndex = 2
Me.gbEmail.TabStop = False
Me.gbEmail.Text = "E-Mail Konfiguration"
'
'txtPort
'
Me.txtPort.Location = New System.Drawing.Point(367, 34)
Me.txtPort.Name = "txtPort"
Me.txtPort.Size = New System.Drawing.Size(100, 22)
Me.txtPort.TabIndex = 16
'
'Label17
'
Me.Label17.AutoSize = True
Me.Label17.Location = New System.Drawing.Point(364, 18)
Me.Label17.Name = "Label17"
Me.Label17.Size = New System.Drawing.Size(31, 13)
Me.Label17.TabIndex = 15
Me.Label17.Text = "Port:"
'
'Label16
'
Me.Label16.AutoSize = True
Me.Label16.Location = New System.Drawing.Point(6, 236)
Me.Label16.Name = "Label16"
Me.Label16.Size = New System.Drawing.Size(504, 13)
Me.Label16.TabIndex = 14
Me.Label16.Text = "Standard Einleitungstext: (HTML fähig: <br> = Zeilenwechsel;<b>= Fett Formatiert;" &
"</b>= Ende)"
'
'txtBody
'
Me.txtBody.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ToolCollection.My.MySettings.Default, "vNIMailBody", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtBody.Location = New System.Drawing.Point(9, 252)
Me.txtBody.Multiline = True
Me.txtBody.Name = "txtBody"
Me.txtBody.Size = New System.Drawing.Size(699, 64)
Me.txtBody.TabIndex = 13
Me.txtBody.Text = Global.ToolCollection.My.MySettings.Default.vNIMailBody
'
'btntestmail
'
Me.btntestmail.Image = Global.ToolCollection.My.Resources.Resources.mail_write
Me.btntestmail.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btntestmail.Location = New System.Drawing.Point(9, 322)
Me.btntestmail.Name = "btntestmail"
Me.btntestmail.Size = New System.Drawing.Size(99, 34)
Me.btntestmail.TabIndex = 12
Me.btntestmail.Text = "Test-Mail"
Me.btntestmail.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btntestmail.UseVisualStyleBackColor = True
'
'txtEmpfaenger
'
Me.txtEmpfaenger.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ToolCollection.My.MySettings.Default, "vNIEmailEmpf", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtEmpfaenger.Location = New System.Drawing.Point(9, 211)
Me.txtEmpfaenger.Name = "txtEmpfaenger"
Me.txtEmpfaenger.Size = New System.Drawing.Size(699, 22)
Me.txtEmpfaenger.TabIndex = 11
Me.txtEmpfaenger.Text = Global.ToolCollection.My.MySettings.Default.vNIEmailEmpf
'
'Label13
'
Me.Label13.AutoSize = True
Me.Label13.Location = New System.Drawing.Point(6, 195)
Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(298, 13)
Me.Label13.TabIndex = 10
Me.Label13.Text = "Empfänger: (Mehrere Empfänger bitte durch "";"" trennen )"
'
'txtBetreff
'
Me.txtBetreff.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ToolCollection.My.MySettings.Default, "vNIMailBetreff", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtBetreff.Location = New System.Drawing.Point(9, 166)
Me.txtBetreff.Name = "txtBetreff"
Me.txtBetreff.Size = New System.Drawing.Size(344, 22)
Me.txtBetreff.TabIndex = 9
Me.txtBetreff.Text = Global.ToolCollection.My.MySettings.Default.vNIMailBetreff
'
'Label12
'
Me.Label12.AutoSize = True
Me.Label12.Location = New System.Drawing.Point(6, 150)
Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(237, 13)
Me.Label12.TabIndex = 8
Me.Label12.Text = "Betreff: (Text für den Betreff der Fehler-Email)"
'
'txtPasswort
'
Me.txtPasswort.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ToolCollection.My.MySettings.Default, "vMailPW", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtPasswort.Location = New System.Drawing.Point(364, 120)
Me.txtPasswort.Name = "txtPasswort"
Me.txtPasswort.Size = New System.Drawing.Size(219, 22)
Me.txtPasswort.TabIndex = 7
Me.txtPasswort.Text = Global.ToolCollection.My.MySettings.Default.vMailPW
Me.txtPasswort.UseSystemPasswordChar = True
'
'Label11
'
Me.Label11.AutoSize = True
Me.Label11.Location = New System.Drawing.Point(361, 104)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(86, 13)
Me.Label11.TabIndex = 6
Me.Label11.Text = "User-Passwort: "
'
'txtUser
'
Me.txtUser.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ToolCollection.My.MySettings.Default, "vMailUser", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtUser.Location = New System.Drawing.Point(364, 78)
Me.txtUser.Name = "txtUser"
Me.txtUser.Size = New System.Drawing.Size(344, 22)
Me.txtUser.TabIndex = 5
Me.txtUser.Text = Global.ToolCollection.My.MySettings.Default.vMailUser
'
'Label10
'
Me.Label10.AutoSize = True
Me.Label10.Location = New System.Drawing.Point(361, 62)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(133, 13)
Me.Label10.TabIndex = 4
Me.Label10.Text = "User: (Authentifizierung)"
'
'txtSMTP
'
Me.txtSMTP.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ToolCollection.My.MySettings.Default, "vSMTP", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtSMTP.Location = New System.Drawing.Point(9, 78)
Me.txtSMTP.Name = "txtSMTP"
Me.txtSMTP.Size = New System.Drawing.Size(344, 22)
Me.txtSMTP.TabIndex = 3
Me.txtSMTP.Text = Global.ToolCollection.My.MySettings.Default.vSMTP
'
'Label14
'
Me.Label14.AutoSize = True
Me.Label14.Location = New System.Drawing.Point(6, 62)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(139, 13)
Me.Label14.TabIndex = 2
Me.Label14.Text = "SMTP-Server: (Mail-Server)"
'
'txtMail_from
'
Me.txtMail_from.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ToolCollection.My.MySettings.Default, "vNIMailfrom", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtMail_from.Location = New System.Drawing.Point(9, 34)
Me.txtMail_from.Name = "txtMail_from"
Me.txtMail_from.Size = New System.Drawing.Size(344, 22)
Me.txtMail_from.TabIndex = 1
Me.txtMail_from.Text = Global.ToolCollection.My.MySettings.Default.vNIMailfrom
'
'Label15
'
Me.Label15.AutoSize = True
Me.Label15.Location = New System.Drawing.Point(6, 18)
Me.Label15.Name = "Label15"
Me.Label15.Size = New System.Drawing.Size(139, 13)
Me.Label15.TabIndex = 0
Me.Label15.Text = "Absender: (Email-Adresse)"
'
'GroupBox3
'
Me.GroupBox3.Controls.Add(Me.Button1)
Me.GroupBox3.Controls.Add(Me.chkbEmail)
Me.GroupBox3.Dock = System.Windows.Forms.DockStyle.Top
Me.GroupBox3.Location = New System.Drawing.Point(3, 3)
Me.GroupBox3.Name = "GroupBox3"
Me.GroupBox3.Size = New System.Drawing.Size(760, 41)
Me.GroupBox3.TabIndex = 1
Me.GroupBox3.TabStop = False
Me.GroupBox3.Text = "Allgemeine Einstellungen:"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(535, 12)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(75, 23)
Me.Button1.TabIndex = 1
Me.Button1.Text = "Button1"
Me.Button1.UseVisualStyleBackColor = True
'
'chkbEmail
'
Me.chkbEmail.AutoSize = True
Me.chkbEmail.Checked = Global.ToolCollection.My.MySettings.Default.vNIMailsenden
Me.chkbEmail.DataBindings.Add(New System.Windows.Forms.Binding("Checked", Global.ToolCollection.My.MySettings.Default, "vNIMailsenden", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.chkbEmail.Location = New System.Drawing.Point(6, 20)
Me.chkbEmail.Name = "chkbEmail"
Me.chkbEmail.Size = New System.Drawing.Size(146, 17)
Me.chkbEmail.TabIndex = 0
Me.chkbEmail.Text = "Fehler E-Mail aktivieren"
Me.chkbEmail.UseVisualStyleBackColor = True
'
'timRun 'timRun
' '
Me.timRun.Interval = 60 Me.timRun.Interval = 60
@ -670,11 +426,6 @@ Partial Class frmNIHauptseite
Me.pnlInfos.ResumeLayout(False) Me.pnlInfos.ResumeLayout(False)
Me.pnlInfos.PerformLayout() Me.pnlInfos.PerformLayout()
CType(Me.numIntervall, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.numIntervall, System.ComponentModel.ISupportInitialize).EndInit()
Me.TabPage2.ResumeLayout(False)
Me.gbEmail.ResumeLayout(False)
Me.gbEmail.PerformLayout()
Me.GroupBox3.ResumeLayout(False)
Me.GroupBox3.PerformLayout()
CType(Me.DS_More, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.DS_More, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.VWMO_RE_DOKUMENTARTZUORDNUNGBindingSource, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.VWMO_RE_DOKUMENTARTZUORDNUNGBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.TBMO_RE_HISTORYBindingSource, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TBMO_RE_HISTORYBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
@ -703,24 +454,6 @@ Partial Class frmNIHauptseite
Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents numIntervall As System.Windows.Forms.NumericUpDown Friend WithEvents numIntervall As System.Windows.Forms.NumericUpDown
Friend WithEvents TabPage2 As System.Windows.Forms.TabPage Friend WithEvents TabPage2 As System.Windows.Forms.TabPage
Friend WithEvents gbEmail As System.Windows.Forms.GroupBox
Friend WithEvents Label16 As System.Windows.Forms.Label
Friend WithEvents txtBody As System.Windows.Forms.TextBox
Friend WithEvents btntestmail As System.Windows.Forms.Button
Friend WithEvents txtEmpfaenger As System.Windows.Forms.TextBox
Friend WithEvents Label13 As System.Windows.Forms.Label
Friend WithEvents txtBetreff As System.Windows.Forms.TextBox
Friend WithEvents Label12 As System.Windows.Forms.Label
Friend WithEvents txtPasswort As System.Windows.Forms.TextBox
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents txtUser As System.Windows.Forms.TextBox
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents txtSMTP As System.Windows.Forms.TextBox
Friend WithEvents Label14 As System.Windows.Forms.Label
Friend WithEvents txtMail_from As System.Windows.Forms.TextBox
Friend WithEvents Label15 As System.Windows.Forms.Label
Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
Friend WithEvents chkbEmail As System.Windows.Forms.CheckBox
Friend WithEvents timRun As System.Windows.Forms.Timer Friend WithEvents timRun As System.Windows.Forms.Timer
Friend WithEvents MyDataset As ToolCollection.MyDataset Friend WithEvents MyDataset As ToolCollection.MyDataset
Friend WithEvents lblDatei As System.Windows.Forms.Label Friend WithEvents lblDatei As System.Windows.Forms.Label
@ -732,9 +465,6 @@ Partial Class frmNIHauptseite
Friend WithEvents TableAdapterManager As ToolCollection.DS_MoreTableAdapters.TableAdapterManager Friend WithEvents TableAdapterManager As ToolCollection.DS_MoreTableAdapters.TableAdapterManager
Friend WithEvents TBMO_RE_HISTORYBindingSource As System.Windows.Forms.BindingSource Friend WithEvents TBMO_RE_HISTORYBindingSource As System.Windows.Forms.BindingSource
Friend WithEvents TBMO_RE_HISTORYTableAdapter As ToolCollection.DS_MoreTableAdapters.TBMO_RE_HISTORYTableAdapter Friend WithEvents TBMO_RE_HISTORYTableAdapter As ToolCollection.DS_MoreTableAdapters.TBMO_RE_HISTORYTableAdapter
Friend WithEvents txtPort As System.Windows.Forms.TextBox
Friend WithEvents Label17 As System.Windows.Forms.Label
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip
Friend WithEvents tslblStatus As System.Windows.Forms.ToolStripStatusLabel Friend WithEvents tslblStatus As System.Windows.Forms.ToolStripStatusLabel
Friend WithEvents TimerRefresh As System.Windows.Forms.Timer Friend WithEvents TimerRefresh As System.Windows.Forms.Timer

View File

@ -18,7 +18,6 @@ Public Class frmNIHauptseite
Private bwDatei As New BackgroundWorker Private bwDatei As New BackgroundWorker
Private bwsearch As New BackgroundWorker Private bwsearch As New BackgroundWorker
Private email As New ClassNIEmail
Private database As ClassNIDatenbankzugriff Private database As ClassNIDatenbankzugriff
Private xml As New ClassxmlZugriff Private xml As New ClassxmlZugriff
@ -64,9 +63,11 @@ Public Class frmNIHauptseite
' 3a. Windream instanziieren ' 3a. Windream instanziieren
_windreamNI = New ClassNIWindream(_MyLogger) _windreamNI = New ClassNIWindream(_MyLogger)
database = New ClassNIDatenbankzugriff(_MyLogger) database = New ClassNIDatenbankzugriff(_MyLogger)
' 3b. Windream initialisieren (Connection, Session, ... aufbauen) ' 3b. Windream initialisieren (Connection, Session, ... aufbauen)
If _windreamNI.Init() = False Then If _windreamNI.Init() = False Then
email.Send_EMail("Die Windream-Klasse konnte nicht initialisiert werden. Windream-Client unvollständig gestartert.") EMAIL_DD.Send_EMail("Die Windream-Klasse konnte nicht initialisiert werden. Windream-Client unvollständig gestartert.", "windreamNI.Init()")
End If End If
'ClassMoveRenameLogger.Init("", "MoveRename_", True) 'ClassMoveRenameLogger.Init("", "MoveRename_", True)
@ -338,9 +339,9 @@ Public Class frmNIHauptseite
If clsHelper.file_exists(Me.aktivesProfil.WindreamSuche, "NI") = False AndAlso Me.aktivesProfil.WindreamSuche.ToLower.Contains("select") = False Then If clsHelper.file_exists(Me.aktivesProfil.WindreamSuche, "NI") = False AndAlso Me.aktivesProfil.WindreamSuche.ToLower.Contains("select") = False Then
_Logger.Warn("Windream Suche für Profil: " & profil.Profilname & " konnte nicht ausgeführt werden! Die Datei " & Me.aktivesProfil.WindreamSuche & " existiert nicht!") _Logger.Warn("Windream Suche für Profil: " & profil.Profilname & " konnte nicht ausgeführt werden! Die Datei " & Me.aktivesProfil.WindreamSuche & " existiert nicht!")
' wenn die gesuchte File eine Suche ist: per MAil informierne und Indexierung abbrechen ' wenn die gesuchte File eine Suche ist: per MAil informierne und Indexierung abbrechen
If My.Settings.vNIMailsenden = True Then If My.Settings.vMailsenden = True Then
email.Send_EMail("Fehler bei Nachindexierung: <br> >> Profil: " & Me.aktivesProfil.Profilname & "<br> >> die windream-Suche : " & Me.aktivesProfil.WindreamSuche & " konnte nicht gefunden werden!" & EMAIL_DD.Send_EMail("Fehler bei Nachindexierung: <br> >> Profil: " & Me.aktivesProfil.Profilname & "<br> >> Die windream-Suche : " & Me.aktivesProfil.WindreamSuche & " konnte nicht gefunden werden!" &
"<br> >> Mögliche Fehlerursache: Das W-Laufwerk ist nicht verfügbar!") "<br> >> Mögliche Fehlerursache: Das W-Laufwerk ist nicht verfügbar!", "WMissing")
End If End If
Abbruch_NI("Windream-Suche konnte nicht gefunden werden!", True, False) Abbruch_NI("Windream-Suche konnte nicht gefunden werden!", True, False)
clsHelper.Add_Application_log("Nachindexierung wurde abgebrochen, da eine Windream-Suche (" & Me.aktivesProfil.WindreamSuche & ") nicht gefunden werden konnte") clsHelper.Add_Application_log("Nachindexierung wurde abgebrochen, da eine Windream-Suche (" & Me.aktivesProfil.WindreamSuche & ") nicht gefunden werden konnte")
@ -472,7 +473,7 @@ Public Class frmNIHauptseite
Else Else
Try Try
Dim oDTResults As DataTable Dim oDTResults As DataTable
oDTResults = database.Return_Datatable(aktivesProfil.WindreamSuche) oDTResults = DB_ECM.GetDatatable(aktivesProfil.WindreamSuche)
If Not IsNothing(oDTResults) Then If Not IsNothing(oDTResults) Then
If oDTResults.Rows.Count > 0 Then If oDTResults.Rows.Count > 0 Then
@ -547,6 +548,8 @@ Public Class frmNIHauptseite
End If End If
Else Else
_Logger.Warn($"ATTENTION: The datatable for WMResults is nothing") _Logger.Warn($"ATTENTION: The datatable for WMResults is nothing")
_Logger.Warn($"SQL WMResults: {aktivesProfil.WindreamSuche}")
End If End If
Catch ex As Exception Catch ex As Exception
_Logger.Warn($"UNEXPECTED ERROR IN GetSearchDocuments via SQL: {ex.Message}") _Logger.Warn($"UNEXPECTED ERROR IN GetSearchDocuments via SQL: {ex.Message}")
@ -569,12 +572,12 @@ Public Class frmNIHauptseite
Else Else
_Logger.Debug("Keine windream-Dokumente für Profil: " & profil.Profilname & " gefunden!") _Logger.Debug("Keine windream-Dokumente für Profil: " & profil.Profilname & " gefunden!")
' keine Dateien zum Indexieren ' keine Dateien zum Indexieren
bwProfil.ReportProgress(-4) bwProfil.ReportProgress(-4)
End If
Else
_Logger.Warn($"windreamSucheErgebnisse Is Nothing!! - Please check Search of {profil.Profilname}")
End If End If
Else
_Logger.Warn($"windreamSucheErgebnisse Is Nothing!! - Please check Search of {profil.Profilname}")
End If
Else Else
_Logger.Warn("_Fehler = True - Check the config of Nachindexierung") _Logger.Warn("_Fehler = True - Check the config of Nachindexierung")
bwProfil.ReportProgress(-4) bwProfil.ReportProgress(-4)
@ -690,7 +693,7 @@ Public Class frmNIHauptseite
IsWorking_Hour = True IsWorking_Hour = True
End If End If
If _windreamNI.Init() = False Then If _windreamNI.Init() = False Then
email.Send_EMail("Die Windream-Klasse konnte nicht initialisiert werden. Windream-Client unvollständig gestartert.") EMAIL_DD.Send_EMail("Die Windream-Klasse konnte nicht initialisiert werden. Windream-Client unvollständig gestartert.", "_windreamNI.Init(693)")
clsHelper.Add_Application_log("Die Windream-Klasse konnte nicht initialisiert werden. Windream-Client unvollständig gestartert?") clsHelper.Add_Application_log("Die Windream-Klasse konnte nicht initialisiert werden. Windream-Client unvollständig gestartert?")
Exit Sub Exit Sub
@ -795,8 +798,8 @@ Public Class frmNIHauptseite
Catch ex As Exception Catch ex As Exception
errormsg = " FEHLER bei Check_Desk_Index (GetVariableValue für Index '" & aktivesProfil.Desk_windreamIndex & "'): " & ex.Message errormsg = " FEHLER bei Check_Desk_Index (GetVariableValue für Index '" & aktivesProfil.Desk_windreamIndex & "'): " & ex.Message
_Logger.Warn(errormsg) _Logger.Warn(errormsg)
If My.Settings.vNIMailsenden = True Then If My.Settings.vMailsenden = True Then
email.Send_EMail("Beim Indexieren der Datei " & dokument.aName.ToString & " ist ein Fehler aufgetreten Check_Desk_Index (GetVariableValue): " & ex.Message) EMAIL_DD.Send_EMail("Beim Indexieren der Datei " & dokument.aName.ToString & " ist ein Fehler aufgetreten Check_Desk_Index (GetVariableValue): " & ex.Message, "Check_Desk_Index")
End If End If
' wenn ein Fehler aufgetreten ist, muss das Flag gesetzt werden ' wenn ein Fehler aufgetreten ist, muss das Flag gesetzt werden
Return True Return True
@ -1038,8 +1041,8 @@ Public Class frmNIHauptseite
result &= vbNewLine & " - Schwerwiegender Fehler bei Auslesen des einschränkenden Wertes aus Index':" & idxName_ohneSonderzeichen & "'" result &= vbNewLine & " - Schwerwiegender Fehler bei Auslesen des einschränkenden Wertes aus Index':" & idxName_ohneSonderzeichen & "'"
oUnexpectedError = True oUnexpectedError = True
fehlermsg &= vbNewLine & "Schwerwiegender Fehler bei Auslesen des einschränkenden Wertes aus Index':" & idxName_ohneSonderzeichen & "' - Fehler: " & ex.Message fehlermsg &= vbNewLine & "Schwerwiegender Fehler bei Auslesen des einschränkenden Wertes aus Index':" & idxName_ohneSonderzeichen & "' - Fehler: " & ex.Message
If My.Settings.vNIMailsenden = True Then If My.Settings.vMailsenden = True Then
email.Send_EMail("Beim Indexieren der Datei " & dokument.aName.ToString & " ist ein Fehler aufgetreten (GetVariableValue bei Auslesen des einschränkenden Wertes): " & ex.Message) EMAIL_DD.Send_EMail(fehlermsg, "GettingWMIndexInfo")
End If End If
End Try End Try
@ -1466,9 +1469,6 @@ Public Class frmNIHauptseite
oVBScriptCommand = oVBScriptCommand.Replace(element.Value, IndexwertAusWindream.ToString) oVBScriptCommand = oVBScriptCommand.Replace(element.Value, IndexwertAusWindream.ToString)
End If End If
'database.ExecuteonOracleDb(Sqlcommand, aktivesProfil.DataSource, aktivesProfil.UserId, aktivesProfil.Password)
'MsgBox(Me.aktivesDokument.aPath & vbNewLine & vbNewLine & Me.aktivesDokument.aName)
Next Next
_Logger.Debug("VBSCRIPTCOMMAND after replacing variables [" & oVBScriptCommand & "]") _Logger.Debug("VBSCRIPTCOMMAND after replacing variables [" & oVBScriptCommand & "]")
@ -1563,7 +1563,7 @@ Public Class frmNIHauptseite
Else Else
_Logger.Warn($"VBSCRIPT not File.exists: {oVBScriptFile}") _Logger.Warn($"VBSCRIPT not File.exists: {oVBScriptFile}")
End If End If
@ -1640,7 +1640,6 @@ Public Class frmNIHauptseite
'Wenn Speicherort gespeichert werden soll wird Platzhalter ersetzt! 'Wenn Speicherort gespeichert werden soll wird Platzhalter ersetzt!
Sqlcommand = Sqlcommand.Replace("vSpeicherort", "'" & My.Settings.vWLaufwerk & ":" & Me.aktivesDokument.aPath & "'") Sqlcommand = Sqlcommand.Replace("vSpeicherort", "'" & My.Settings.vWLaufwerk & ":" & Me.aktivesDokument.aPath & "'")
_Logger.Debug("SQL-Command: " & Sqlcommand) _Logger.Debug("SQL-Command: " & Sqlcommand)
'database.ExecuteonOracleDb(Sqlcommand, aktivesProfil.DataSource, aktivesProfil.UserId, aktivesProfil.Password)
'MsgBox(Me.aktivesDokument.aPath & vbNewLine & vbNewLine & Me.aktivesDokument.aName) 'MsgBox(Me.aktivesDokument.aPath & vbNewLine & vbNewLine & Me.aktivesDokument.aName)
Next Next
If Me.aktivesProfil.DbArt = "Oracle" Then If Me.aktivesProfil.DbArt = "Oracle" Then
@ -1756,8 +1755,8 @@ Public Class frmNIHauptseite
If unvollstaendig = False And Me.aktivesProfil.Ni_Art.ToLower <> "fulltext" Then If unvollstaendig = False And Me.aktivesProfil.Ni_Art.ToLower <> "fulltext" Then
_Logger.Warn("Fehler bei IndexiereVerarbeiteDokument für die Datei: " & dokument.aName.ToString) _Logger.Warn("Fehler bei IndexiereVerarbeiteDokument für die Datei: " & dokument.aName.ToString)
_Logger.Warn("Fehlermeldung: " & fehlermsg) _Logger.Warn("Fehlermeldung: " & fehlermsg)
If My.Settings.vNIMailsenden = True Then If My.Settings.vMailsenden = True Then
email.Send_EMail("Fehler in IndexiereVerarbeiteDokument für die Datei: " & dokument.aName.ToString & "<br> Profilname: " & aktivesProfil.Profilname & " <br> Fehlermeldung: " & fehlermsg) EMAIL_DD.Send_EMail("Fehler in IndexiereVerarbeiteDokument für die Datei: " & dokument.aName.ToString & "<br> Profilname: " & aktivesProfil.Profilname & " <br> Fehlermeldung: " & fehlermsg, "IndexiereVerarbeiteDokument1760")
End If End If
End If End If
End If End If
@ -1833,9 +1832,8 @@ Public Class frmNIHauptseite
End If End If
Dim err As Boolean = CrFolderForIndex(docpath) Dim err As Boolean = CrFolderForIndex(docpath)
If err = True Then If err = True Then
If My.Settings.vNIMailsenden = True Then EMAIL_DD.Send_EMail("Fehler bei Create Folder for Index bei der Datei: '" & dokument.aName.ToString & "'<br> Fehler: Die Datei wurde indexiert aber der Ordner konnte nicht erstellt werden!", "CrFolderForIndex")
email.Send_EMail("Fehler bei Create Folder for Index bei der Datei: '" & dokument.aName.ToString & "'<br> Fehler: Die Datei wurde indexiert aber der Ordner konnte nicht erstellt werden!")
End If
End If End If
Else Else
aktivesProfil.CrFolder_Created_Folder = "" aktivesProfil.CrFolder_Created_Folder = ""
@ -1872,9 +1870,7 @@ Public Class frmNIHauptseite
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
_Logger.Warn($"oResultNachindexierung so far: {oResultNachindexierung.ToString}") _Logger.Warn($"oResultNachindexierung so far: {oResultNachindexierung.ToString}")
If My.Settings.vNIMailsenden = True Then EMAIL_DD.Send_EMail("Schwerwiegender Fehler bei IndexiereVerarbeiteDokument - <br> Profil: " & aktivesProfil.Profilname & "<br> Datei: " & dokument.aName.ToString & "<br> Fehler: " & ex.Message, "IndexiereVerarbeiteDokument1874")
email.Send_EMail("Schwerwiegender Fehler bei IndexiereVerarbeiteDokument - <br> Profil: " & aktivesProfil.Profilname & "<br> Datei: " & dokument.aName.ToString & "<br> Fehler: " & ex.Message)
End If
End Try End Try
End Sub End Sub
Private Function FolderForIndex(oDynamicFolder As String, myWMDocument As WMObject) As String Private Function FolderForIndex(oDynamicFolder As String, myWMDocument As WMObject) As String
@ -2344,20 +2340,20 @@ Public Class frmNIHauptseite
pos_von = _posArray(0) pos_von = _posArray(0)
Catch ex As Exception Catch ex As Exception
pos_von = 0 pos_von = 0
End Try End Try
Try Try
pos_bis = _posArray(1) pos_bis = _posArray(1)
Catch ex As Exception Catch ex As Exception
pos_bis = 0 pos_bis = 0
End Try End Try
Try Try
ign_whitespace = CBool(_posArray(2)) ign_whitespace = CBool(_posArray(2))
Catch ex As Exception Catch ex As Exception
ign_whitespace = False ign_whitespace = False
End Try End Try
_Logger.Debug("Volltext-Indexierung - Regex: '" & Fulltext_Indexierung.Spalte & "' - Alle Vorkommen") _Logger.Debug("Volltext-Indexierung - Regex: '" & Fulltext_Indexierung.Spalte & "' - Alle Vorkommen")
Else Else
pos_von = 10000 pos_von = 10000
pos_bis = 0 pos_bis = 0
_Logger.Debug("Volltext-Indexierung - Regex: '" & Fulltext_Indexierung.Spalte & "' - Pos.-Von: '" & pos_von & "' - Pos.-Bis: '" & pos_bis) _Logger.Debug("Volltext-Indexierung - Regex: '" & Fulltext_Indexierung.Spalte & "' - Pos.-Von: '" & pos_von & "' - Pos.-Bis: '" & pos_bis)
End If End If
@ -2553,9 +2549,8 @@ Public Class frmNIHauptseite
_Logger.Error(ex) _Logger.Error(ex)
End If End If
If My.Settings.vNIMailsenden = True Then EMAIL_DD.Send_EMail("Schwerwiegender Fehler bei SetErrorMeldung - <br> Profil: " & aktivesProfil.Profilname & "<br> Datei: " & dokument.aName.ToString & "<br> Fehler: " & ex.Message, "SetErrorMeldung")
email.Send_EMail("Schwerwiegender Fehler bei SetErrorMeldung - <br> Profil: " & aktivesProfil.Profilname & "<br> Datei: " & dokument.aName.ToString & "<br> Fehler: " & ex.Message)
End If
End Try End Try
End Sub End Sub
Private Function IsNotEmpty(ByVal aValue As Object) Private Function IsNotEmpty(ByVal aValue As Object)
@ -2678,40 +2673,16 @@ Public Class frmNIHauptseite
End Try End Try
End Function End Function
Private Sub chkbEmail_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkbEmail.CheckedChanged
Try
If chkbEmail.Checked = True Then
Me.gbEmail.Enabled = True
Else
Me.gbEmail.Enabled = False
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei chkbEmail_CheckedChanged:")
End Try
End Sub
Private Sub btntestmail_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btntestmail.Click
Try
My.Settings.Save()
If Me.txtBetreff.Text = "" Or Me.txtEmpfaenger.Text = "" Or Me.txtMail_from.Text = "" Or Me.txtUser.Text = "" Or Me.txtPasswort.Text = "" Or
Me.txtSMTP.Text = "" Then
MsgBox("Bitte achten sie darauf alle Konfigurationsfelder für die Fehler-Email auszufüllen!", MsgBoxStyle.Critical, "Fehlende Eingaben:")
Else
email.Send_EMail("TEST-EMAIL", True) ' Gesendet am: " & My.Computer.Clock.LocalTime.ToShortDateString & "-" & My.Computer.Clock.LocalTime.ToLongTimeString
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei btntestmail.Click:")
End Try
End Sub
Private Sub tcMain_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles tcmain.SelectedIndexChanged Private Sub tcMain_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles tcmain.SelectedIndexChanged
Select Case tcmain.SelectedIndex Select Case tcmain.SelectedIndex
Case 0 Case 0
My.Settings.vemailPort = Me.txtPort.Text
My.Settings.Save() My.Settings.Save()
Case 1 Case 1
Me.txtPort.Text = My.Settings.vemailPort
End Select End Select
End Sub End Sub
Sub Start_NachindexierungThreads() Sub Start_NachindexierungThreads()
@ -2865,20 +2836,6 @@ Public Class frmNIHauptseite
manuallyRun = False manuallyRun = False
End Sub End Sub
Private Sub TextBoxen_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles _
_
txtUser.LostFocus, txtSMTP.LostFocus, txtPasswort.LostFocus,
txtMail_from.LostFocus, txtEmpfaenger.LostFocus, txtBody.LostFocus, txtBetreff.LostFocus
CType(sender, TextBox).BackColor = Color.White
My.Settings.Save()
End Sub
Private Sub TextBoxen_gotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles _
_
txtUser.GotFocus, txtSMTP.GotFocus, txtPasswort.GotFocus,
txtMail_from.GotFocus, txtEmpfaenger.GotFocus, txtBody.GotFocus, txtBetreff.GotFocus
CType(sender, TextBox).BackColor = Color.Lime
End Sub
'Private Function MRGetValuesFromFile(ByVal vDatei As String, ByVal vIndexnameDA As String, ByVal vIndexnameKD As String, ByVal vindexnameDesIndex As String) 'Private Function MRGetValuesFromFile(ByVal vDatei As String, ByVal vIndexnameDA As String, ByVal vIndexnameKD As String, ByVal vindexnameDesIndex As String)
' Try ' Try
' _MRKundenKennzeichen = "" ' _MRKundenKennzeichen = ""

View File

@ -3,6 +3,7 @@ Imports System.Reflection
Imports System.Globalization Imports System.Globalization
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports System.IO Imports System.IO
Imports DigitalData.Modules.Database
Public Class frmStart Public Class frmStart
Private _MyLogger As LogConfig Private _MyLogger As LogConfig
@ -44,29 +45,61 @@ Public Class frmStart
End If End If
End Sub End Sub
Private Sub FMStart_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Private Sub FMStart_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
_MyLogger = New LogConfig(LogConfig.PathType.CustomPath, Path.Combine(My.Application.Info.DirectoryPath, "Log"), Nothing, My.Application.Info.CompanyName, Try
My.Application.Info.ProductName) _MyLogger = New LogConfig(LogConfig.PathType.CustomPath, Path.Combine(My.Application.Info.DirectoryPath, "Log"), Nothing, My.Application.Info.CompanyName,
_Logger = _MyLogger.GetLogger() My.Application.Info.ProductName)
_Logger = _MyLogger.GetLogger()
CURR_Logger = _Logger CURR_Logger = _Logger
CURR_LogConfig = _MyLogger CURR_LogConfig = _MyLogger
Delete_LogFiles() Delete_LogFiles()
'Aktueller Benutzer 'Aktueller Benutzer
Me.tslblVersion.Text = Environment.UserName.ToString Me.tslblVersion.Text = Environment.UserName.ToString
Me.Text = Application.CompanyName & "-" & Application.ProductName Me.Text = Application.CompanyName & "-" & Application.ProductName
Me.tslblVersion.Text = "Version: " & My.Application.Info.Version.ToString Me.tslblVersion.Text = "Version: " & My.Application.Info.Version.ToString
'Aktuelle Machine 'Aktuelle Machine
Me.Status_Machine.Text = My.Computer.Name Me.Status_Machine.Text = My.Computer.Name
' timUhrzeit.Start() ' timUhrzeit.Start()
TimerErrorLog.Start() TimerErrorLog.Start()
If Not My.Settings.licensekey = "" Then If Not My.Settings.licensekey = "" Then
' Lizenz-Manager initialisieren ' Lizenz-Manager initialisieren
Me.licenseManager = New ClassLicenseManager("#DigitalData9731258!#", My.Settings.licensekey) Me.licenseManager = New ClassLicenseManager("#DigitalData9731258!#", My.Settings.licensekey)
' alle vorhandenen Module laden
Me.LoadAllModules()
End If
EMAIL_DD = New ClassEmail(_MyLogger)
Catch ex As Exception
_Logger.Error(ex)
End Try
Try
If My.Settings.DDECMConString <> String.Empty Then
Dim oSPLIT As String()
oSPLIT = My.Settings.DDECMConString.Split(";")
Dim oServer As String
Dim oDB As String
Dim oUSer As String
Dim oPW As String
For Each oSplitPart As String In oSPLIT
If oSplitPart.Contains("Data Source") Then
oServer = oSplitPart.Replace("Data Source=", "")
ElseIf oSplitPart.Contains("Initial Catalog") Then
oDB = oSplitPart.Replace("Initial Catalog=", "")
ElseIf oSplitPart.Contains("User ID") Then
oUSer = oSplitPart.Replace("User ID=", "")
ElseIf oSplitPart.Contains("Password") Then
oPW = oSplitPart.Replace("Password=", "")
End If
Next
DB_ECM = New MSSQLServer(_MyLogger, oServer, oDB, oUSer, oPW)
End If
Catch ex As Exception
_Logger.Error(ex)
End Try
' alle vorhandenen Module laden
Me.LoadAllModules()
End If
End Sub End Sub
Private Sub BeendenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BeendenToolStripMenuItem.Click Private Sub BeendenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BeendenToolStripMenuItem.Click
@ -375,7 +408,7 @@ Public Class frmStart
Private Sub CriticalEmailTestToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CriticalEmailTestToolStripMenuItem.Click Private Sub CriticalEmailTestToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CriticalEmailTestToolStripMenuItem.Click
Cursor = Cursors.WaitCursor Cursor = Cursors.WaitCursor
ClassNIEmail.Send_Urgent("Dies ist eine Test-Email!", True) EMAIL_DD.Send_EMail("Dies ist eine Test-Email!", "888888888")
Cursor = Cursors.Default Cursor = Cursors.Default
End Sub End Sub