Use Logger Module

This commit is contained in:
Jonathan Jenne 2019-04-16 14:01:35 +02:00
parent 4c86bd4c5c
commit 31bf65a5f0
37 changed files with 938 additions and 859 deletions

View File

@ -16,12 +16,13 @@ Public Class ClassAllgemeineFunktionen
Sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_ID & " AND UPPER(MODULE) = UPPER('Process-Manager')" Sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_ID & " AND UPPER(MODULE) = UPPER('Process-Manager')"
End If End If
If ClassDatabase.Execute_non_Query(Sql, True) = True Then If ClassDatabase.Execute_non_Query(Sql, True) = True Then
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> User logged in....", False) LOGGER.Debug(" >> User logged in....", False)
Else Else
ClassLogger.Add(" >> User could not be logged in/out....", False) LOGGER.Info(" >> User could not be logged in/out....", False)
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Error in LoginOut: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Error in LoginOut: " & ex.Message)
End Try End Try
End Sub End Sub
@ -30,11 +31,12 @@ Public Class ClassAllgemeineFunktionen
If IsNumeric(PROFIL_ID) Then If IsNumeric(PROFIL_ID) Then
Dim insert As String = "INSERT INTO TBPM_ERROR_LOG (PROFIL_ID, ERROR_MSG, ADDED_WHO) VALUES (" & PROFIL_ID & ", '" & ERR_MSG & "', '" & USR & "')" Dim insert As String = "INSERT INTO TBPM_ERROR_LOG (PROFIL_ID, ERROR_MSG, ADDED_WHO) VALUES (" & PROFIL_ID & ", '" & ERR_MSG & "', '" & USR & "')"
If ExecuteonMSSQL(insert, CONNECTION_STRING) <> "" Then If ExecuteonMSSQL(insert, CONNECTION_STRING) <> "" Then
ClassLogger.Add("Eintrag in Log-Tabelle konnte nicht erstellt werden!!", True) LOGGER.Info("Eintrag in Log-Tabelle konnte nicht erstellt werden!!", True)
End If End If
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Error in Insert_LogEntry: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Error in Insert_LogEntry: " & ex.Message)
End Try End Try
@ -55,9 +57,10 @@ Public Class ClassAllgemeineFunktionen
Try Try
Connection.Open() Connection.Open()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
' DB-Connection schliessen ' DB-Connection schliessen
Me.CloseMssqlDb(Connection) Me.CloseMssqlDb(Connection)
ClassLogger.Add("ExecuteonMSSQL.Connection definieren - Error: " & ex.Message, True) LOGGER.Info("ExecuteonMSSQL.Connection definieren - Error: " & ex.Message, True)
Return "ExecuteonMSSQL.Connection definieren - Error: " & ex.Message Return "ExecuteonMSSQL.Connection definieren - Error: " & ex.Message
End Try End Try
@ -66,7 +69,8 @@ Public Class ClassAllgemeineFunktionen
Try Try
Command = New SqlCommand(sqlcommand, Connection) Command = New SqlCommand(sqlcommand, Connection)
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("ExecuteonMSSQL.sqlcommand definieren - Error: " & ex.Message, True) LOGGER.Error(ex)
LOGGER.Info("ExecuteonMSSQL.sqlcommand definieren - Error: " & ex.Message, True)
' DB-Connection schliessen ' DB-Connection schliessen
Me.CloseMssqlDb(Connection) Me.CloseMssqlDb(Connection)
Return "ExecuteonMSSQL.sqlcommand definieren - Error: " & ex.Message Return "ExecuteonMSSQL.sqlcommand definieren - Error: " & ex.Message
@ -81,9 +85,10 @@ Public Class ClassAllgemeineFunktionen
Me.CloseMssqlDb(Connection) Me.CloseMssqlDb(Connection)
Return "" Return ""
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
'bei einem Fehler einen Eintrag in der Logdatei erzeugen 'bei einem Fehler einen Eintrag in der Logdatei erzeugen
ClassLogger.Add("ExecuteonMSSQL.Execute Command - Error: " & ex.Message, True) LOGGER.Info("ExecuteonMSSQL.Execute Command - Error: " & ex.Message, True)
ClassLogger.Add("Command-Befehl: " & Command.CommandText, True) LOGGER.Info("Command-Befehl: " & Command.CommandText, True)
' DB-Connection schliessen ' DB-Connection schliessen
Me.CloseMssqlDb(Connection) Me.CloseMssqlDb(Connection)
Return "ExecuteonMSSQL.Execute Command - Error: " & ex.Message Return "ExecuteonMSSQL.Execute Command - Error: " & ex.Message
@ -92,12 +97,13 @@ Public Class ClassAllgemeineFunktionen
Else Else
' 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
ClassLogger.Add("ExecuteonMSSQL.SQL-Command ist ungültig. Command-Objekt konnte nicht erstellt werden") LOGGER.Info("ExecuteonMSSQL.SQL-Command ist ungültig. Command-Objekt konnte nicht erstellt werden")
Return "ExecuteonMSSQL.SQL-Command ist ungültig. Command-Objekt konnte nicht erstellt werden" Return "ExecuteonMSSQL.SQL-Command ist ungültig. Command-Objekt konnte nicht erstellt werden"
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden ' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden
ClassLogger.Add("ExecuteonMSSQL.Ein unbekannter Fehler in ExecuteonMSSQL - Error: " & ex.Message, True) LOGGER.Info("ExecuteonMSSQL.Ein unbekannter Fehler in ExecuteonMSSQL - Error: " & ex.Message, True)
Return "ExecuteonMSSQL.Ein unbekannter Fehler in ExecuteonMSSQL - Error: " & ex.Message Return "ExecuteonMSSQL.Ein unbekannter Fehler in ExecuteonMSSQL - Error: " & ex.Message
End Try End Try
@ -118,14 +124,15 @@ Public Class ClassAllgemeineFunktionen
Dim xffres As String = Path & "\" & Stammname & ".xffres" Dim xffres As String = Path & "\" & Stammname & ".xffres"
If file_exists(xffres, clsWD) = True Then If file_exists(xffres, clsWD) = True Then
System.IO.File.Delete(xffres) System.IO.File.Delete(xffres)
ClassLogger.Add(">> Datei " & xffres & " erfolgreich gelöscht", False) LOGGER.Info(">> Datei " & xffres & " erfolgreich gelöscht", False)
Return True Return True
Else Else
Return Nothing Return Nothing
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add(" Fehler bei Delete_xffres", True) LOGGER.Error(ex)
ClassLogger.Add(">> Fehlermeldung: " & ex.Message, False) LOGGER.Info(" Fehler bei Delete_xffres", True)
LOGGER.Info(">> Fehlermeldung: " & ex.Message, False)
End Try End Try
End Function End Function
'Public Function Delete_File(originFile As String) 'Public Function Delete_File(originFile As String)
@ -133,15 +140,15 @@ Public Class ClassAllgemeineFunktionen
' If file_exists(originFile, False) = True Then ' If file_exists(originFile, False) = True Then
' System.IO.File.Delete(originFile) ' System.IO.File.Delete(originFile)
' ClassLogger.Add(">> Manuelles Löschen: Datei " & originFile & " erfolgreich gelöscht", False) ' LOGGER.Info(">> Manuelles Löschen: Datei " & originFile & " erfolgreich gelöscht", False)
' Return True ' Return True
' Else ' Else
' MsgBox("Die Datei konnte nicht gelsöcht werden. File NOT EXISTS", MsgBoxStyle.Exclamation) ' MsgBox("Die Datei konnte nicht gelsöcht werden. File NOT EXISTS", MsgBoxStyle.Exclamation)
' Return False ' Return False
' End If ' End If
' Catch ex As Exception ' Catch ex As Exception
' ClassLogger.Add(" Fehler bei Delete_File", True) ' LOGGER.Info(" Fehler bei Delete_File", True)
' ClassLogger.Add(">> Fehlermeldung: " & ex.Message, False) ' LOGGER.Info(">> Fehlermeldung: " & ex.Message, False)
' End Try ' End Try
'End Function 'End Function
@ -149,7 +156,7 @@ Public Class ClassAllgemeineFunktionen
Try Try
If VIEWER_PDF <> "internal" And vMove_File.EndsWith("pdf") Then If VIEWER_PDF <> "internal" And vMove_File.EndsWith("pdf") Then
Do While clsWD.CheckFileExists(vMove_File) = True 'func_check_file_use(vMove_File) Do While clsWD.CheckFileExists(vMove_File) = True 'func_check_file_use(vMove_File)
ClassLogger.Add(">> MoveRename: Datei noch geöffnet - Warten", False) LOGGER.Info(">> MoveRename: Datei noch geöffnet - Warten", False)
System.Threading.Thread.Sleep(500) System.Threading.Thread.Sleep(500)
Loop Loop
End If End If
@ -169,16 +176,17 @@ Public Class ClassAllgemeineFunktionen
version = version + 1 version = version + 1
Loop Loop
My.Computer.FileSystem.MoveFile(vMove_File, _Ziel) My.Computer.FileSystem.MoveFile(vMove_File, _Ziel)
ClassLogger.Add(">> Datei erfolgreich verschoben - Ziel: " & _Ziel, False) LOGGER.Info(">> Datei erfolgreich verschoben - Ziel: " & _Ziel, False)
Else Else
ClassLogger.Add(">> Ziel und Quellpfad sind identisch!", False) LOGGER.Info(">> Ziel und Quellpfad sind identisch!", False)
End If End If
Return "" Return ""
Catch ex As Exception Catch ex As Exception
ClassLogger.Add(" Fehler bei Move2Folder", True) LOGGER.Error(ex)
ClassLogger.Add(">> Fehlermeldung", False) LOGGER.Info(" Fehler bei Move2Folder", True)
ClassLogger.Add(">>" & ex.Message, False) LOGGER.Info(">> Fehlermeldung", False)
LOGGER.Info(">>" & ex.Message, False)
Insert_LogEntry(Profile_ID, "Fehler bei Move2Folder: " & ex.Message, Environment.UserName) Insert_LogEntry(Profile_ID, "Fehler bei Move2Folder: " & ex.Message, Environment.UserName)
Return ex.Message Return ex.Message
End Try End Try
@ -187,7 +195,8 @@ Public Class ClassAllgemeineFunktionen
Try Try
Return clsWD.CheckFileExists(_file) Return clsWD.CheckFileExists(_file)
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Fehler in Funktion file_exists - Fehler: ", ex.Message) LOGGER.Error(ex)
LOGGER.Info("Fehler in Funktion file_exists - Fehler: ", ex.Message)
Return False Return False
End Try End Try
End Function End Function
@ -229,8 +238,9 @@ Public Class ClassAllgemeineFunktionen
End Select End Select
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler bei checkValue_Exists:") MsgBox("Fehler:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler bei checkValue_Exists:")
ClassLogger.Add(" - Unvorhergesehener Fehler bei checkValue_Exists - Fehler: " & vbNewLine & ex.Message) LOGGER.Info(" - Unvorhergesehener Fehler bei checkValue_Exists - Fehler: " & vbNewLine & ex.Message)
Return False Return False
End Try End Try
End Function End Function
@ -261,11 +271,12 @@ Public Class ClassAllgemeineFunktionen
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Unvorhergesehener Fehler bei Execute_Scalar_SQLServer" & vbNewLine & "Automatischer Index (j/n): " & check.ToString & vbNewLine & "Fehler:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler bei Ausführen sql:") MsgBox("Unvorhergesehener Fehler bei Execute_Scalar_SQLServer" & vbNewLine & "Automatischer Index (j/n): " & check.ToString & vbNewLine & "Fehler:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler bei Ausführen sql:")
Insert_LogEntry(profil_id, "Unvorhergesehener Fehler bei Execute_Scalar_Oracle: " & ex.Message, Environment.UserName) Insert_LogEntry(profil_id, "Unvorhergesehener Fehler bei Execute_Scalar_Oracle: " & ex.Message, Environment.UserName)
ClassLogger.Add(" - Unvorhergesehener Fehler bei Execute_Scalar_SQLServer" & vbNewLine & "Automatischer Index (j/n): " & check.ToString & vbNewLine & "Fehler: " & vbNewLine & ex.Message) LOGGER.Info(" - Unvorhergesehener Fehler bei Execute_Scalar_SQLServer" & vbNewLine & "Automatischer Index (j/n): " & check.ToString & vbNewLine & "Fehler: " & vbNewLine & ex.Message)
ClassLogger.Add(" - SQL: " & vsql_statement, False) LOGGER.Info(" - SQL: " & vsql_statement, False)
ClassLogger.Add(" - Connection: " & vconnectionString, False) LOGGER.Info(" - Connection: " & vconnectionString, False)
Return 99 Return 99
End Try End Try
End Function End Function
@ -294,11 +305,12 @@ Public Class ClassAllgemeineFunktionen
cmd.Dispose() cmd.Dispose()
cnn.Close() cnn.Close()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Unvorhergesehener Fehler bei Execute_Scalar_Oracle" & vbNewLine & "Automatischer Index (j/n): " & check.ToString & vbNewLine & "Fehler:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler bei Ausführen sql:") MsgBox("Unvorhergesehener Fehler bei Execute_Scalar_Oracle" & vbNewLine & "Automatischer Index (j/n): " & check.ToString & vbNewLine & "Fehler:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler bei Ausführen sql:")
Insert_LogEntry(profil_id, "Unvorhergesehener Fehler bei Execute_Scalar_Oracle: " & ex.Message, Environment.UserName) Insert_LogEntry(profil_id, "Unvorhergesehener Fehler bei Execute_Scalar_Oracle: " & ex.Message, Environment.UserName)
ClassLogger.Add(" - Unvorhergesehener Fehler bei Execute_Scalar_Oracle" & vbNewLine & "Automatischer Index (j/n): " & check.ToString & vbNewLine & "Fehler: " & vbNewLine & ex.Message) LOGGER.Info(" - Unvorhergesehener Fehler bei Execute_Scalar_Oracle" & vbNewLine & "Automatischer Index (j/n): " & check.ToString & vbNewLine & "Fehler: " & vbNewLine & ex.Message)
ClassLogger.Add(" - SQL: " & vsql_statement, False) LOGGER.Info(" - SQL: " & vsql_statement, False)
ClassLogger.Add(" - Connection: " & vconnectionString, False) LOGGER.Info(" - Connection: " & vconnectionString, False)
Return 99 Return 99
End Try End Try
End Function End Function

View File

@ -23,7 +23,8 @@ Public Class ClassAnnotation
doc.Save(CURRENT_DOC_PATH) doc.Save(CURRENT_DOC_PATH)
Return True Return True
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected error in Annotate pdf: " & ex.Message, False) LOGGER.Error(ex)
LOGGER.Info("Unexpected error in Annotate pdf: " & ex.Message, False)
Return False Return False
End Try End Try

View File

@ -402,7 +402,7 @@ Public Class ClassControlCreator
CURRENT_CONTROL_ID = row("GUID") CURRENT_CONTROL_ID = row("GUID")
CURR_CON_ID = IIf(IsDBNull(row("CONNECTION_ID")), 0, row("CONNECTION_ID")) CURR_CON_ID = IIf(IsDBNull(row("CONNECTION_ID")), 0, row("CONNECTION_ID"))
If CURR_CON_ID = 0 Then If CURR_CON_ID = 0 Then
ClassLogger.Add(" >> CONNECTION NOT DEFINED - CTRL_GUID:" & CURRENT_CONTROL_ID, False) LOGGER.Info(" >> CONNECTION NOT DEFINED - CTRL_GUID:" & CURRENT_CONTROL_ID, False)
End If End If
CURR_SELECT_CONTROL = IIf(IsDBNull(row("SQL_UEBERPRUEFUNG")), "", row("SQL_UEBERPRUEFUNG")) CURR_SELECT_CONTROL = IIf(IsDBNull(row("SQL_UEBERPRUEFUNG")), "", row("SQL_UEBERPRUEFUNG"))
@ -413,7 +413,8 @@ Public Class ClassControlCreator
Return 0 Return 0
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected Error in GET_CONTROL_PROPERTIES (" & ControlName & "):" & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in GET_CONTROL_PROPERTIES (" & ControlName & "):" & ex.Message)
Return 0 Return 0
End Try End Try
@ -432,7 +433,8 @@ Public Class ClassControlCreator
Return True Return True
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected Error in GET_DEPENDING_CONTROLS (" & ControlName & "):" & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in GET_DEPENDING_CONTROLS (" & ControlName & "):" & ex.Message)
Return 0 Return 0
End Try End Try
End Function End Function
@ -452,7 +454,8 @@ Public Class ClassControlCreator
Return Nothing Return Nothing
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected Error in GET_CONNECTION_INFO (" & CON_ID.ToString & "):" & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in GET_CONNECTION_INFO (" & CON_ID.ToString & "):" & ex.Message)
Return Nothing Return Nothing
End Try End Try

View File

@ -28,15 +28,16 @@ Public Class ClassDatabase
' Dim conn As New OdbcConnection("dsn=" & DTConnection.Rows(0).Item("SERVER") & ";uid=" & DTConnection.Rows(0).Item("USERNAME") & ";pwd=" + DTConnection.Rows(0).Item("PASSWORD")) ' Dim conn As New OdbcConnection("dsn=" & DTConnection.Rows(0).Item("SERVER") & ";uid=" & DTConnection.Rows(0).Item("USERNAME") & ";pwd=" + DTConnection.Rows(0).Item("PASSWORD"))
' connectionString = conn.ConnectionString ' connectionString = conn.ConnectionString
Case Else Case Else
ClassLogger.Add(" - ConnectionType nicht integriert", False) LOGGER.Info(" - ConnectionType nicht integriert", False)
MsgBox("ConnectionType nicht integriert", MsgBoxStyle.Critical, "Bitte Konfiguration Connection überprüfen!") MsgBox("ConnectionType nicht integriert", MsgBoxStyle.Critical, "Bitte Konfiguration Connection überprüfen!")
End Select End Select
Else Else
ClassLogger.Add(" No entry for Connection-ID: " & id.ToString, True) LOGGER.Info(" No entry for Connection-ID: " & id.ToString, True)
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add(" - Error in bei Get ConnectionString - Fehler: " & vbNewLine & ex.Message) LOGGER.Error(ex)
LOGGER.Info(" - Error in bei Get ConnectionString - Fehler: " & vbNewLine & ex.Message)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in Get ConnectionString:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in Get ConnectionString:")
End Try End Try
Return connectionString Return connectionString
@ -50,7 +51,8 @@ Public Class ClassDatabase
SQLconnect.Close() SQLconnect.Close()
Return True Return True
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Fehler bei Database-Init: " & ex.Message, True) LOGGER.Error(ex)
LOGGER.Info("Fehler bei Database-Init: " & ex.Message, True)
Return False Return False
End Try End Try
End Function End Function
@ -59,31 +61,32 @@ Public Class ClassDatabase
Try Try
Dim SQLconnect As New SqlClient.SqlConnection Dim SQLconnect As New SqlClient.SqlConnection
Dim SQLcommand As SqlClient.SqlCommand Dim SQLcommand As SqlClient.SqlCommand
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(">>> ReturnDatatable: " & Select_anweisung, False) LOGGER.Debug(">>> ReturnDatatable: " & Select_anweisung, False)
SQLconnect.ConnectionString = SQLSERVERConnectionString SQLconnect.ConnectionString = SQLSERVERConnectionString
SQLconnect.Open() SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand SQLcommand = SQLconnect.CreateCommand
SQLcommand.CommandText = Select_anweisung SQLcommand.CommandText = Select_anweisung
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(">>> Execute ReturnDatatable: " & Select_anweisung, False) LOGGER.Debug(">>> Execute ReturnDatatable: " & Select_anweisung, False)
Dim adapter1 As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(SQLcommand) Dim adapter1 As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(SQLcommand)
Dim dt As DataTable = New DataTable() Dim dt As DataTable = New DataTable()
adapter1.Fill(dt) adapter1.Fill(dt)
SQLconnect.Close() SQLconnect.Close()
Return dt Return dt
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
If userInput = True Then If userInput = True Then
MsgBox("Error in Return Datatable - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & Select_anweisung, MsgBoxStyle.Critical) MsgBox("Error in Return Datatable - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & Select_anweisung, MsgBoxStyle.Critical)
End If End If
Clipboard.SetText("Error: " & ex.Message & vbNewLine & "SQL: " & Select_anweisung) Clipboard.SetText("Error: " & ex.Message & vbNewLine & "SQL: " & Select_anweisung)
ClassLogger.Add("Fehler bei Return_Datatable: " & ex.Message, True) LOGGER.Info("Fehler bei Return_Datatable: " & ex.Message, True)
ClassLogger.Add("#SQL: " & Select_anweisung, False) LOGGER.Info("#SQL: " & Select_anweisung, False)
Return Nothing Return Nothing
End Try End Try
End Function End Function
Public Shared Function Return_Datatable_CS(Select_anweisung As String, Conn_ID As Integer, Optional userInput As Boolean = False) Public Shared Function Return_Datatable_CS(Select_anweisung As String, Conn_ID As Integer, Optional userInput As Boolean = False)
Try Try
Dim ConString As String = Get_ConnectionString(Conn_ID) Dim ConString As String = Get_ConnectionString(Conn_ID)
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(">>> ReturnDatatable: " & Select_anweisung, False) LOGGER.Debug(">>> ReturnDatatable: " & Select_anweisung, False)
Dim SQLconnect As New SqlClient.SqlConnection Dim SQLconnect As New SqlClient.SqlConnection
Dim SQLcommand As SqlClient.SqlCommand Dim SQLcommand As SqlClient.SqlCommand
SQLconnect.ConnectionString = ConString SQLconnect.ConnectionString = ConString
@ -97,11 +100,12 @@ Public Class ClassDatabase
SQLconnect.Close() SQLconnect.Close()
Return dt Return dt
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
If userInput = True Then If userInput = True Then
MsgBox("Error in Return_Datatable_CS - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & Select_anweisung, MsgBoxStyle.Critical) MsgBox("Error in Return_Datatable_CS - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & Select_anweisung, MsgBoxStyle.Critical)
End If End If
ClassLogger.Add("Fehler bei Return_Datatable_CS: " & ex.Message, True) LOGGER.Info("Fehler bei Return_Datatable_CS: " & ex.Message, True)
ClassLogger.Add("#SQL: " & Select_anweisung, False) LOGGER.Info("#SQL: " & Select_anweisung, False)
Return Nothing Return Nothing
End Try End Try
End Function End Function
@ -110,23 +114,24 @@ Public Class ClassDatabase
Dim SQLconnect As New SqlClient.SqlConnection Dim SQLconnect As New SqlClient.SqlConnection
Dim SQLcommand As SqlClient.SqlCommand Dim SQLcommand As SqlClient.SqlCommand
SQLconnect.ConnectionString = SQLSERVERConnectionString SQLconnect.ConnectionString = SQLSERVERConnectionString
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(">>> Execute_non_Query: " & ExecuteCMD, False) LOGGER.Debug(">>> Execute_non_Query: " & ExecuteCMD, False)
SQLconnect.Open() SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand SQLcommand = SQLconnect.CreateCommand
'Update Last Created Record in Foo 'Update Last Created Record in Foo
SQLcommand.CommandText = ExecuteCMD SQLcommand.CommandText = ExecuteCMD
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(">>> Execute NonQuery: " & ExecuteCMD, False) LOGGER.Debug(">>> Execute NonQuery: " & ExecuteCMD, False)
SQLcommand.ExecuteNonQuery() SQLcommand.ExecuteNonQuery()
SQLcommand.Dispose() SQLcommand.Dispose()
SQLconnect.Close() SQLconnect.Close()
Return True Return True
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
If userInput = True Then If userInput = True Then
MsgBox("Error in Execute non query - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & ExecuteCMD, MsgBoxStyle.Critical) MsgBox("Error in Execute non query - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & ExecuteCMD, MsgBoxStyle.Critical)
End If End If
Clipboard.SetText("Error ExecuteCMD: " & ex.Message & vbNewLine & "SQL: " & ExecuteCMD) Clipboard.SetText("Error ExecuteCMD: " & ex.Message & vbNewLine & "SQL: " & ExecuteCMD)
ClassLogger.Add("Fehler bei Execute_non_Query: " & ex.Message, True) LOGGER.Info("Fehler bei Execute_non_Query: " & ex.Message, True)
ClassLogger.Add("#SQL: " & ExecuteCMD, False) LOGGER.Info("#SQL: " & ExecuteCMD, False)
Return False Return False
End Try End Try
@ -137,23 +142,24 @@ Public Class ClassDatabase
Dim SQLconnect As New SqlClient.SqlConnection Dim SQLconnect As New SqlClient.SqlConnection
Dim SQLcommand As SqlClient.SqlCommand Dim SQLcommand As SqlClient.SqlCommand
SQLconnect.ConnectionString = ConString SQLconnect.ConnectionString = ConString
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(">>> Execute_non_Query: " & cmdscalar, False) LOGGER.Debug(">>> Execute_non_Query: " & cmdscalar, False)
SQLconnect.Open() SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand SQLcommand = SQLconnect.CreateCommand
'Update Last Created Record in Foo 'Update Last Created Record in Foo
SQLcommand.CommandText = cmdscalar SQLcommand.CommandText = cmdscalar
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(">>> Execute Scalar: " & cmdscalar, False) LOGGER.Debug(">>> Execute Scalar: " & cmdscalar, False)
result = SQLcommand.ExecuteScalar() result = SQLcommand.ExecuteScalar()
SQLcommand.Dispose() SQLcommand.Dispose()
SQLconnect.Close() SQLconnect.Close()
Return result Return result
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
If userInput = True Then If userInput = True Then
MsgBox("Error in Execute Scalar - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & cmdscalar, MsgBoxStyle.Critical) MsgBox("Error in Execute Scalar - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & cmdscalar, MsgBoxStyle.Critical)
End If End If
Clipboard.SetText("Error Execute_Scalar: " & ex.Message & vbNewLine & "SQL: " & cmdscalar) Clipboard.SetText("Error Execute_Scalar: " & ex.Message & vbNewLine & "SQL: " & cmdscalar)
ClassLogger.Add("Fehler bei Execute_Scalar: " & ex.Message, True) LOGGER.Info("Fehler bei Execute_Scalar: " & ex.Message, True)
ClassLogger.Add("#SQL: " & cmdscalar, False) LOGGER.Info("#SQL: " & cmdscalar, False)
Return Nothing Return Nothing
End Try End Try
End Function End Function
@ -172,8 +178,9 @@ Public Class ClassDatabase
SQLconnect.Close() SQLconnect.Close()
Return result Return result
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Fehler bei OracleExecute_Scalar: " & ex.Message, True) LOGGER.Error(ex)
ClassLogger.Add("#SQL: " & cmdscalar, False) LOGGER.Info("Fehler bei OracleExecute_Scalar: " & ex.Message, True)
LOGGER.Info("#SQL: " & cmdscalar, False)
Return Nothing Return Nothing
End Try End Try
End Function End Function
@ -191,11 +198,12 @@ Public Class ClassDatabase
SQLconnect.Close() SQLconnect.Close()
Return True Return True
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
If userInput = True Then If userInput = True Then
MsgBox("Error in OracleExecute_non_Query - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & ExecuteCMD, MsgBoxStyle.Critical) MsgBox("Error in OracleExecute_non_Query - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & ExecuteCMD, MsgBoxStyle.Critical)
End If End If
ClassLogger.Add("Fehler bei OracleExecute_non_Query: " & ex.Message, True) LOGGER.Info("Fehler bei OracleExecute_non_Query: " & ex.Message, True)
ClassLogger.Add("#SQL: " & ExecuteCMD, False) LOGGER.Info("#SQL: " & ExecuteCMD, False)
Return False Return False
End Try End Try
@ -216,11 +224,12 @@ Public Class ClassDatabase
SQLconnect.Close() SQLconnect.Close()
Return dt Return dt
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
If userInput = True Then If userInput = True Then
MsgBox("Error in Oracle Return Datatable - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & Select_anweisung, MsgBoxStyle.Critical) MsgBox("Error in Oracle Return Datatable - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & Select_anweisung, MsgBoxStyle.Critical)
End If End If
ClassLogger.Add("Fehler bei Oracle_Return_Datatable: " & ex.Message, True) LOGGER.Info("Fehler bei Oracle_Return_Datatable: " & ex.Message, True)
ClassLogger.Add("#SQL: " & Select_anweisung, False) LOGGER.Info("#SQL: " & Select_anweisung, False)
Return Nothing Return Nothing
End Try End Try
End Function End Function

View File

@ -61,6 +61,7 @@ Public Class ClassDragDrop
Try Try
dragDropData = row.Item("GUID") & "|" & source dragDropData = row.Item("GUID") & "|" & source
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
Try Try
dragDropData = row.Item("USER_ID") & "|" & source dragDropData = row.Item("USER_ID") & "|" & source
Catch ex1 As Exception Catch ex1 As Exception
@ -78,6 +79,7 @@ Public Class ClassDragDrop
End If End If
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error in view_MouseMove: " & ex.Message, MsgBoxStyle.Critical) MsgBox("Error in view_MouseMove: " & ex.Message, MsgBoxStyle.Critical)
End Try End Try
End Sub End Sub

View File

@ -13,14 +13,15 @@ Public Class ClassEmail
'Für jeden Empfänger eine Neue Mail erzeugen 'Für jeden Empfänger eine Neue Mail erzeugen
For Each _mailempfaenger As String In empfaenger For Each _mailempfaenger As String In empfaenger
' Neue Nachricht erzeugen: ' Neue Nachricht erzeugen:
Dim message As New MailMessage(emailfrom, _mailempfaenger, vBetreff & " - Domain: " & Environment.UserDomainName, _ Dim message As New MailMessage(emailfrom, _mailempfaenger, vBetreff & " - Domain: " & Environment.UserDomainName,
"<font face=""Arial"">" & vBody & "<br>>> Version: " & My.Application.Info.Version.ToString & "<br>>> Maschine: " & Environment.MachineName & "<br>" & "<br>>> Domain-Name: " & Environment.UserDomainName & "<br>" & _ "<font face=""Arial"">" & vBody & "<br>>> Version: " & My.Application.Info.Version.ToString & "<br>>> Maschine: " & Environment.MachineName & "<br>" & "<br>>> Domain-Name: " & Environment.UserDomainName & "<br>" &
"<br>>> Gesendet am: " & My.Computer.Clock.LocalTime.ToShortDateString & " " & _ "<br>>> Gesendet am: " & My.Computer.Clock.LocalTime.ToShortDateString & " " &
My.Computer.Clock.LocalTime.ToLongTimeString & "</font>") My.Computer.Clock.LocalTime.ToLongTimeString & "</font>")
If test = False Then If test = False Then
If Log = True Then If Log = True Then
' create and add the attachment(s) */ ' create and add the attachment(s) */
Dim logfile As String = ClassLogger.logDateiname
Dim logfile As String = LOGCONFIG.LogFile
If logfile.Contains("\\") Then If logfile.Contains("\\") Then
logfile = logfile.Replace("\\", "\") logfile = logfile.Replace("\\", "\")
End If End If
@ -52,11 +53,12 @@ Public Class ClassEmail
If Log = True Then If Log = True Then
MsgBox("Die Support-Email wurde erfolgreich versendet!", MsgBoxStyle.Information, "Erfolgsmeldung:") MsgBox("Die Support-Email wurde erfolgreich versendet!", MsgBoxStyle.Information, "Erfolgsmeldung:")
End If End If
'ClassLogger.Add(">> Support/Log Email erfolgreich an " & _mailempfaenger & " versendet!", False) 'LOGGER.Info(">> Support/Log Email erfolgreich an " & _mailempfaenger & " versendet!", False)
Next Next
Return True Return True
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("### Fehler im Mailversand: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("### Fehler im Mailversand: " & ex.Message)
Return False Return False
End Try End Try
End Function End Function

View File

@ -36,6 +36,7 @@
' Return value ' Return value
'End If 'End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox($"Error in GetValue: {ex.Message}", MsgBoxStyle.Critical) MsgBox($"Error in GetValue: {ex.Message}", MsgBoxStyle.Critical)
End Try End Try
End Function End Function
@ -90,6 +91,7 @@
Return props Return props
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox($"Error in SetValue: {ex.Message}", MsgBoxStyle.Critical) MsgBox($"Error in SetValue: {ex.Message}", MsgBoxStyle.Critical)
End Try End Try
End Function End Function

View File

@ -8,12 +8,12 @@
If CURRENT_DT_FINAL_INDEXING.Rows.Count > 0 Then If CURRENT_DT_FINAL_INDEXING.Rows.Count > 0 Then
'Jetzt finale Indexe setzen 'Jetzt finale Indexe setzen
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> working final indices for doc: " & WMObject.aName, False) LOGGER.Debug(" >> working final indices for doc: " & WMObject.aName, False)
For Each dr As DataRow In CURRENT_DT_FINAL_INDEXING.Rows For Each dr As DataRow In CURRENT_DT_FINAL_INDEXING.Rows
Dim value As String = dr.Item("VALUE").ToString Dim value As String = dr.Item("VALUE").ToString
Dim INDEXNAME = dr.Item("INDEXNAME").ToString Dim INDEXNAME = dr.Item("INDEXNAME").ToString
If value.ToUpper = "SQL-Command".ToUpper Then '###### Indexierung mit variablen SQL ### If value.ToUpper = "SQL-Command".ToUpper Then '###### Indexierung mit variablen SQL ###
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> indexing with dynamic sql...", False) LOGGER.Debug(" >> indexing with dynamic sql...", False)
'Dim SQL_COMMAND = dr.Item("SQL_COMMAND") 'Dim SQL_COMMAND = dr.Item("SQL_COMMAND")
'' Regulären Ausdruck zum Auslesen der Indexe definieren '' Regulären Ausdruck zum Auslesen der Indexe definieren
'Dim preg As String = "\[%{1}[a-zA-Z0-9\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}" 'Dim preg As String = "\[%{1}[a-zA-Z0-9\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}"
@ -25,23 +25,23 @@
'' alle Vorkommen innerhalbd er Namenkonvention durchlaufen '' alle Vorkommen innerhalbd er Namenkonvention durchlaufen
'For Each element As System.Text.RegularExpressions.Match In elemente 'For Each element As System.Text.RegularExpressions.Match In elemente
' Try ' Try
' If LogErrorsOnly = False Then ClassLogger.Add(" >> element in RegeX: " & element.Value, False) ' If LogErrorsOnly = False Then LOGGER.Info(" >> element in RegeX: " & element.Value, False)
' Dim WDINDEXNAME = element.Value.Substring(2, element.Value.Length - 3) ' Dim WDINDEXNAME = element.Value.Substring(2, element.Value.Length - 3)
' Dim wertWD = WMObject.GetVariableValue(WDINDEXNAME) ' Dim wertWD = WMObject.GetVariableValue(WDINDEXNAME)
' If Not IsNothing(wertWD) Then ' If Not IsNothing(wertWD) Then
' SQL_COMMAND = SQL_COMMAND.ToString.Replace(element.Value, wertWD) ' SQL_COMMAND = SQL_COMMAND.ToString.Replace(element.Value, wertWD)
' Else ' Else
' ClassLogger.Add(">>Attention: indexvalue is invalid", False) ' LOGGER.Info(">>Attention: indexvalue is invalid", False)
' End If ' End If
' Catch ex As Exception ' Catch ex As Exception
' ClassLogger.Add("Unexpected Error in Checking control values for Variable SQL Result - ERROR: " & ex.Message) ' LOGGER.Info("Unexpected Error in Checking control values for Variable SQL Result - ERROR: " & ex.Message)
' End Try ' End Try
'Next 'Next
Dim sql_Statement = clsPatterns.ReplaceUserValues(dr.Item("SQL_COMMAND"), USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL) Dim sql_Statement = clsPatterns.ReplaceUserValues(dr.Item("SQL_COMMAND"), USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL)
sql_Statement = clsPatterns.ReplaceInternalValues(sql_Statement) sql_Statement = clsPatterns.ReplaceInternalValues(sql_Statement)
sql_Statement = clsPatterns.ReplaceWindreamIndicies(sql_Statement, WMObject) sql_Statement = clsPatterns.ReplaceWindreamIndicies(sql_Statement, WMObject)
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(">>> sql after ReplaceAllValues: " & sql_Statement, False) LOGGER.Debug(">>> sql after ReplaceAllValues: " & sql_Statement, False)
Dim dynamic_value = ClassDatabase.Execute_Scalar(sql_Statement, CONNECTION_STRING, True) Dim dynamic_value = ClassDatabase.Execute_Scalar(sql_Statement, CONNECTION_STRING, True)
If Not IsNothing(dynamic_value) Then If Not IsNothing(dynamic_value) Then
value = dynamic_value value = dynamic_value
@ -66,11 +66,11 @@
result(0) = value result(0) = value
Dim oIndexType = WINDREAM.GetTypeOfIndex(INDEXNAME) Dim oIndexType = WINDREAM.GetTypeOfIndex(INDEXNAME)
If LOG_ERRORS_ONLY = False Then ClassLogger.Add($" >> oIndexType {oIndexType.ToString}", False) LOGGER.Debug($" >> oIndexType {oIndexType.ToString}", False)
If oIndexType > 4000 And oIndexType < 5000 Then If oIndexType > 4000 And oIndexType < 5000 Then
'Hier muss nun separat als Vektorfeld indexiert werden 'Hier muss nun separat als Vektorfeld indexiert werden
If Indexiere_VektorfeldPM(value, INDEXNAME, WMObject) = False Then If Indexiere_VektorfeldPM(value, INDEXNAME, WMObject) = False Then
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> FINALER INDEX '" & INDEXNAME.Replace("[%VKT", "") & "' WURDE ERFOLGREICH GESETZT", False) LOGGER.Debug(" >> FINALER INDEX '" & INDEXNAME.Replace("[%VKT", "") & "' WURDE ERFOLGREICH GESETZT", False)
Else Else
MsgBox("Unexpected error in finalindexing vektorvalue - check the log", MsgBoxStyle.Critical) MsgBox("Unexpected error in finalindexing vektorvalue - check the log", MsgBoxStyle.Critical)
@ -78,10 +78,10 @@
End If End If
Else Else
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> now indexing..", False) LOGGER.Debug(" >> now indexing..", False)
If Indexiere_File(INDEXNAME, result, WMObject) = True Then If Indexiere_File(INDEXNAME, result, WMObject) = True Then
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> FINALER INDEX '" & INDEXNAME & "' WURDE ERFOLGREICH GESETZT", False) LOGGER.Debug(" >> FINALER INDEX '" & INDEXNAME & "' WURDE ERFOLGREICH GESETZT", False)
If LOG_ERRORS_ONLY = False Then ClassLogger.Add("") LOGGER.Debug("")
'Nun das Logging 'Nun das Logging
If CURRENT_PROFILE_VEKTOR_LOG <> "" Then If CURRENT_PROFILE_VEKTOR_LOG <> "" Then
Dim logstr = Return_LOGString(value, "DDFINALINDEX", INDEXNAME) Dim logstr = Return_LOGString(value, "DDFINALINDEX", INDEXNAME)
@ -106,7 +106,8 @@
Return True Return True
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add(">> unexpected error in Write_Final_Metadata: " & ex.Message.ToString, True) LOGGER.Error(ex)
LOGGER.Info(">> unexpected error in Write_Final_Metadata: " & ex.Message.ToString, True)
Return False Return False
End Try End Try
End Function End Function
@ -126,7 +127,7 @@
'Das Array der Idnexwerte überprüfen 'Das Array der Idnexwerte überprüfen
If idxvalue Is Nothing = False Then If idxvalue Is Nothing = False Then
If idxvalue.Length() > 1 Then If idxvalue.Length() > 1 Then
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexing Index '" & idxxname & "' with Arrayvalue", False) LOGGER.Debug(" >> Indexing Index '" & idxxname & "' with Arrayvalue", False)
Dim anzahl As Integer = 0 Dim anzahl As Integer = 0
For Each indexvalue As String In idxvalue For Each indexvalue As String In idxvalue
ReDim Preserve arrValue(anzahl) ReDim Preserve arrValue(anzahl)
@ -134,7 +135,7 @@
anzahl += 1 anzahl += 1
Next Next
Else Else
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexing Index '" & idxxname & "' with value '" & idxvalue(0) & "'", False) LOGGER.Debug(" >> Indexing Index '" & idxxname & "' with value '" & idxvalue(0) & "'", False)
ReDim Preserve arrValue(0) ReDim Preserve arrValue(0)
arrValue(0) = idxvalue(0).ToString arrValue(0) = idxvalue(0).ToString
End If End If
@ -146,7 +147,7 @@
End If End If
'Catch ex As Exception 'Catch ex As Exception
' ClassLogger.Add(">> Unvorhergesehener Fehler bei Indexiere_File: " & ex.Message.ToString, True) ' LOGGER.Info(">> Unvorhergesehener Fehler bei Indexiere_File: " & ex.Message.ToString, True)
' Return Err() ' Return Err()
'End Try 'End Try
End Function End Function
@ -198,7 +199,8 @@
Dim Bezeichner As String = VKTBezeichner.Replace("[%VKT", "") Dim Bezeichner As String = VKTBezeichner.Replace("[%VKT", "")
PM_String = "DD-PM#" & Bezeichner & "#" & input & "#" & Environment.UserName & "#" & Now.ToString PM_String = "DD-PM#" & Bezeichner & "#" & input & "#" & Environment.UserName & "#" & Now.ToString
Catch ex As Exception Catch ex As Exception
ClassLogger.Add(">> Fehler in Return_PM_VEKTOR: " & ex.Message, True) LOGGER.Error(ex)
LOGGER.Info(">> Fehler in Return_PM_VEKTOR: " & ex.Message, True)
PM_String = "DD-PM ERROR: " & ex.Message PM_String = "DD-PM ERROR: " & ex.Message
End Try End Try
Return PM_String Return PM_String
@ -214,7 +216,8 @@
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add(">> Fehler in Return_LOGString: " & ex.Message, True) LOGGER.Error(ex)
LOGGER.Info(">> Fehler in Return_LOGString: " & ex.Message, True)
PM_String = "DD-PM ERROR: " & ex.Message PM_String = "DD-PM ERROR: " & ex.Message
End Try End Try
Return PM_String Return PM_String

View File

@ -19,7 +19,7 @@ Public Class ClassInit
LOGGER.Info("## ProcessManager für Windream gestartet - {0}", Now) LOGGER.Info("## ProcessManager für Windream gestartet - {0}", Now)
'ClassLogger.Init("", Environment.UserName) 'ClassLogger.Init("", Environment.UserName)
'ClassLogger.Add("## ProcessManager für Windream gestartet - " & Now, False) 'LOGGER.Info("## ProcessManager für Windream gestartet - " & Now, False)
'If LogErrorsOnly = False Then 'If LogErrorsOnly = False Then
' 'Setzt DetailLog zurück ' 'Setzt DetailLog zurück
' LogErrorsOnly = False = False ' LogErrorsOnly = False = False
@ -53,6 +53,7 @@ Public Class ClassInit
USER_MANAGER_PATH = CONFIG.Config.UserManagerPath USER_MANAGER_PATH = CONFIG.Config.UserManagerPath
LOG_ERRORS_ONLY = CONFIG.Config.LogErrorsOnly
LOGCONFIG.Debug = Not LOG_ERRORS_ONLY LOGCONFIG.Debug = Not LOG_ERRORS_ONLY
'Settings_Load() 'Settings_Load()
@ -70,6 +71,7 @@ Public Class ClassInit
Try Try
oPlaintextPassword = oDecryptor.DecryptData(oBuilder.Password) oPlaintextPassword = oDecryptor.DecryptData(oBuilder.Password)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
LOGGER.Debug("Password {0} could not be decrypted. Assuming plaintext password.") LOGGER.Debug("Password {0} could not be decrypted. Assuming plaintext password.")
oPlaintextPassword = oBuilder.Password oPlaintextPassword = oBuilder.Password
End Try End Try
@ -120,11 +122,12 @@ Public Class ClassInit
LICENSE_EXPIRED = True LICENSE_EXPIRED = True
LICENSE_COUNT = 0 LICENSE_COUNT = 0
End If End If
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> license initialized....", False) LOGGER.Debug(" >> license initialized....", False)
LICENSE_PROFILES = split(2) LICENSE_PROFILES = split(2)
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected error in Refresh license: " & ex.Message, True) LOGGER.Error(ex)
LOGGER.Info("Unexpected error in Refresh license: " & ex.Message, True)
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Fehler bei Licensemanager:") MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Fehler bei Licensemanager:")
End Try End Try
End Sub End Sub
@ -147,18 +150,19 @@ Public Class ClassInit
Exit Sub Exit Sub
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected error in checking CLIENT: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Unexpected error in checking CLIENT: " & ex.Message)
CLIENT_SELECTED = 1 CLIENT_SELECTED = 1
End Try End Try
ClassLogger.Add(">> Username: " & USER_USERNAME, False) LOGGER.Info(">> Username: " & USER_USERNAME, False)
Dim sql = String.Format("SELECT * FROM [dbo].[FNDD_CHECK_USER_MODULE] ('{0}','PM',{1})", Environment.UserName, CLIENT_SELECTED) Dim sql = String.Format("SELECT * FROM [dbo].[FNDD_CHECK_USER_MODULE] ('{0}','PM',{1})", Environment.UserName, CLIENT_SELECTED)
Dim DT_CHECKUSER_MODULE As DataTable = ClassDatabase.Return_Datatable(sql) Dim DT_CHECKUSER_MODULE As DataTable = ClassDatabase.Return_Datatable(sql)
If DT_CHECKUSER_MODULE.Rows.Count = 0 Then If DT_CHECKUSER_MODULE.Rows.Count = 0 Then
ClassLogger.Add("DT_CHECKUSER_MODULE.Rows.Count = 0", True) LOGGER.Info("DT_CHECKUSER_MODULE.Rows.Count = 0", True)
ERROR_STATE = "NO USER" ERROR_STATE = "NO USER"
@ -187,7 +191,7 @@ Public Class ClassInit
USERCOUNT_LOGGED_IN = DT_CHECKUSER_MODULE.Rows(0).Item("USERCOUNT_LOGGED_IN") USERCOUNT_LOGGED_IN = DT_CHECKUSER_MODULE.Rows(0).Item("USERCOUNT_LOGGED_IN")
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> User exists....", False) LOGGER.Debug(" >> User exists....", False)
'Am System anmelden 'Am System anmelden
Refresh_Licence() Refresh_Licence()
'Check_User_Exists_in_PMGroups() 'Check_User_Exists_in_PMGroups()
@ -198,21 +202,22 @@ Public Class ClassInit
' USERCOUNT_LOGGED_IN = ClassDatabase.Execute_Scalar(sql, MyConnectionString, True) ' USERCOUNT_LOGGED_IN = ClassDatabase.Execute_Scalar(sql, MyConnectionString, True)
sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_ID & " AND MODULE = 'Process-Manager'" sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_ID & " AND MODULE = 'Process-Manager'"
ClassDatabase.Execute_non_Query(sql, True) ClassDatabase.Execute_non_Query(sql, True)
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Count Users logged in: " & USERCOUNT_LOGGED_IN.ToString, False) LOGGER.Debug(" >> Count Users logged in: " & USERCOUNT_LOGGED_IN.ToString, False)
If LICENSE_COUNT < USERCOUNT_LOGGED_IN And LICENSE_EXPIRED = False Then If LICENSE_COUNT < USERCOUNT_LOGGED_IN And LICENSE_EXPIRED = False Then
MsgBox("Die Anzahl der aktuell angemeldeten User (" & USERCOUNT_LOGGED_IN.ToString & ") überschreitet die Anzahl der aktuellen Lizenzen!" & vbNewLine & "Anzahl der Lizenzen: " & LICENSE_COUNT.ToString & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:") MsgBox("Die Anzahl der aktuell angemeldeten User (" & USERCOUNT_LOGGED_IN.ToString & ") überschreitet die Anzahl der aktuellen Lizenzen!" & vbNewLine & "Anzahl der Lizenzen: " & LICENSE_COUNT.ToString & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:")
ClassLogger.Add(" >> Die Anzahl der aktuell angemeldeten User (" & USERCOUNT_LOGGED_IN.ToString & ") überschreitet die Anzahl der Lizenzen (" & LICENSE_COUNT & ") für Process Manager!", False) LOGGER.Info(" >> Die Anzahl der aktuell angemeldeten User (" & USERCOUNT_LOGGED_IN.ToString & ") überschreitet die Anzahl der Lizenzen (" & LICENSE_COUNT & ") für Process Manager!", False)
If USER_IS_ADMIN = False Then If USER_IS_ADMIN = False Then
ClassAllgemeineFunktionen.LoginOut("LOGOUT") ClassAllgemeineFunktionen.LoginOut("LOGOUT")
ClassLogger.Add(" - Wieder abgemeldet - START INCOMPLETE", False) LOGGER.Info(" - Wieder abgemeldet - START INCOMPLETE", False)
ERROR_STATE = "START INCOMPLETE" ERROR_STATE = "START INCOMPLETE"
End If End If
End If End If
'Alles OK bis hierhin...nun die FolderwatchKonfig laden 'Alles OK bis hierhin...nun die FolderwatchKonfig laden
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Init Userlogin successfull completed....", False) LOGGER.Debug(" >> Init Userlogin successfull completed....", False)
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected Error in InitUserLogin: " & ex.Message, True) LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in InitUserLogin: " & ex.Message, True)
ERROR_STATE = "START INCOMPLETE" ERROR_STATE = "START INCOMPLETE"
End Try End Try
@ -227,7 +232,8 @@ Public Class ClassInit
CURRENT_DT_TBDD_CONNECTION = ClassDatabase.Return_Datatable(sql) CURRENT_DT_TBDD_CONNECTION = ClassDatabase.Return_Datatable(sql)
Settings_LoadBasicConfig() Settings_LoadBasicConfig()
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected Error in InitBasics: " & ex.Message, True) LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in InitBasics: " & ex.Message, True)
ERROR_STATE = "Basics not initialized" ERROR_STATE = "Basics not initialized"
End Try End Try
End Sub End Sub
@ -243,12 +249,14 @@ Public Class ClassInit
LICENSE_VALID = DT.Rows(0).Item("LICENSE_VALID") LICENSE_VALID = DT.Rows(0).Item("LICENSE_VALID")
WMSESSION_STARTSTOP_STARTUP = DT.Rows(0).Item("WMSESSION_STARTSTOP_STARTUP") WMSESSION_STARTSTOP_STARTUP = DT.Rows(0).Item("WMSESSION_STARTSTOP_STARTUP")
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected Error in Settings_LoadBasicConfig: " & ex.Message, True) LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in Settings_LoadBasicConfig: " & ex.Message, True)
End Try End Try
Else Else
Return False Return False
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error in Settings_LoadBasicConfig" & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Error in Settings_LoadBasicConfig" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
Return False Return False
End Try End Try

View File

@ -1,215 +0,0 @@
Imports System.IO
Public Class ClassLogger
Public Shared DateiSpeicherort As String = Nothing
Public Shared DateiPrefix As String = ""
Public Shared Datei As IO.File = Nothing
Public Shared logDateiname As String = ""
Private Shared StreamWriter As IO.StreamWriter = Nothing
Private Shared HasInformedAboutError As Boolean = False
' eine Art Konstruktor
Public Shared Sub Init(ByVal speicherort As String, Optional ByVal prefix As String = "", Optional ByVal appendFile As Boolean = True)
' initialisiert den Speicherort
ClassLogger.SetSpeicherort(speicherort)
' wenn ein Prfix gesetzt wurde
If Not prefix = "" Then
' initialisiert das Prefix
ClassLogger.SetPrefix(prefix)
End If
Dim str As String = ClassLogger.DateiSpeicherort & "\" & ClassLogger.DateiPrefix & System.DateTime.Now.ToString("yyyy_MM_dd") & ".txt"
Dim anz As Integer = 1
Do While File.Exists(str)
Dim info As New FileInfo(str)
Dim length As Long = info.Length
If length > 5000000 Then
str = IO.Path.GetDirectoryName(str)
str = str & "\" & ClassLogger.DateiPrefix & System.DateTime.Now.ToString("yyyy_MM_dd") & "(" & anz.ToString & ").txt"
anz = anz + 1
Else
Exit Do
End If
Loop
ClassLogger.logDateiname = str
If Not appendFile Then
' der Versuch die Datei zu löschen
'Try
' My.Computer.FileSystem.DeleteFile(ClassNILogger.Dateiname, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)
'Catch ex As Exception
' ' bei Fehler besteht kein Schreibrecht auf die Datei oder Datei existiert nicht
' ' ALSO: alles Okay soweit
'End Try
My.Computer.FileSystem.WriteAllText(ClassLogger.logDateiname, String.Empty, False)
End If
' testen ob sich die Datei öffnen und beschreiben lässt
'ClassNILogger.CheckIsLogWritable()
End Sub
' legt den Speicherort fest
Public Shared Sub SetSpeicherort(ByVal speicherort As String)
Dim f As New IO.DirectoryInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Digital Data\Process Manager\Log"))
If speicherort = "" Then
If f.Exists = False Then
IO.Directory.CreateDirectory(f.ToString())
End If
ClassLogger.DateiSpeicherort = f.ToString()
Else
ClassLogger.DateiSpeicherort = speicherort
End If
'Dim f As New IO.DirectoryInfo(My.Application.Info.DirectoryPath & "\Log")
'If speicherort = "" Then
' If f.Exists = False Then
' IO.Directory.CreateDirectory(My.Application.Info.DirectoryPath & "\Log")
' End If
' ClassLogger.DateiSpeicherort = My.Application.Info.DirectoryPath & "\Log\"
'Else
' ClassLogger.DateiSpeicherort = speicherort
'End If
End Sub
' legt das Prefix für den Dateinamen fest
Public Shared Sub SetPrefix(ByVal prefix As String)
ClassLogger.DateiPrefix = prefix
End Sub
Public Shared Sub Add(ByVal information As String, Optional ByVal ACHTUNG As Boolean = True)
If ClassLogger.OpenFile Then
Try
If ACHTUNG Then
ClassLogger.StreamWriter.WriteLine(System.DateTime.Now & " #ACHTUNG#: " & information)
Else
ClassLogger.StreamWriter.WriteLine(System.DateTime.Now & " " & information)
End If
ClassLogger.CloseFile()
Catch e As Exception
ClassLogger.ShowErrorMessage()
End Try
Else
ClassLogger.ShowErrorMessage()
End If
End Sub
Public Shared Sub Add(ByVal ex As Exception)
If ClassLogger.OpenFile Then
Try
ClassLogger.StreamWriter.WriteLine("##### Exception (" & System.DateTime.Now & ")")
ClassLogger.StreamWriter.WriteLine("##### Fehler: " & ex.Message & " Source [" & ex.Source & "]")
ClassLogger.CloseFile()
Catch e As Exception
ClassLogger.ShowErrorMessage()
End Try
Else
ClassLogger.ShowErrorMessage()
End If
End Sub
' öffnet eine Datei zum Schreiben
Private Shared Function OpenFile()
Try
' wenn ein Speicherort festgelegt wurde
If Not ClassLogger.DateiSpeicherort = Nothing Then
' den Dateienamen definieren
Dim dateiname As String = ClassLogger.logDateiname
' Datei anlegen wenn noch nicht vorhanden
My.Computer.FileSystem.WriteAllText(dateiname, String.Empty, True)
' die Datei zum Schreiben öffnen
ClassLogger.StreamWriter = New IO.StreamWriter(dateiname, True, System.Text.Encoding.UTF8)
End If
' wenn die Datei erfolgreich geöffnet wurde
If ClassLogger.StreamWriter IsNot Nothing Then
Return True
Else
Return False
End If
Catch ex As Exception
Return False
End Try
End Function
' öffnet eine Datei zum Schreiben
Private Shared Function OpenFile(ByVal DateiSpeicherort As String, ByVal DateiPrefix As String)
Try
' wenn ein Speicherort festgelegt wurde
If Not DateiSpeicherort = Nothing And ClassLogger.CheckIsLogWritable() Then
' den Dateienamen definieren
Dim dateiname As String = ClassLogger.logDateiname
' Datei anlegen wenn noch nicht vorhanden
My.Computer.FileSystem.WriteAllText(dateiname, String.Empty, True)
' die Datei zum Schreiben öffnen
ClassLogger.StreamWriter = New IO.StreamWriter(dateiname, True, System.Text.Encoding.UTF8)
End If
' wenn die Datei erfolgreich geöffnet wurde
If ClassLogger.StreamWriter IsNot Nothing Then
Return True
Else
Return False
End If
Catch ex As Exception
Return False
End Try
End Function
' schliesst die geöffnete Datei
Private Shared Sub CloseFile()
' wenn eine Datei geöffnet ist
If ClassLogger.StreamWriter IsNot Nothing Then
' die Datei schliessen
ClassLogger.StreamWriter.Close()
ClassLogger.StreamWriter = Nothing
End If
End Sub
Public Shared Function CheckIsLogWritable()
If ClassLogger.OpenFile Then
Try
ClassLogger.CloseFile()
Catch e As Exception
ClassLogger.ShowErrorMessage()
Return False
End Try
Else
ClassLogger.ShowErrorMessage()
Return False
End If
Return True
End Function
Public Shared Function CheckIsLogWritable(ByVal vDateiSpeicherort As String, ByVal vDateiPrefix As String)
If ClassLogger.OpenFile(vDateiSpeicherort, vDateiPrefix) Then
Try
ClassLogger.CloseFile()
Catch e As Exception
ClassLogger.ShowErrorMessage()
Return False
End Try
Else
ClassLogger.ShowErrorMessage()
Return False
End If
Return True
End Function
Private Shared Sub ShowErrorMessage()
If Not ClassLogger.HasInformedAboutError Then
MsgBox("Beim Öffnen der Logdatei ist ein Fehler aufgetreten. Bitte stellen Sie sicher das Sie sowohl über entsprechende Schreibrechte im Verzeichnis, als auch über ausreichend Speicherplatz zum Speichern der Logdatei verfügen." & _
vbNewLine & vbNewLine & "Es wird keine Logdatei angelegt oder beschrieben." & vbNewLine & vbNewLine & "Im folgenden werden Sie über Fehler, den Log betreffend nicht weiter informiert, um den Ablauf von " & My.Application.Info.ProductName & " nicht zu stören.", _
MsgBoxStyle.Information, "Fehler beim Öffnen der Logdatei")
ClassLogger.HasInformedAboutError = True
End If
End Sub
End Class

View File

@ -93,6 +93,7 @@ Public Class ClassPMWindream
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler in GetValuesfromAuswahlliste:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler in GetValuesfromAuswahlliste:")
Return Nothing Return Nothing
End Try End Try
@ -105,6 +106,7 @@ Public Class ClassPMWindream
Dim vType = oAttribute.getVariableValue("dwAttrType") Dim vType = oAttribute.getVariableValue("dwAttrType")
Return vType.ToString Return vType.ToString
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler in Return_Type:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler in Return_Type:")
Return "" Return ""
End Try End Try
@ -124,7 +126,7 @@ Public Class ClassPMWindream
Dim i As Integer = 0 Dim i As Integer = 0
Dim indexname As String Dim indexname As String
If aValues.Length = 1 And aValues(0) = "" Then If aValues.Length = 1 And aValues(0) = "" Then
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexwert ist leer/Nothing - Keine Indexierung", False) LOGGER.Debug(" >> Indexwert ist leer/Nothing - Keine Indexierung", False)
End If End If
'Jetzt jeden Indexwert durchlaufen 'Jetzt jeden Indexwert durchlaufen
For Each aName As String In Indizes For Each aName As String In Indizes
@ -143,7 +145,7 @@ Public Class ClassPMWindream
'If indexname = "Tournr" Then 'If indexname = "Tournr" Then
' MsgBox("Index: " & indexname & vbNewLine & "wert: " & aValues(i), MsgBoxStyle.Information, "Index: " & aName.ToString) ' MsgBox("Index: " & indexname & vbNewLine & "wert: " & aValues(i), MsgBoxStyle.Information, "Index: " & aName.ToString)
'End If 'End If
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" ### Indexierung von Index: " & indexname & " ####", False) LOGGER.Debug(" ### Indexierung von Index: " & indexname & " ####", False)
'MsgBox(oDocument.aName & vbNewLine & aValues(i) & vbNewLine & vType, MsgBoxStyle.Exclamation, "Zeile 87") 'MsgBox(oDocument.aName & vbNewLine & aValues(i) & vbNewLine & vType, MsgBoxStyle.Exclamation, "Zeile 87")
Dim value = aValues(i) Dim value = aValues(i)
Dim convertValue Dim convertValue
@ -153,13 +155,13 @@ Public Class ClassPMWindream
Select Case vType Select Case vType
'Case WMObjectVariableValueTypeUndefined 'Case WMObjectVariableValueTypeUndefined
Case WMObjectVariableValueTypeString Case WMObjectVariableValueTypeString
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: WMObjectVariableValueTypeString", False) LOGGER.Debug(" >> Typ des windream-Indexes: WMObjectVariableValueTypeString", False)
convertValue = CStr(value) convertValue = CStr(value)
Case WMObjectVariableValueTypeInteger Case WMObjectVariableValueTypeInteger
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: WMObjectVariableValueTypeInteger", False) LOGGER.Debug(" >> Typ des windream-Indexes: WMObjectVariableValueTypeInteger", False)
If IsNumeric(value) = False Then If IsNumeric(value) = False Then
frmValidator.idxerr_message = "Unerlaubte Eingabe in Numerisches Feld: " & value frmValidator.idxerr_message = "Unerlaubte Eingabe in Numerisches Feld: " & value
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Achtung: Value " & value & " kann nicht in Zahl konvertiert werden!", False) LOGGER.Debug(" >> Achtung: Value " & value & " kann nicht in Zahl konvertiert werden!", False)
oDocument.Save() oDocument.Save()
oDocument.unlock() oDocument.unlock()
Return False Return False
@ -167,10 +169,11 @@ Public Class ClassPMWindream
convertValue = CInt(value) convertValue = CInt(value)
_int = True _int = True
Case WMObjectVariableValueTypeFloat Case WMObjectVariableValueTypeFloat
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: WMObjectVariableValueTypeFloat", False) LOGGER.Debug(" >> Typ des windream-Indexes: WMObjectVariableValueTypeFloat", False)
Try Try
convertValue = CDbl(value) convertValue = CDbl(value)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
frmValidator.idxerr_message = "Could't convert value '" & value & "' to double!" frmValidator.idxerr_message = "Could't convert value '" & value & "' to double!"
oDocument.Save() oDocument.Save()
oDocument.unlock() oDocument.unlock()
@ -178,10 +181,11 @@ Public Class ClassPMWindream
End Try End Try
Case WMObjectVariableValueTypeFixedPoint Case WMObjectVariableValueTypeFixedPoint
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: WMObjectVariableValueTypeFixedPoint", False) LOGGER.Debug(" >> Typ des windream-Indexes: WMObjectVariableValueTypeFixedPoint", False)
Try Try
convertValue = CDbl(value) convertValue = CDbl(value)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
frmValidator.idxerr_message = "Could't convert value '" & value & "' to double!" frmValidator.idxerr_message = "Could't convert value '" & value & "' to double!"
oDocument.Save() oDocument.Save()
oDocument.unlock() oDocument.unlock()
@ -190,24 +194,24 @@ Public Class ClassPMWindream
_dbl = True _dbl = True
Case WMObjectVariableValueTypeBoolean Case WMObjectVariableValueTypeBoolean
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: WMObjectVariableValueTypeBoolean", False) LOGGER.Debug(" >> Typ des windream-Indexes: WMObjectVariableValueTypeBoolean", False)
convertValue = CBool(value) convertValue = CBool(value)
_bool = True _bool = True
Case WMObjectVariableValueTypeDate Case WMObjectVariableValueTypeDate
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: WMObjectVariableValueTypeDate", False) LOGGER.Debug(" >> Typ des windream-Indexes: WMObjectVariableValueTypeDate", False)
_date = True _date = True
'Dim _date As Date = value 'Dim _date As Date = value
convertValue = value convertValue = value
Case WMObjectVariableValueTypeTimeStamp Case WMObjectVariableValueTypeTimeStamp
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: WMObjectVariableValueTypeTimeStamp", False) LOGGER.Debug(" >> Typ des windream-Indexes: WMObjectVariableValueTypeTimeStamp", False)
convertValue = CInt(value) convertValue = CInt(value)
Case WMObjectVariableValueTypeCurrency Case WMObjectVariableValueTypeCurrency
ClassLogger.Add(" >> Typ des windream-Indexes: WMObjectVariableValueTypeCurrency", False) LOGGER.Info(" >> Typ des windream-Indexes: WMObjectVariableValueTypeCurrency", False)
'Wegen currency muß ein eigenes Objekt vom typ Variant erzeugt werden 'Wegen currency muß ein eigenes Objekt vom typ Variant erzeugt werden
Dim aValueWrapper As System.Runtime.InteropServices.CurrencyWrapper = New System.Runtime.InteropServices.CurrencyWrapper(CDec(value)) Dim aValueWrapper As System.Runtime.InteropServices.CurrencyWrapper = New System.Runtime.InteropServices.CurrencyWrapper(CDec(value))
convertValue = aValueWrapper convertValue = aValueWrapper
Case WMObjectVariableValueTypeTime Case WMObjectVariableValueTypeTime
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: WMObjectVariableValueTypeTime", False) LOGGER.Debug(" >> Typ des windream-Indexes: WMObjectVariableValueTypeTime", False)
'If ((value)) Then 'If ((value)) Then
' convertValue = CDate(value) ' convertValue = CDate(value)
'Else 'Else
@ -216,44 +220,44 @@ Public Class ClassPMWindream
'Dim _date As Date = value 'Dim _date As Date = value
convertValue = convertValue '*_date.ToShortTimeString convertValue = convertValue '*_date.ToShortTimeString
Case WMObjectVariableValueTypeFloat Case WMObjectVariableValueTypeFloat
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: WMObjectVariableValueTypeFloat", False) LOGGER.Debug(" >> Typ des windream-Indexes: WMObjectVariableValueTypeFloat", False)
convertValue = CStr(value) convertValue = CStr(value)
Case WMObjectVariableValueTypeVariant Case WMObjectVariableValueTypeVariant
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: WMObjectVariableValueTypeVariant", False) LOGGER.Debug(" >> Typ des windream-Indexes: WMObjectVariableValueTypeVariant", False)
convertValue = CStr(value) convertValue = CStr(value)
Case WMObjectVariableValueTypeFulltext Case WMObjectVariableValueTypeFulltext
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: WMObjectVariableValueTypeFulltext", False) LOGGER.Debug(" >> Typ des windream-Indexes: WMObjectVariableValueTypeFulltext", False)
convertValue = CStr(value) convertValue = CStr(value)
Case 4100 Case 4100
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: 4100 Vektor Boolean", False) LOGGER.Debug(" >> Typ des windream-Indexes: 4100 Vektor Boolean", False)
vektor = True vektor = True
Case 4101 Case 4101
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: 4101 Vektor Date", False) LOGGER.Debug(" >> Typ des windream-Indexes: 4101 Vektor Date", False)
vektor = True vektor = True
Case 4104 Case 4104
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: 4104 Vektor Currency", False) LOGGER.Debug(" >> Typ des windream-Indexes: 4104 Vektor Currency", False)
vektor = True vektor = True
Case 4097 Case 4097
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: 4097 Vektor alphanumerisch", False) LOGGER.Debug(" >> Typ des windream-Indexes: 4097 Vektor alphanumerisch", False)
vektor = True vektor = True
Case 4098 Case 4098
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: 4098 Vektor Numerisch", False) LOGGER.Debug(" >> Typ des windream-Indexes: 4098 Vektor Numerisch", False)
vektor = True vektor = True
Case 4099 Case 4099
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: 4099 Vektor Kommazahl", False) LOGGER.Debug(" >> Typ des windream-Indexes: 4099 Vektor Kommazahl", False)
vektor = True vektor = True
Case 36865 Case 36865
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes: 36865 Vektor alphanumerisch", False) LOGGER.Debug(" >> Typ des windream-Indexes: 36865 Vektor alphanumerisch", False)
vektor = True vektor = True
Case Else Case Else
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Typ des windream-Indexes konnte nicht bestimmt werden!", False) LOGGER.Debug(" >> Typ des windream-Indexes konnte nicht bestimmt werden!", False)
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Versuch des Auslesens (vType): " & vType) LOGGER.Debug(" >> Versuch des Auslesens (vType): " & vType)
'MsgBox(vType & vbNewLine & CStr(value), MsgBoxStyle.Exclamation, "Marlon-Case Else") 'MsgBox(vType & vbNewLine & CStr(value), MsgBoxStyle.Exclamation, "Marlon-Case Else")
convertValue = "" convertValue = ""
End Select End Select
If vektor = False Then If vektor = False Then
If convertValue.ToString Is Nothing = False Then If convertValue.ToString Is Nothing = False Then
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Konvertierter Wert: '" & convertValue.ToString & "'", False) LOGGER.Debug(" >> Konvertierter Wert: '" & convertValue.ToString & "'", False)
End If End If
End If End If
'############################################################################################ '############################################################################################
@ -262,9 +266,10 @@ Public Class ClassPMWindream
If vektor = False Then If vektor = False Then
If convertValue.ToString Is Nothing = False Then If convertValue.ToString Is Nothing = False Then
Try Try
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Jetzt indexieren: oDocument.SetVariableValue(" & aName & ", " & convertValue.ToString & ")", False) LOGGER.Debug(" >> Jetzt indexieren: oDocument.SetVariableValue(" & aName & ", " & convertValue.ToString & ")", False)
Catch ex As Exception Catch ex As Exception
ClassLogger.Add(" >> Unexpected Error in Logging SetVariableValue for " & aName & ": " & ex.Message, False) LOGGER.Error(ex)
LOGGER.Info(" >> Unexpected Error in Logging SetVariableValue for " & aName & ": " & ex.Message, False)
End Try End Try
'Dim ArrValues() 'Dim ArrValues()
@ -285,13 +290,13 @@ Public Class ClassPMWindream
Else Else
oDocument.SetVariableValue(aName, convertValue) oDocument.SetVariableValue(aName, convertValue)
End If End If
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Index '" & aName & "' wurde geschrieben", False) LOGGER.Debug(" >> Index '" & aName & "' wurde geschrieben", False)
Else Else
ClassLogger.Add(" >> Kein Indexwert vorhanden", False) LOGGER.Info(" >> Kein Indexwert vorhanden", False)
End If End If
Else Else
'VEKTORFELDER, ALSO ÜBERPRÜFEN OB ERGEBNIS-ARRAY GEFÜLLT IST 'VEKTORFELDER, ALSO ÜBERPRÜFEN OB ERGEBNIS-ARRAY GEFÜLLT IST
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> VEKTORFELD: Vorbereiten des Arrays", False) LOGGER.Debug(" >> VEKTORFELD: Vorbereiten des Arrays", False)
Dim myArray() Dim myArray()
'Dim anz As Integer = 0 'Dim anz As Integer = 0
'For Each obj In aValues 'For Each obj In aValues
@ -398,7 +403,7 @@ Public Class ClassPMWindream
'Jetzt die Nachindexierung für Vektor-Felder 'Jetzt die Nachindexierung für Vektor-Felder
oDocument.SetVariableValue(aName, myArray) oDocument.SetVariableValue(aName, myArray)
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> 'SetVariableValue' für VEKTOR erfolgreich", False) LOGGER.Debug(" >> 'SetVariableValue' für VEKTOR erfolgreich", False)
End If End If
End If End If
i += 1 i += 1
@ -410,21 +415,22 @@ Public Class ClassPMWindream
'SetRights(WMObject, User) 'SetRights(WMObject, User)
oDocument.Save() oDocument.Save()
oDocument.unlock() oDocument.unlock()
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" ### Indexierung erfolgreich beendet (Save und Unlock durchgeführt) ###", False) LOGGER.Debug(" ### Indexierung erfolgreich beendet (Save und Unlock durchgeführt) ###", False)
Return True Return True
Else Else
ClassLogger.Add(" ### Dokument ist gesperrt, Indexierung nicht möglich! ###", False) LOGGER.Info(" ### Dokument ist gesperrt, Indexierung nicht möglich! ###", False)
frmValidator.idxerr_message = "Dokument " & oDocument.aName & " ist gesperrt, Indexierung nicht möglich" frmValidator.idxerr_message = "Dokument " & oDocument.aName & " ist gesperrt, Indexierung nicht möglich"
Return False Return False
End If End If
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("ClassSearchResult.RunIndexing - " & ex.Message, True) LOGGER.Error(ex)
frmValidator.idxerr_message = "Unvorhergesehener Fehler in Indexing: " & ex.Message & vbNewLine & "vType: " & vType.ToString LOGGER.Info("ClassSearchResult.RunIndexing - " & ex.Message, True)
allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Unvorhergesehener Fehler beim Indexieren der Datei: " & oDocument.aName & " - ERROR: " & ex.Message, Environment.UserName) frmValidator.idxerr_message = "Unvorhergesehener Fehler in Indexing: " & ex.Message & vbNewLine & "vType: " & vType.ToString
oDocument.Save() allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Unvorhergesehener Fehler beim Indexieren der Datei: " & oDocument.aName & " - ERROR: " & ex.Message, Environment.UserName)
oDocument.unlock() oDocument.Save()
Return False oDocument.unlock()
Return False
End Try End Try
End Function End Function
@ -445,29 +451,30 @@ Public Class ClassPMWindream
Dim value = _state Dim value = _state
Dim convertValue Dim convertValue
'Den Typ des Index-Feldes auslesen 'Den Typ des Index-Feldes auslesen
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(">> Typ des windream-Indexes: " & vType.ToString) LOGGER.Debug(">> Typ des windream-Indexes: " & vType.ToString)
Select Case (vType) Select Case (vType)
Case WMObjectVariableValueTypeBoolean Case WMObjectVariableValueTypeBoolean
convertValue = CBool(value) convertValue = CBool(value)
Case Else Case Else
ClassLogger.Add(">> Typ des windream-Indexes ist nicht BOOLEAN also Abbruch:") LOGGER.Info(">> Typ des windream-Indexes ist nicht BOOLEAN also Abbruch:")
End Select End Select
'############################################################################################ '############################################################################################
'####################### Der eigentliche Indexierungsvorgang ################################ '####################### Der eigentliche Indexierungsvorgang ################################
oDocument.SetVariableValue(Indexname, convertValue) oDocument.SetVariableValue(Indexname, convertValue)
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(">> Index '" & Indexname & "' wurde gesetzt") LOGGER.Debug(">> Index '" & Indexname & "' wurde gesetzt")
oDocument.Save() oDocument.Save()
oDocument.unlock() oDocument.unlock()
ClassLogger.Add(">> DATEI wurde erfolgreich als fertig nachindexiert gekennzeichnet") LOGGER.Info(">> DATEI wurde erfolgreich als fertig nachindexiert gekennzeichnet")
Else Else
ClassLogger.Add(">> Dokument ist gesperrt, Indexierung erst im nächsten Durchlauf!") LOGGER.Info(">> Dokument ist gesperrt, Indexierung erst im nächsten Durchlauf!")
End If End If
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("ClassSearchResult.SetfinalIndex - " & ex.Message, True) LOGGER.Error(ex)
LOGGER.Info("ClassSearchResult.SetfinalIndex - " & ex.Message, True)
'If My.Settings.vNIMailsenden = True Then 'If My.Settings.vNIMailsenden = 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
@ -486,12 +493,13 @@ Public Class ClassPMWindream
Try Try
wmsearch_exists = System.IO.File.Exists(WD_Search) wmsearch_exists = System.IO.File.Exists(WD_Search)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
wmsearch_exists = clsWM.CheckFileExists(WD_Search) wmsearch_exists = clsWM.CheckFileExists(WD_Search)
End Try End Try
If wmsearch_exists = False Then If wmsearch_exists = False Then
ClassLogger.Add(">> Windream Suche für Profil: '" & Profil & "' konnte nicht ausgeführt werden! Die Datei '" & WD_Search & "' existiert nicht!", False) LOGGER.Info(">> Windream Suche für Profil: '" & Profil & "' konnte nicht ausgeführt werden! Die Datei '" & WD_Search & "' existiert nicht!", False)
MsgBox("Windream Suche für Profil: '" & Profil & "' konnte nicht ausgeführt werden!" & vbNewLine & "Die Datei '" & WD_Search & "' existiert nicht!", MsgBoxStyle.Exclamation, "Achtung:") MsgBox("Windream Suche für Profil: '" & Profil & "' konnte nicht ausgeführt werden!" & vbNewLine & "Die Datei '" & WD_Search & "' existiert nicht!", MsgBoxStyle.Exclamation, "Achtung:")
'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.vNIMailsenden = True Then
@ -512,7 +520,8 @@ Public Class ClassPMWindream
End If End If
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add(ex.Message) LOGGER.Error(ex)
LOGGER.Info(ex.Message)
Return 0 Return 0
End Try End Try
@ -572,7 +581,7 @@ Public Class ClassPMWindream
oSearch = srchObjectType.GetSearch() oSearch = srchObjectType.GetSearch()
Case Else Case Else
ClassLogger.Add("KEIN GÜLTIGER WINDREAM-SUCHTYP") LOGGER.Info("KEIN GÜLTIGER WINDREAM-SUCHTYP")
Return Nothing Return Nothing
End Select End Select
Dim WMObjects As Object Dim WMObjects As Object
@ -580,8 +589,9 @@ Public Class ClassPMWindream
Return oSearch.execute Return oSearch.execute
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
' bei einem Fehler einen Eintrag in der Logdatei machen ' bei einem Fehler einen Eintrag in der Logdatei machen
ClassLogger.Add("Fehler in GetSearchDocuments - " & ex.Message, True) LOGGER.Info("Fehler in GetSearchDocuments - " & ex.Message, True)
Return Nothing Return Nothing
End Try End Try
@ -602,6 +612,7 @@ Public Class ClassPMWindream
IndexwertAusWindream = _dok.GetVariableValue(_indexname) IndexwertAusWindream = _dok.GetVariableValue(_indexname)
Return IndexwertAusWindream.ToString Return IndexwertAusWindream.ToString
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
'MsgBox(ex.Message) 'MsgBox(ex.Message)
Return Nothing Return Nothing
End Try End Try

View File

@ -5,7 +5,7 @@
Dim DT As DataTable = ClassDatabase.Return_Datatable(sel) Dim DT As DataTable = ClassDatabase.Return_Datatable(sel)
If Not IsNothing(DT) Then If Not IsNothing(DT) Then
If DT.Rows.Count = 1 Then If DT.Rows.Count = 1 Then
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> User is in UM_ADMINS-Group....", False) LOGGER.Debug(" >> User is in UM_ADMINS-Group....", False)
Return True Return True
Else Else
Return False Return False
@ -15,6 +15,7 @@
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in Check_User_Exists_in_UMGroups:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in Check_User_Exists_in_UMGroups:")
Return False Return False
End Try End Try

View File

@ -51,12 +51,13 @@ Public Class ClassWindream_allgemein
Try Try
' Session-Objekt instanziieren und mit dem im Client ausgewählten Server belegen ' Session-Objekt instanziieren und mit dem im Client ausgewählten Server belegen
Me.oSession = CreateObject("Windream.WMSession", Me.GetCurrentServer) Me.oSession = CreateObject("Windream.WMSession", Me.GetCurrentServer)
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> windream-Server: '" & Me.GetCurrentServer & "'", False) LOGGER.Debug(" >> windream-Server: '" & Me.GetCurrentServer & "'", False)
' Connection-Objekt instanziieren ' Connection-Objekt instanziieren
Me.oConnect = CreateObject("Windream.WMConnect") Me.oConnect = CreateObject("Windream.WMConnect")
'MsgBox("windrem init 'ed") 'MsgBox("windrem init 'ed")
Catch ex As Exception Catch ex As Exception
If LOG_ERRORS_ONLY = False Then ClassLogger.Add($"Error while creating WMConnect Object: {vbCrLf}{ex.Message}", False) LOGGER.Error(ex)
LOGGER.Debug($"Error while creating WMConnect Object: {vbCrLf}{ex.Message}", False)
Return False Return False
End Try End Try
@ -85,7 +86,7 @@ Public Class ClassWindream_allgemein
End If End If
If LOG_ERRORS_ONLY = False Then If LOG_ERRORS_ONLY = False Then
ClassLogger.Add(" >> windream-Version: '" & oSession.GetSystemInfo("WindreamVersion") & "'", False) LOGGER.Info(" >> windream-Version: '" & oSession.GetSystemInfo("WindreamVersion") & "'", False)
End If End If
' AUSGABE VON SYSTEMINFORMATIONEN ' AUSGABE VON SYSTEMINFORMATIONEN
@ -110,15 +111,17 @@ Public Class ClassWindream_allgemein
' Ordnertypen ausgelesen werden ' Ordnertypen ausgelesen werden
Me.oDokumentTypen = Me.oSession.GetWMObjectTypes(WINDREAMLib.WMEntity.WMEntityDocument) Me.oDokumentTypen = Me.oSession.GetWMObjectTypes(WINDREAMLib.WMEntity.WMEntityDocument)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
Return False Return False
End Try End Try
End If End If
If LOG_ERRORS_ONLY = False Then ClassLogger.Add($" >> windream login successful", False) LOGGER.Debug($" >> windream login successful", False)
Return True Return True
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
If Err.Number = -2147220985 Then If Err.Number = -2147220985 Then
MsgBox("Die installierte windream-Version ist nicht ausreichend für den Betrieb der Tool Collection für windream." & vbNewLine & MsgBox("Die installierte windream-Version ist nicht ausreichend für den Betrieb der Tool Collection für windream." & vbNewLine &
"Bitte kontaktieren Sie Digital Data." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & Err.Description, MsgBoxStyle.Exclamation, "Unzureichende windream-Version") "Bitte kontaktieren Sie Digital Data." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & Err.Description, MsgBoxStyle.Exclamation, "Unzureichende windream-Version")
@ -139,7 +142,7 @@ Public Class ClassWindream_allgemein
If WMSESSION_STARTSTOP_STARTUP = True Then If WMSESSION_STARTSTOP_STARTUP = True Then
'And userExistsInServerUserGroup Is Nothing 'And userExistsInServerUserGroup Is Nothing
ClassLogger.Add(">> WINDREAM-Start on ApplicationStart is active!", False) LOGGER.Info(">> WINDREAM-Start on ApplicationStart is active!", False)
Dim owindreamControlCenter = CreateObject("Wmcc.ControlCenter") Dim owindreamControlCenter = CreateObject("Wmcc.ControlCenter")
Dim owindreamIndexService = CreateObject("WMIndexServer.WMIdxSvControl") Dim owindreamIndexService = CreateObject("WMIndexServer.WMIdxSvControl")
@ -150,7 +153,8 @@ Public Class ClassWindream_allgemein
End If End If
Create_Session() Create_Session()
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Error while starting up WMCC and IndexService: " & ex.Message, True) LOGGER.Error(ex)
LOGGER.Info("Error while starting up WMCC and IndexService: " & ex.Message, True)
End Try End Try
End Function End Function
Public Function Stop_WMCC_andCo() Public Function Stop_WMCC_andCo()
@ -169,7 +173,8 @@ Public Class ClassWindream_allgemein
owindreamControlCenter.ExitCC(0) owindreamControlCenter.ExitCC(0)
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Error while Stopping WMCC and IndexService: " & ex.Message, True) LOGGER.Error(ex)
LOGGER.Info("Error while Stopping WMCC and IndexService: " & ex.Message, True)
End Try End Try
End Function End Function
#End Region #End Region
@ -189,6 +194,7 @@ Public Class ClassWindream_allgemein
Return Me.oDokumentTypen Return Me.oDokumentTypen
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Auslesen der Objekttypen") MsgBox("Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Auslesen der Objekttypen")
Return Nothing Return Nothing
End Try End Try
@ -211,6 +217,7 @@ Public Class ClassWindream_allgemein
Return objektTypenStr Return objektTypenStr
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Auslesen der Objekttypen als String") MsgBox("Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Auslesen der Objekttypen als String")
Return Nothing Return Nothing
End Try End Try
@ -222,6 +229,7 @@ Public Class ClassWindream_allgemein
Dim vType = oAttribute.getVariableValue("dwAttrType") Dim vType = oAttribute.getVariableValue("dwAttrType")
Return vType Return vType
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
Return Nothing Return Nothing
End Try End Try
@ -256,6 +264,7 @@ Public Class ClassWindream_allgemein
WMObject = oSession.GetWMObjectByPath(WINDREAMLib.WMEntity.WMEntityDocument, oNormalizedPath) WMObject = oSession.GetWMObjectByPath(WINDREAMLib.WMEntity.WMEntityDocument, oNormalizedPath)
Return True Return True
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
Return False Return False
End Try End Try
End Function End Function
@ -303,6 +312,7 @@ Public Class ClassWindream_allgemein
Return aIndexNames Return aIndexNames
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Auslesen der windream-Indexe") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Auslesen der windream-Indexe")
Return Nothing Return Nothing
End Try End Try
@ -328,6 +338,7 @@ Public Class ClassWindream_allgemein
Return Nothing Return Nothing
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Es konnte ein Objekttyp nicht erstellt werden." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Exclamation, "Objekttyp konnte nicht erstellt werden") MsgBox("Es konnte ein Objekttyp nicht erstellt werden." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Exclamation, "Objekttyp konnte nicht erstellt werden")
Return Nothing Return Nothing
End Try End Try
@ -351,6 +362,7 @@ Public Class ClassWindream_allgemein
Next Next
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Beim Prüfen ob ein Index für einen Objekttypen existiert, ist ein Fehler aufgetreten." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Prüfen auf Existenz eines Index in einem Objekttyp") MsgBox("Beim Prüfen ob ein Index für einen Objekttypen existiert, ist ein Fehler aufgetreten." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Prüfen auf Existenz eines Index in einem Objekttyp")
End Try End Try
@ -373,6 +385,7 @@ Public Class ClassWindream_allgemein
Try Try
Return Me.oSession.aLoggedin Return Me.oSession.aLoggedin
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Es konnte nicht erfolgreich geprüft werden, ob das Programm am windream-Server angemeldted ist." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler bei Loggedin-Prüfung") MsgBox("Es konnte nicht erfolgreich geprüft werden, ob das Programm am windream-Server angemeldted ist." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler bei Loggedin-Prüfung")
End Try End Try
@ -388,6 +401,7 @@ Public Class ClassWindream_allgemein
Try Try
Return Me.oBrowser.GetCurrentServer 'ClassWindream.oBrowser.GetCurrentServer Return Me.oBrowser.GetCurrentServer 'ClassWindream.oBrowser.GetCurrentServer
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Der aktuell gewählte windream-Server konnte nicht ausgelesen werden." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Auslesen des windream-Servers") MsgBox("Der aktuell gewählte windream-Server konnte nicht ausgelesen werden." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Auslesen des windream-Servers")
End Try End Try
@ -468,6 +482,7 @@ Public Class ClassWindream_allgemein
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler in GetValuesfromAuswahlliste:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler in GetValuesfromAuswahlliste:")
Return Nothing Return Nothing
End Try End Try

View File

@ -204,7 +204,6 @@
<Compile Include="ClassFinalizeDoc.vb" /> <Compile Include="ClassFinalizeDoc.vb" />
<Compile Include="ClassIndexListConverter.vb" /> <Compile Include="ClassIndexListConverter.vb" />
<Compile Include="ClassInit.vb" /> <Compile Include="ClassInit.vb" />
<Compile Include="ClassLogger.vb" />
<Compile Include="ClassSQLEditor.vb" /> <Compile Include="ClassSQLEditor.vb" />
<Compile Include="ClassSQLTypeConverter.vb" /> <Compile Include="ClassSQLTypeConverter.vb" />
<Compile Include="ClassSQLValue.vb" /> <Compile Include="ClassSQLValue.vb" />

View File

@ -24,6 +24,7 @@
Try Try
result = Convert.ToBoolean(str) result = Convert.ToBoolean(str)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
result = False result = False
End Try End Try

View File

@ -73,7 +73,8 @@ Module ModuleMySettings
Try Try
PWplainText = wrapper.DecryptData(oBuilder.Password) PWplainText = wrapper.DecryptData(oBuilder.Password)
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("- the Password '" & oBuilder.Password & "' could not be decrypted", False) LOGGER.Error(ex)
LOGGER.Info("- the Password '" & oBuilder.Password & "' could not be decrypted", False)
PWplainText = oBuilder.Password PWplainText = oBuilder.Password
End Try End Try
oConnectionString = oRow.Item("Value").ToString.Replace(oBuilder.Password, PWplainText) oConnectionString = oRow.Item("Value").ToString.Replace(oBuilder.Password, PWplainText)
@ -111,6 +112,7 @@ Module ModuleMySettings
Next Next
Return True Return True
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error in LoadMyConfig" & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Error in LoadMyConfig" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
Return False Return False
End Try End Try
@ -121,6 +123,7 @@ Module ModuleMySettings
oDataset.ReadXml(ConfigPath) oDataset.ReadXml(ConfigPath)
Return oDataset.Tables(0) Return oDataset.Tables(0)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
Dim oDataTable = CreateConfigTable() Dim oDataTable = CreateConfigTable()
oDataTable.WriteXml(GetUserConfigPath()) oDataTable.WriteXml(GetUserConfigPath())
MsgBox("Fehler beim Laden der Konfiguration. Es wurde die Standard Konfiguration geladen. Fehler:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Fehler beim Laden der Konfiguration. Es wurde die Standard Konfiguration geladen. Fehler:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
@ -192,6 +195,7 @@ Module ModuleMySettings
oTable.AcceptChanges() oTable.AcceptChanges()
Return oTable Return oTable
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error in CreateConfigTable" & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Error in CreateConfigTable" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
Return Nothing Return Nothing
End Try End Try
@ -216,6 +220,7 @@ Module ModuleMySettings
oDatatable.WriteXml(oUserConfigPath) oDatatable.WriteXml(oUserConfigPath)
Return True Return True
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error in SaveConfigValue" & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Error in SaveConfigValue" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
Return False Return False
End Try End Try

View File

@ -55,7 +55,8 @@ Public Class clsPatterns
Return result Return result
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Error in ReplaceAllValues:" & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Error in ReplaceAllValues:" & ex.Message)
End Try End Try
End Function End Function
@ -80,7 +81,8 @@ Public Class clsPatterns
Return result Return result
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Error in ReplaceInternalValues:" & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Error in ReplaceInternalValues:" & ex.Message)
End Try End Try
End Function End Function
@ -107,7 +109,8 @@ Public Class clsPatterns
Return result Return result
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Error in ReplaceUserValues:" & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Error in ReplaceUserValues:" & ex.Message)
End Try End Try
End Function End Function
@ -128,7 +131,8 @@ Public Class clsPatterns
Return result Return result
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Error in ReplaceControlValues:" & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Error in ReplaceControlValues:" & ex.Message)
End Try End Try
End Function End Function
@ -147,7 +151,8 @@ Public Class clsPatterns
Return result Return result
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Error in ReplaceWindreamIndicies:" & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Error in ReplaceWindreamIndicies:" & ex.Message)
End Try End Try
End Function End Function

View File

@ -8,6 +8,7 @@ Public Class frmAdminPasswort
Me.TBPM_KONFIGURATIONTableAdapter.Connection.ConnectionString = CONNECTION_STRING Me.TBPM_KONFIGURATIONTableAdapter.Connection.ConnectionString = CONNECTION_STRING
akt_pw = TBPM_KONFIGURATIONTableAdapter.cmdGetAdminPW akt_pw = TBPM_KONFIGURATIONTableAdapter.cmdGetAdminPW
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei Form Load:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Fehler bei Form Load:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try End Try

View File

@ -54,6 +54,7 @@ Public Class frmAdministration
tabctrl_Profilkonfig.SelectedIndex = 0 tabctrl_Profilkonfig.SelectedIndex = 0
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei Laden der Wertehilfen und Konfig-Daten: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:") MsgBox("Fehler bei Laden der Wertehilfen und Konfig-Daten: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
End Try End Try
@ -63,6 +64,7 @@ Public Class frmAdministration
'Windream initialisieren (Connection, Session, ... aufbauen) 'Windream initialisieren (Connection, Session, ... aufbauen)
'_windreamPM.Create_Session() '_windreamPM.Create_Session()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei Initialisieren von windream: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:") MsgBox("Fehler bei Initialisieren von windream: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
End Try End Try
ObjekttypenEintragen() ObjekttypenEintragen()
@ -79,6 +81,7 @@ Public Class frmAdministration
Next Next
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei Indexe_eintragen: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:") MsgBox("Fehler bei Indexe_eintragen: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
End Try End Try
End Sub End Sub
@ -119,6 +122,7 @@ Public Class frmAdministration
cmbLOGIndex.SelectedIndex = -1 cmbLOGIndex.SelectedIndex = -1
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei Indexe_eintragen: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:") MsgBox("Fehler bei Indexe_eintragen: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
PM_VEKTOR_INDEXComboBox.SelectedIndex = -1 PM_VEKTOR_INDEXComboBox.SelectedIndex = -1
cmbLOGIndex.SelectedIndex = -1 cmbLOGIndex.SelectedIndex = -1
@ -145,6 +149,7 @@ Public Class frmAdministration
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei Refresh_Profildaten: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:") MsgBox("Fehler bei Refresh_Profildaten: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
End Try End Try
@ -158,6 +163,7 @@ Public Class frmAdministration
Me.cmbObjekttypen.Items.Add(aType.aName) Me.cmbObjekttypen.Items.Add(aType.aName)
Next Next
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Es konnte keine Verbindung zum windream-Server hergestellt werden.", MsgBoxStyle.Critical, "Fehler beim Zugriff auf windream-Server") MsgBox("Es konnte keine Verbindung zum windream-Server hergestellt werden.", MsgBoxStyle.Critical, "Fehler beim Zugriff auf windream-Server")
End Try End Try
@ -184,6 +190,7 @@ Public Class frmAdministration
p.Close() p.Close()
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei öffnen der windream-Suche:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei öffnen der windream-Suche:")
End Try End Try
End Sub End Sub
@ -198,6 +205,7 @@ Public Class frmAdministration
tstrlblSave.Visible = False tstrlblSave.Visible = False
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei Speichern des Profils:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei Speichern des Profils:")
End Try End Try
@ -267,6 +275,7 @@ Public Class frmAdministration
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Laden der User zu Profil:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Laden der User zu Profil:")
End Try End Try
End Sub End Sub
@ -295,6 +304,7 @@ Public Class frmAdministration
FillProfile_User(profileId) FillProfile_User(profileId)
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox($"Error while calling FillProfile_User", MsgBoxStyle.Critical) MsgBox($"Error while calling FillProfile_User", MsgBoxStyle.Critical)
End Try End Try
End If End If
@ -308,6 +318,7 @@ Public Class frmAdministration
TBPROFILE_USERTableAdapter.CMDInsert(profileId, userId, Environment.UserName) TBPROFILE_USERTableAdapter.CMDInsert(profileId, userId, Environment.UserName)
FillProfile_User(profileId) FillProfile_User(profileId)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Hinzufügen eines Users:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Hinzufügen eines Users:")
End Try End Try
End Sub End Sub
@ -321,6 +332,7 @@ Public Class frmAdministration
TBPROFILE_USERTableAdapter.CmdDelete(profileId, userId) TBPROFILE_USERTableAdapter.CmdDelete(profileId, userId)
FillProfile_User(profileId) FillProfile_User(profileId)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Entfernen eines Users:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Entfernen eines Users:")
End Try End Try
End Sub End Sub
@ -336,6 +348,7 @@ Public Class frmAdministration
' TBPROFILE_USERTableAdapter.CMDInsert(profileId, userId, Environment.UserName) ' TBPROFILE_USERTableAdapter.CMDInsert(profileId, userId, Environment.UserName)
FillProfile_User(profileId) FillProfile_User(profileId)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Hinzufügen einer Gruppe:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Hinzufügen einer Gruppe:")
End Try End Try
End Sub End Sub
@ -351,6 +364,7 @@ Public Class frmAdministration
'TBPROFILE_USERTableAdapter.cmdDelete(userId) 'TBPROFILE_USERTableAdapter.cmdDelete(userId)
FillProfile_User(profileId) FillProfile_User(profileId)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Entfernen einer Gruppe:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Entfernen einer Gruppe:")
End Try End Try
End Sub End Sub
@ -429,6 +443,7 @@ Public Class frmAdministration
TBPM_ERROR_LOGTableAdapter.CmdDelete() TBPM_ERROR_LOGTableAdapter.CmdDelete()
Refresh_log() Refresh_log()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei Delete Log:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei Delete Log:")
End Try End Try
End Sub End Sub
@ -436,6 +451,7 @@ Public Class frmAdministration
Try Try
Me.TBPM_ERROR_LOGTableAdapter.Fill(Me.DD_DMSLiteDataSet.TBPM_ERROR_LOG) Me.TBPM_ERROR_LOGTableAdapter.Fill(Me.DD_DMSLiteDataSet.TBPM_ERROR_LOG)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei Refresh Error:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei Refresh Error:")
End Try End Try
End Sub End Sub
@ -625,6 +641,7 @@ Public Class frmAdministration
Refresh_Profildaten() Refresh_Profildaten()
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei Anlage Profilkopie:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler:") MsgBox("Fehler bei Anlage Profilkopie:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler:")
End Try End Try
@ -640,6 +657,7 @@ Public Class frmAdministration
SQLconnection.Close() SQLconnection.Close()
Return True Return True
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler in Execute_SQL: " & vbNewLine & ex.Message & vbNewLine & vbNewLine & " SQL: " & SQL) MsgBox("Fehler in Execute_SQL: " & vbNewLine & ex.Message & vbNewLine & vbNewLine & " SQL: " & SQL)
Return False Return False
End Try End Try
@ -662,6 +680,7 @@ Public Class frmAdministration
MsgBox("Das Profil " & NAMETextBox.Text & " wurde erfolgreich gelöscht!", MsgBoxStyle.Information, "Erfolgsmeldung") MsgBox("Das Profil " & NAMETextBox.Text & " wurde erfolgreich gelöscht!", MsgBoxStyle.Information, "Erfolgsmeldung")
Refresh_Profildaten() Refresh_Profildaten()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei Löschen des Profils:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler:") MsgBox("Fehler bei Löschen des Profils:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler:")
End Try End Try
@ -726,6 +745,7 @@ Public Class frmAdministration
Try Try
Me.TBDD_USERTableAdapter.Fill(Me.DD_DMSLiteDataSet.TBDD_USER) Me.TBDD_USERTableAdapter.Fill(Me.DD_DMSLiteDataSet.TBDD_USER)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei LoadUsers: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler:") MsgBox("Fehler bei LoadUsers: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler:")
End Try End Try
End Sub End Sub
@ -903,6 +923,7 @@ Public Class frmAdministration
Process.Start(USER_MANAGER_PATH) Process.Start(USER_MANAGER_PATH)
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error while startign User Manager:" & vbCrLf & ex.Message, MsgBoxStyle.Critical) MsgBox("Error while startign User Manager:" & vbCrLf & ex.Message, MsgBoxStyle.Critical)
End Try End Try
End Sub End Sub
@ -992,8 +1013,9 @@ Public Class frmAdministration
PropertyGrid1.SelectedObject = obj PropertyGrid1.SelectedObject = obj
PropertyGrid1.Refresh() PropertyGrid1.Refresh()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox($"Error while loading Final Index properties: {ex.Message}") MsgBox($"Error while loading Final Index properties: {ex.Message}")
ClassLogger.Add($"Error while loading Final Index properties: {ex.Message}") LOGGER.Info($"Error while loading Final Index properties: {ex.Message}")
End Try End Try
End Sub End Sub
@ -1066,8 +1088,9 @@ Public Class frmAdministration
Refresh_Final_indexe() Refresh_Final_indexe()
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error while Saving Final Index: " & ex.Message, MsgBoxStyle.Critical) MsgBox("Error while Saving Final Index: " & ex.Message, MsgBoxStyle.Critical)
ClassLogger.Add("Error while Saving Final Index: " & ex.Message) LOGGER.Info("Error while Saving Final Index: " & ex.Message)
Finally Finally
tsBtnCancel.Visible = False tsBtnCancel.Visible = False
BindingNavigatorAddNewItem.Visible = True BindingNavigatorAddNewItem.Visible = True

View File

@ -11,6 +11,7 @@ Public Class frmAnnotations
Me.Cursor = Cursors.Default Me.Cursor = Cursors.Default
Me.Close() Me.Close()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical) MsgBox(ex.Message, MsgBoxStyle.Critical)
Me.Cursor = Cursors.Default Me.Cursor = Cursors.Default
End Try End Try

View File

@ -13,6 +13,7 @@
cmbClients.DisplayMember = DT_CLIENT_USER.Columns("CLIENT_NAME").ColumnName cmbClients.DisplayMember = DT_CLIENT_USER.Columns("CLIENT_NAME").ColumnName
cmbClients.ValueMember = DT_CLIENT_USER.Columns("CLIENT_ID").ColumnName cmbClients.ValueMember = DT_CLIENT_USER.Columns("CLIENT_ID").ColumnName
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Unexpected Error in Loading Data: " & ex.Message, MsgBoxStyle.Critical) MsgBox("Unexpected Error in Loading Data: " & ex.Message, MsgBoxStyle.Critical)
End Try End Try
End Sub End Sub

View File

@ -125,6 +125,7 @@ Public Class frmConnection
MsgBox("Die Verbindung wurde erfolgreich aufgebaut!", MsgBoxStyle.Information, "Erfolg:") MsgBox("Die Verbindung wurde erfolgreich aufgebaut!", MsgBoxStyle.Information, "Erfolg:")
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message & vbNewLine & vbNewLine & connstr, MsgBoxStyle.Critical, "Fehler bei Verbindungsaufbau Oracle:") MsgBox(ex.Message & vbNewLine & vbNewLine & connstr, MsgBoxStyle.Critical, "Fehler bei Verbindungsaufbau Oracle:")
End Try End Try
Case Else Case Else
@ -133,6 +134,7 @@ Public Class frmConnection
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
Cursor = Cursors.Default Cursor = Cursors.Default
Dim template As String = ex.Message Dim template As String = ex.Message
MsgBox("Fehler beim Verbindungsaufbau: " & vbNewLine & ex.Message, MsgBoxStyle.Exclamation) MsgBox("Fehler beim Verbindungsaufbau: " & vbNewLine & ex.Message, MsgBoxStyle.Exclamation)
@ -149,6 +151,7 @@ Public Class frmConnection
MsgBox("Änderungen wurden erfolgreich gespeichert!", MsgBoxStyle.Information) MsgBox("Änderungen wurden erfolgreich gespeichert!", MsgBoxStyle.Information)
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler beim Speichern: " & vbNewLine & ex.Message, MsgBoxStyle.Exclamation) MsgBox("Fehler beim Speichern: " & vbNewLine & ex.Message, MsgBoxStyle.Exclamation)
End Try End Try
@ -159,6 +162,7 @@ Public Class frmConnection
load_connections() load_connections()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei Laden der Grunddaten: " & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Fehler bei Laden der Grunddaten: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try End Try
End Sub End Sub
@ -168,6 +172,7 @@ Public Class frmConnection
Me.TBDD_CONNECTIONTableAdapter.Fill(Me.DD_DMSLiteDataSet.TBDD_CONNECTION) Me.TBDD_CONNECTIONTableAdapter.Fill(Me.DD_DMSLiteDataSet.TBDD_CONNECTION)
TBDD_CONNECTIONDataGridView.AutoResizeColumns() TBDD_CONNECTIONDataGridView.AutoResizeColumns()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei Connections laden: " & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Fehler bei Connections laden: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try End Try
End Sub End Sub
@ -259,6 +264,7 @@ Public Class frmConnection
'End If 'End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei Löschen Connection: " & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Fehler bei Löschen Connection: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try End Try
End Sub End Sub
@ -321,6 +327,7 @@ Public Class frmConnection
connection.Close() connection.Close()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error while loading Databases. Default Database will be set!" & vbCrLf & ex.Message, MsgBoxStyle.Critical) MsgBox("Error while loading Databases. Default Database will be set!" & vbCrLf & ex.Message, MsgBoxStyle.Critical)
DD_LIB_Standards.clsLogger.Add("Error while loading Databases:" & ex.Message) DD_LIB_Standards.clsLogger.Add("Error while loading Databases:" & ex.Message)
Finally Finally

View File

@ -31,6 +31,7 @@ Public Class frmControl_Detail
tslblAenderungen.Visible = False tslblAenderungen.Visible = False
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Speichern:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Speichern:")
End Try End Try
@ -49,6 +50,7 @@ Public Class frmControl_Detail
End If End If
Me.TBPM_CONTROL_TABLETableAdapter.Connection.ConnectionString = CONNECTION_STRING Me.TBPM_CONTROL_TABLETableAdapter.Connection.ConnectionString = CONNECTION_STRING
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Laden der Formulardaten:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Laden der Formulardaten:")
End Try End Try

View File

@ -8,6 +8,7 @@
txtLocation.Text = CURRENT_DOC_PATH txtLocation.Text = CURRENT_DOC_PATH
txtCreation.Text = CURRENT_DOC_CREATION_DATE txtCreation.Text = CURRENT_DOC_CREATION_DATE
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
End Try End Try
End Sub End Sub

View File

@ -53,6 +53,7 @@ Public Class frmFormDesigner
Windream_ChoiceLists.Add(String.Empty) Windream_ChoiceLists.Add(String.Empty)
Windream_ChoiceLists.AddRange(clsWD_GET.GetChoiceLists()) Windream_ChoiceLists.AddRange(clsWD_GET.GetChoiceLists())
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei Initialisieren von windream: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:") MsgBox("Fehler bei Initialisieren von windream: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
End Try End Try
@ -63,11 +64,13 @@ Public Class frmFormDesigner
TBPM_CONTROL_TABLETableAdapter.Connection.ConnectionString = CONNECTION_STRING TBPM_CONTROL_TABLETableAdapter.Connection.ConnectionString = CONNECTION_STRING
TBDD_CONNECTIONTableAdapter.Fill(DD_DMSLiteDataSet.TBDD_CONNECTION) TBDD_CONNECTIONTableAdapter.Fill(DD_DMSLiteDataSet.TBDD_CONNECTION)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei Laden der Connection-Strings und Grunddaten: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:") MsgBox("Fehler bei Laden der Connection-Strings und Grunddaten: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
End Try End Try
LoadControls() LoadControls()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "error loading form:") MsgBox(ex.Message, MsgBoxStyle.Critical, "error loading form:")
End Try End Try
End Sub End Sub
@ -193,6 +196,7 @@ Public Class frmFormDesigner
End Select End Select
Next Next
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei LoadControls " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:") MsgBox("Fehler bei LoadControls " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
End Try End Try
@ -204,6 +208,7 @@ Public Class frmFormDesigner
Try Try
TBPM_PROFILE_CONTROLSBindingSource.Clear() TBPM_PROFILE_CONTROLSBindingSource.Clear()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
End Try End Try
End Sub End Sub
@ -343,8 +348,9 @@ Public Class frmFormDesigner
pnldesigner.Controls.Add(line) pnldesigner.Controls.Add(line)
End Select End Select
Catch ex As Exception Catch ex As Exception
ClassLogger.Add($"Error while Adding new control {e.Data.GetData(DataFormats.Text)}:") LOGGER.Error(ex)
ClassLogger.Add(ex) LOGGER.Info($"Error while Adding new control {e.Data.GetData(DataFormats.Text)}:")
LOGGER.Info(ex)
End Try End Try
End Sub End Sub
@ -412,6 +418,7 @@ Public Class frmFormDesigner
frmTableColumn.Show() frmTableColumn.Show()
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error while loading Column Configuration: " & vbCrLf & ex.Message, MsgBoxStyle.Critical) MsgBox("Error while loading Column Configuration: " & vbCrLf & ex.Message, MsgBoxStyle.Critical)
End Try End Try
End Sub End Sub
@ -432,6 +439,7 @@ Public Class frmFormDesigner
frmTableColumn.Text = "Konfiguration von Spalte: " & dgvColumn.Name frmTableColumn.Text = "Konfiguration von Spalte: " & dgvColumn.Name
frmTableColumn.Show() frmTableColumn.Show()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error while loading Column Configuration: " & vbCrLf & ex.Message, MsgBoxStyle.Critical) MsgBox("Error while loading Column Configuration: " & vbCrLf & ex.Message, MsgBoxStyle.Critical)
End Try End Try
End Sub End Sub
@ -449,6 +457,7 @@ Public Class frmFormDesigner
End If End If
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "DeleteControl:") MsgBox(ex.Message, MsgBoxStyle.Critical, "DeleteControl:")
End Try End Try
End Sub End Sub
@ -609,6 +618,7 @@ Public Class frmFormDesigner
End If End If
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
Mouse_IsMoving = False Mouse_IsMoving = False
End Try End Try
End Sub End Sub
@ -674,8 +684,9 @@ Public Class frmFormDesigner
Try Try
TBPM_PROFILE_CONTROLSTableAdapter.FillByProfil(DD_DMSLiteDataSet.TBPM_PROFILE_CONTROLS, ProfileId) TBPM_PROFILE_CONTROLSTableAdapter.FillByProfil(DD_DMSLiteDataSet.TBPM_PROFILE_CONTROLS, ProfileId)
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Error while executing TBPM_PROFILE_CONTROLSTableAdapter.FillByProfil in LoadControlProperties:") LOGGER.Error(ex)
ClassLogger.Add(ex) LOGGER.Info("Error while executing TBPM_PROFILE_CONTROLSTableAdapter.FillByProfil in LoadControlProperties:")
LOGGER.Info(ex)
End Try End Try
row = dt.AsEnumerable().Where(Function(r As DataRow) row = dt.AsEnumerable().Where(Function(r As DataRow)
@ -684,7 +695,7 @@ Public Class frmFormDesigner
' Control-Id wurde nicht in DataRow gefunden ' Control-Id wurde nicht in DataRow gefunden
If IsNothing(row) Then If IsNothing(row) Then
ClassLogger.Add($"Error while filtering Controls by Guid '{sender.Tag}' in LoadControlProperties:") LOGGER.Info($"Error while filtering Controls by Guid '{sender.Tag}' in LoadControlProperties:")
MsgBox($"Control mit der Id {sender.Tag} wurde nicht gefunden!", MsgBoxStyle.Critical, "Fehler beim Laden der Control Eigenschaften") MsgBox($"Control mit der Id {sender.Tag} wurde nicht gefunden!", MsgBoxStyle.Critical, "Fehler beim Laden der Control Eigenschaften")
Exit Sub Exit Sub
@ -877,9 +888,10 @@ Public Class frmFormDesigner
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
Dim msg = $"UpdateSingleValue - Fehler beim Speichern von Control (Id: {guid}, column: {columnName}): {vbCrLf}{ex.Message}" Dim msg = $"UpdateSingleValue - Fehler beim Speichern von Control (Id: {guid}, column: {columnName}): {vbCrLf}{ex.Message}"
MsgBox(msg) MsgBox(msg)
ClassLogger.Add(msg) LOGGER.Info(msg)
End Try End Try
End Sub End Sub
End Class End Class

View File

@ -46,6 +46,7 @@ Public Class frmKonfig
Me.txtpdfxchange.Text = VIEWER_XCHANGE Me.txtpdfxchange.Text = VIEWER_XCHANGE
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei Formload Grundkonfig:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei Formload Grundkonfig:")
End Try End Try
End Sub End Sub
@ -112,6 +113,7 @@ Public Class frmKonfig
End If End If
connection.Close() connection.Close()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei Datenbank-Connect:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei Datenbank-Connect:")
End Try End Try
Cursor = Cursors.Default Cursor = Cursors.Default
@ -119,14 +121,14 @@ Public Class frmKonfig
Private Sub BtnConnect_Click(sender As System.Object, e As System.EventArgs) Handles BtnConnect.Click Private Sub BtnConnect_Click(sender As System.Object, e As System.EventArgs) Handles BtnConnect.Click
Try Try
Dim con As String Dim oPlainConnectionString, oEncryptedConnectionString As String
If chkbxUserAut.Checked Then If chkbxUserAut.Checked Then
con = "Data Source=" & Me.txtServer.Text & ";Initial Catalog=" & Me.cmbDatenbank.Text & ";Trusted_Connection=True;" oPlainConnectionString = "Data Source=" & Me.txtServer.Text & ";Initial Catalog=" & Me.cmbDatenbank.Text & ";Trusted_Connection=True;"
Else Else
con = "Server=" & Me.txtServer.Text & ";Database=" & Me.cmbDatenbank.Text & ";User Id=" & Me.txtUser.Text & ";Password=" & Me.txtPasswort.Text & ";" oPlainConnectionString = "Server=" & Me.txtServer.Text & ";Database=" & Me.cmbDatenbank.Text & ";User Id=" & Me.txtUser.Text & ";Password=" & Me.txtPasswort.Text & ";"
End If End If
Dim connection As New SqlClient.SqlConnection(con) 'csb.ConnectionString) Dim connection As New SqlClient.SqlConnection(oPlainConnectionString) 'csb.ConnectionString)
'während Verbindungsaufbau Sanduhr-Mauszeiger 'während Verbindungsaufbau Sanduhr-Mauszeiger
Cursor = Cursors.WaitCursor Cursor = Cursors.WaitCursor
connection.Open() connection.Open()
@ -136,21 +138,23 @@ Public Class frmKonfig
result = MessageBox.Show("Die Verbindung wurde erfolgreich aufgebaut!" & vbNewLine & "Möchten Sie diese Verbindung nun in der Anwendung speichern?", "Erfolgsmeldung:", MessageBoxButtons.YesNo, MessageBoxIcon.Question) result = MessageBox.Show("Die Verbindung wurde erfolgreich aufgebaut!" & vbNewLine & "Möchten Sie diese Verbindung nun in der Anwendung speichern?", "Erfolgsmeldung:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = MsgBoxResult.Yes Then If result = MsgBoxResult.Yes Then
'ConnectionString in Anwendung speichern 'ConnectionString in Anwendung speichern
CONNECTION_STRING = con CONNECTION_STRING = oPlainConnectionString
ClassDatabase.Init() ClassDatabase.Init()
'Das Passwort verschlüsseln 'Das Passwort verschlüsseln
If chkbxUserAut.Checked = False Then If chkbxUserAut.Checked = False Then
Dim wrapper As New ClassEncryption("!35452didalog=") Dim wrapper As New ClassEncryption("!35452didalog=")
Dim cipherText As String = wrapper.EncryptData(Me.txtPasswort.Text) Dim cipherText As String = wrapper.EncryptData(Me.txtPasswort.Text)
Dim pw As String = cipherText Dim pw As String = cipherText
con = "Server=" & Me.txtServer.Text & ";Database=" & Me.cmbDatenbank.Text & ";User Id=" & Me.txtUser.Text & ";Password=" & pw & ";" oEncryptedConnectionString = "Server=" & Me.txtServer.Text & ";Database=" & Me.cmbDatenbank.Text & ";User Id=" & Me.txtUser.Text & ";Password=" & pw & ";"
Else
oEncryptedConnectionString = oPlainConnectionString
End If End If
'SaveMySettingsValue("MyConnectionString", con) 'SaveMySettingsValue("MyConnectionString", con)
'My.Settings.Save() 'My.Settings.Save()
CONNECTION_STRING = con CONNECTION_STRING = oPlainConnectionString
CONFIG.Config.ConnectionString = con CONFIG.Config.ConnectionString = oEncryptedConnectionString
CONFIG.Save() CONFIG.Save()
Load_ConString(CONNECTION_STRING) Load_ConString(CONNECTION_STRING)
@ -158,6 +162,7 @@ Public Class frmKonfig
Me.TBPM_KONFIGURATIONTableAdapter.Fill(Me.DD_DMSLiteDataSet.TBPM_KONFIGURATION) Me.TBPM_KONFIGURATIONTableAdapter.Fill(Me.DD_DMSLiteDataSet.TBPM_KONFIGURATION)
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
Cursor = Cursors.Default Cursor = Cursors.Default
MsgBox("Fehler beim Verbindungsaufbau: " & vbNewLine & ex.Message, MsgBoxStyle.Exclamation) MsgBox("Fehler beim Verbindungsaufbau: " & vbNewLine & ex.Message, MsgBoxStyle.Exclamation)
End Try End Try
@ -198,7 +203,6 @@ Public Class frmKonfig
End If End If
Case "system" Case "system"
rbSystem.Checked = True rbSystem.Checked = True
End Select End Select
End Sub End Sub
@ -267,7 +271,6 @@ Public Class frmKonfig
Me.Validate() Me.Validate()
Me.TBPM_KONFIGURATIONBindingSource.EndEdit() Me.TBPM_KONFIGURATIONBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.DD_DMSLiteDataSet) Me.TableAdapterManager.UpdateAll(Me.DD_DMSLiteDataSet)
End Sub End Sub
Private Sub Button1_Click_3(sender As Object, e As EventArgs) Handles Button1.Click Private Sub Button1_Click_3(sender As Object, e As EventArgs) Handles Button1.Click
@ -338,7 +341,8 @@ Public Class frmKonfig
End Sub End Sub
Private Sub btnopenlog_Click(sender As Object, e As EventArgs) Handles btnopenlog.Click Private Sub btnopenlog_Click(sender As Object, e As EventArgs) Handles btnopenlog.Click
Process.Start(ClassLogger.DateiSpeicherort) 'Process.Start(ClassLogger.DateiSpeicherort)
Process.Start(LOGCONFIG.LogDirectory)
End Sub End Sub
Private Sub txtIntervall_TextChanged(sender As Object, e As EventArgs) Handles txtIntervall.TextChanged Private Sub txtIntervall_TextChanged(sender As Object, e As EventArgs) Handles txtIntervall.TextChanged
@ -348,6 +352,7 @@ Public Class frmKonfig
Private Sub chkLogErrorsOnly_CheckedChanged(sender As Object, e As EventArgs) Handles chkLogErrorsOnly.CheckedChanged Private Sub chkLogErrorsOnly_CheckedChanged(sender As Object, e As EventArgs) Handles chkLogErrorsOnly.CheckedChanged
LOG_ERRORS_ONLY = chkLogErrorsOnly.Checked LOG_ERRORS_ONLY = chkLogErrorsOnly.Checked
LOGCONFIG.Debug = Not LOG_ERRORS_ONLY
CONFIG.Config.LogErrorsOnly = LOG_ERRORS_ONLY CONFIG.Config.LogErrorsOnly = LOG_ERRORS_ONLY
CONFIG.Save() CONFIG.Save()
'SaveMySettingsValue("LogErrorsOnly", chkLogErrorsOnly.Checked) 'SaveMySettingsValue("LogErrorsOnly", chkLogErrorsOnly.Checked)

View File

@ -31,6 +31,7 @@ Public Class frmLicense
'MsgBox("Die Lizenzen wurden erfolgreich aktualisiert!", MsgBoxStyle.Exclamation, "Erfolgsmeldung:") 'MsgBox("Die Lizenzen wurden erfolgreich aktualisiert!", MsgBoxStyle.Exclamation, "Erfolgsmeldung:")
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei New Licenses:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei New Licenses:")
End Try End Try
End Sub End Sub
@ -51,6 +52,7 @@ Public Class frmLicense
Try Try
dtp_Gültigkeit.Value = CDate(split(1)) dtp_Gültigkeit.Value = CDate(split(1))
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
Dim oLicDateString As String = split(1) Dim oLicDateString As String = split(1)
Dim cultureInfo As System.Globalization.CultureInfo Dim cultureInfo As System.Globalization.CultureInfo
cultureInfo = New System.Globalization.CultureInfo("de-DE") cultureInfo = New System.Globalization.CultureInfo("de-DE")
@ -75,6 +77,7 @@ Public Class frmLicense
End If End If
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Unexpected error in LicenseManager-RefreshLicense:") MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Unexpected error in LicenseManager-RefreshLicense:")
End Try End Try
End Sub End Sub
@ -83,6 +86,7 @@ Public Class frmLicense
Try Try
TBPM_KONFIGURATIONTableAdapter.Connection.ConnectionString = CONNECTION_STRING TBPM_KONFIGURATIONTableAdapter.Connection.ConnectionString = CONNECTION_STRING
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Fehler bei Formular Load:") MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Fehler bei Formular Load:")
End Try End Try
End Sub End Sub

View File

@ -9,6 +9,7 @@ Public Class frmLoginAdmin
Me.txtPW.Focus() Me.txtPW.Focus()
Me.txtPW.Text = "" Me.txtPW.Text = ""
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei Form Load:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Fehler bei Form Load:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try End Try
End Sub End Sub
@ -54,6 +55,7 @@ Public Class frmLoginAdmin
frmAdminPasswort.ShowDialog() frmAdminPasswort.ShowDialog()
akt_pw = TBPM_KONFIGURATIONTableAdapter.cmdGetAdminPW akt_pw = TBPM_KONFIGURATIONTableAdapter.cmdGetAdminPW
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei Admin PW:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Fehler bei Admin PW:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try End Try

View File

@ -33,7 +33,8 @@ Public Class frmMain
My.Settings.Save() My.Settings.Save()
SaveGridLayout() SaveGridLayout()
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Error in Save FormLayout: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Error in Save FormLayout: " & ex.Message)
End Try End Try
If WINDREAM?.oSession?.aLoggedin = True Then If WINDREAM?.oSession?.aLoggedin = True Then
WINDREAM.Stop_WMCC_andCo() WINDREAM.Stop_WMCC_andCo()
@ -44,11 +45,12 @@ Public Class frmMain
Try Try
ClassAllgemeineFunktionen.LoginOut("LOGOUT") ClassAllgemeineFunktionen.LoginOut("LOGOUT")
ClassLogger.Add("## ProcessManager beendet - " & Now, False) LOGGER.Info("## ProcessManager beendet - " & Now, False)
ClassLogger.Add("", False) LOGGER.Info("", False)
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("### Fehler bei LogOut") LOGGER.Error(ex)
ClassLogger.Add("### Fehler: " & ex.Message) LOGGER.Info("### Fehler bei LogOut")
LOGGER.Info("### Fehler: " & ex.Message)
End Try End Try
End Sub End Sub
@ -60,10 +62,11 @@ Public Class frmMain
End Sub End Sub
Private Sub frmMain_Load(sender As Object, e As System.EventArgs) Handles Me.Load Private Sub frmMain_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Initializing MainForm....", False) LOGGER.Debug(" >> Initializing MainForm....", False)
Try Try
UserLookAndFeel.Default.SetSkinStyle("VS2010") UserLookAndFeel.Default.SetSkinStyle("VS2010")
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
End Try End Try
@ -74,18 +77,19 @@ Public Class frmMain
End If End If
Try Try
If CultureInfo.CurrentUICulture.ThreeLetterISOLanguageName = "eng" Then If CultureInfo.CurrentUICulture.ThreeLetterISOLanguageName = "eng" Then
ClassLogger.Add("## CurrentUICulture.Name: " & CultureInfo.CurrentUICulture.Name, False) LOGGER.Info("## CurrentUICulture.Name: " & CultureInfo.CurrentUICulture.Name, False)
INDEX_DMS_ERSTELLT = "DMS Created" INDEX_DMS_ERSTELLT = "DMS Created"
INDEX_DMS_ERSTELLT_ZEIT = "DMS Created Time" INDEX_DMS_ERSTELLT_ZEIT = "DMS Created Time"
My.Settings.Save() My.Settings.Save()
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MessageBox.Show("Fehler bei Laden der CurrentUICulture-Info!", "Achtung:", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) MessageBox.Show("Fehler bei Laden der CurrentUICulture-Info!", "Achtung:", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End Try End Try
If Refresh_ConnectionString() = True Then If Refresh_ConnectionString() = True Then
Try Try
tslblLicenses.Text = "Anzahl Lizenzen: " & LICENSE_COUNT tslblLicenses.Text = "Anzahl Lizenzen: " & LICENSE_COUNT
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Initializing MainForm....", False) LOGGER.Debug(" >> Initializing MainForm....", False)
If ERROR_STATE = "NO USER" Then If ERROR_STATE = "NO USER" Then
MsgBox("Achtung: Sie sind nicht in der Userverwaltung hinterlegt!" & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:") MsgBox("Achtung: Sie sind nicht in der Userverwaltung hinterlegt!" & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:")
Me.Close() Me.Close()
@ -95,7 +99,7 @@ Public Class frmMain
Me.Close() Me.Close()
End If End If
Else Else
ClassLogger.Add(">> Username: " & Environment.UserName, False) LOGGER.Info(">> Username: " & Environment.UserName, False)
'Wenn license abgelaufen und der User nicht admin ist! 'Wenn license abgelaufen und der User nicht admin ist!
If LICENSE_EXPIRED = True Then If LICENSE_EXPIRED = True Then
If USER_IS_ADMIN = False Then If USER_IS_ADMIN = False Then
@ -113,6 +117,7 @@ Public Class frmMain
tslblUserLoggedin.Text = "Anzahl User eingeloggt: " & USERCOUNT_LOGGED_IN tslblUserLoggedin.Text = "Anzahl User eingeloggt: " & USERCOUNT_LOGGED_IN
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Fehler bei User Check:") MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Fehler bei User Check:")
End Try End Try
@ -121,6 +126,7 @@ Public Class frmMain
Decide_Load() Decide_Load()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei Laden des Formulars: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:") MsgBox("Fehler bei Laden des Formulars: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
End Try End Try
@ -133,6 +139,7 @@ Public Class frmMain
TimerRefresh.Start() TimerRefresh.Start()
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Unexpected Error in LoadForm - Step 4: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:") MsgBox("Unexpected Error in LoadForm - Step 4: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
End Try End Try
@ -151,10 +158,11 @@ Public Class frmMain
Me.Close() Me.Close()
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Unexpected Error in windream-login - Step 5: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:") MsgBox("Unexpected Error in windream-login - Step 5: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
End Try End Try
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> MainForm initialized!", False) LOGGER.Debug(" >> MainForm initialized!", False)
End If End If
End Sub End Sub
@ -169,6 +177,7 @@ Public Class frmMain
TimerReminder.Stop() TimerReminder.Stop()
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
End Try End Try
@ -188,7 +197,8 @@ Public Class frmMain
Me.Size = My.Settings.frmMainSize Me.Size = My.Settings.frmMainSize
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Error in Load FormLayout: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Error in Load FormLayout: " & ex.Message)
End Try End Try
End Sub End Sub
Function Refresh_ConnectionString() Function Refresh_ConnectionString()
@ -200,6 +210,7 @@ Public Class frmMain
Return True Return True
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Fehler bei Refresh_ConnectionString:") MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Fehler bei Refresh_ConnectionString:")
Return False Return False
End Try End Try
@ -217,7 +228,8 @@ Public Class frmMain
Dim xml As String = GetXML_LayoutName() Dim xml As String = GetXML_LayoutName()
GridView_Docs.SaveLayoutToXml(xml, OptionsLayoutBase.FullLayout) GridView_Docs.SaveLayoutToXml(xml, OptionsLayoutBase.FullLayout)
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Error while saving GridLayout: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Error while saving GridLayout: " & ex.Message)
End Try End Try
End Sub End Sub
@ -230,7 +242,8 @@ Public Class frmMain
Dim xml As String = GetXML_LayoutName() Dim xml As String = GetXML_LayoutName()
GridView_Docs.RestoreLayoutFromXml(xml, OptionsLayoutBase.FullLayout) GridView_Docs.RestoreLayoutFromXml(xml, OptionsLayoutBase.FullLayout)
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Error while restoring layout: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Error while restoring layout: " & ex.Message)
End Try End Try
End Sub End Sub
@ -258,7 +271,8 @@ Public Class frmMain
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Error while resetting layout: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Error while resetting layout: " & ex.Message)
End Try End Try
End Sub End Sub
@ -273,7 +287,8 @@ Public Class frmMain
CurrGroup.ItemLinks.Clear() CurrGroup.ItemLinks.Clear()
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("CurrGroupClear - Error: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("CurrGroupClear - Error: " & ex.Message)
End Try End Try
@ -303,7 +318,8 @@ Public Class frmMain
CurrGroup.Expanded = profileGroupOpen CurrGroup.Expanded = profileGroupOpen
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Load_Profile_items - Error: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Load_Profile_items - Error: " & ex.Message)
MsgBox("Unexpected Error in Load_Profile_items - Error: " & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Unexpected Error in Load_Profile_items - Error: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try End Try
Cursor = Cursors.Default Cursor = Cursors.Default
@ -342,7 +358,8 @@ Public Class frmMain
Return True Return True
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Load_Profiles_for_User - Error: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Load_Profiles_for_User - Error: " & ex.Message)
Return False Return False
End Try End Try
End Function End Function
@ -396,6 +413,7 @@ Public Class frmMain
Try Try
chart.Series.Clear() chart.Series.Clear()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
End Try End Try
' Set DataSource ' Set DataSource
@ -439,6 +457,7 @@ Public Class frmMain
Try Try
chart.Series.Clear() chart.Series.Clear()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
End Try End Try
' Set DataSource ' Set DataSource
@ -459,7 +478,8 @@ Public Class frmMain
End If End If
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Layout Dashboard - Error: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Layout Dashboard - Error: " & ex.Message)
MsgBox("Unexpected Error in Layout Dashboard - Error: " & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Unexpected Error in Layout Dashboard - Error: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try End Try
End Sub End Sub
@ -555,7 +575,8 @@ Public Class frmMain
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Load_single_Profile - Error: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Load_single_Profile - Error: " & ex.Message)
End Try End Try
End Sub End Sub
@ -565,6 +586,7 @@ Public Class frmMain
Try Try
GridView_Docs.Columns.Clear() GridView_Docs.Columns.Clear()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
End Try End Try
@ -640,6 +662,7 @@ Public Class frmMain
Columns_Removed = True Columns_Removed = True
GRID_INV_COL_REMOVED = True GRID_INV_COL_REMOVED = True
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
End Try End Try
@ -648,7 +671,8 @@ Public Class frmMain
Next Next
Return Columns_Removed Return Columns_Removed
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected Error in GridView_CheckInvalidColumns: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in GridView_CheckInvalidColumns: " & ex.Message)
End Try End Try
End Function End Function
Sub LoadProfile_PM() Sub LoadProfile_PM()
@ -692,14 +716,15 @@ Public Class frmMain
GridView_Docs.OptionsBehavior.AutoExpandAllGroups = True GridView_Docs.OptionsBehavior.AutoExpandAllGroups = True
GridView_Docs.OptionsView.ShowGroupedColumns = False GridView_Docs.OptionsView.ShowGroupedColumns = False
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected Error in Formatting Grid: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in Formatting Grid: " & ex.Message)
End Try End Try
Dim Columns_Removed = GridView_CheckInvalidColumns() Dim Columns_Removed = GridView_CheckInvalidColumns()
RestoreLayout() RestoreLayout()
If GridView_Docs.Columns.Count <= 2 Then If GridView_Docs.Columns.Count <= 2 Then
ClassLogger.Add("GridView_Docs.Columns.Count <= 2 - Reset_Gridlayout will be forced...", False) LOGGER.Info("GridView_Docs.Columns.Count <= 2 - Reset_Gridlayout will be forced...", False)
Reset_GridLayout() Reset_GridLayout()
End If End If
@ -708,12 +733,14 @@ Public Class frmMain
Try Try
GridView_Docs.Columns.Clear() GridView_Docs.Columns.Clear()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
End Try End Try
End If End If
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("LoadProfile_PM - Fehler: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("LoadProfile_PM - Fehler: " & ex.Message)
MsgBox("Fehler LoadProfile_PM - Fehler: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:") MsgBox("Fehler LoadProfile_PM - Fehler: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
End Try End Try
@ -725,6 +752,7 @@ Public Class frmMain
' Load_Profil() ' Load_Profil()
Check_Timer_Notification() Check_Timer_Notification()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Laden Grundeinstellungen:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Laden Grundeinstellungen:")
End Try End Try
@ -761,7 +789,8 @@ Public Class frmMain
Load_single_Profile() Load_single_Profile()
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected error in Decide_load: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Unexpected error in Decide_load: " & ex.Message)
End Try End Try
If TimerRefresh.Enabled = False Then If TimerRefresh.Enabled = False Then
TimerRefresh.Start() TimerRefresh.Start()
@ -798,13 +827,15 @@ Public Class frmMain
Try Try
splash.ShowDialog() splash.ShowDialog()
Catch ex As Exception Catch ex As Exception
ClassLogger.Add($"Error in Splash: {ex.Message}") LOGGER.Error(ex)
LOGGER.Info($"Error in Splash: {ex.Message}")
End Try End Try
Try Try
InitializeComponent() InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
Catch ex As Exception Catch ex As Exception
ClassLogger.Add($"Error in InitializeComponent: {ex.Message}") LOGGER.Error(ex)
LOGGER.Info($"Error in InitializeComponent: {ex.Message}")
End Try End Try
@ -833,6 +864,7 @@ Public Class frmMain
frmValidator.ShowDialog() frmValidator.ShowDialog()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical) MsgBox(ex.Message, MsgBoxStyle.Critical)
End Try End Try
Me.Visible = True Me.Visible = True
@ -942,6 +974,7 @@ Public Class frmMain
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Unexpected error in Item_Scope: " & ex.Message, MsgBoxStyle.Critical) MsgBox("Unexpected error in Item_Scope: " & ex.Message, MsgBoxStyle.Critical)
End Try End Try
End Sub End Sub
@ -954,11 +987,12 @@ Public Class frmMain
WINDREAM = New ClassPMWindream() WINDREAM = New ClassPMWindream()
WINDREAM.Create_Session() WINDREAM.Create_Session()
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> windream initialized", False) LOGGER.Debug(" >> windream initialized", False)
Return True Return True
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error Init_windream:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:") MsgBox("Error Init_windream:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
ClassLogger.Add(">> Unexpected error in Init_windream: " & ex.Message, True) LOGGER.Info(">> Unexpected error in Init_windream: " & ex.Message, True)
Return False Return False
End Try End Try
End Function End Function
@ -1027,6 +1061,7 @@ Public Class frmMain
End If End If
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Unhandled Error in tsmiMarkedFilesFinish_Click: " & ex.Message) MsgBox("Unhandled Error in tsmiMarkedFilesFinish_Click: " & ex.Message)
End Try End Try
End Sub End Sub
@ -1053,7 +1088,7 @@ Public Class frmMain
tslblmessage.Text = "" tslblmessage.Text = ""
If CURRENT_DT_VW_PROFILE_USER.Rows.Count = 0 Then If CURRENT_DT_VW_PROFILE_USER.Rows.Count = 0 Then
ClassLogger.Add(" >> no profiles for user: '" & Environment.UserName & "' configured!", False) LOGGER.Info(" >> no profiles for user: '" & Environment.UserName & "' configured!", False)
NO_WORKFLOWITEMS = True NO_WORKFLOWITEMS = True
tslblmessage.Text = "Keine Profile für Ihren User hinterlegt" tslblmessage.Text = "Keine Profile für Ihren User hinterlegt"
Cursor = Cursors.Default Cursor = Cursors.Default
@ -1083,7 +1118,8 @@ Public Class frmMain
Try Try
DTGRID_GROUPS = ClassDatabase.Return_Datatable($"SELECT * FROM TBPM_MAIN_VIEW_GROUPS WHERE ACTIVE = 1", True) DTGRID_GROUPS = ClassDatabase.Return_Datatable($"SELECT * FROM TBPM_MAIN_VIEW_GROUPS WHERE ACTIVE = 1", True)
Catch ex As Exception Catch ex As Exception
ClassLogger.Add(ex.Message) LOGGER.Error(ex)
LOGGER.Info(ex.Message)
End Try End Try
@ -1101,6 +1137,7 @@ Public Class frmMain
Try Try
GridView_Docs.Columns.Clear() GridView_Docs.Columns.Clear()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
End Try End Try
Cursor = Cursors.Default Cursor = Cursors.Default
@ -1150,7 +1187,7 @@ Public Class frmMain
Dim oindex As Integer = 0 Dim oindex As Integer = 0
If Not IsNothing(DTGRID_GROUPS) Then If Not IsNothing(DTGRID_GROUPS) Then
For Each oGridGroup As DataRow In DTGRID_GROUPS.Rows For Each oGridGroup As DataRow In DTGRID_GROUPS.Rows
If LOG_ERRORS_ONLY = False Then ClassLogger.Add($" >> Addig group [{oGridGroup.Item("GROUPNAME")}] for Grid...", False) LOGGER.Debug($" >> Addig group [{oGridGroup.Item("GROUPNAME")}] for Grid...", False)
GridView_Docs.Columns.Item(oGridGroup.Item("GROUPNAME")).GroupIndex = oindex GridView_Docs.Columns.Item(oGridGroup.Item("GROUPNAME")).GroupIndex = oindex
oindex += 1 oindex += 1
Next Next
@ -1164,7 +1201,7 @@ Public Class frmMain
GridView_Docs.Columns.Item("PROFILE_GROUP_COLOR").Visible = False GridView_Docs.Columns.Item("PROFILE_GROUP_COLOR").Visible = False
For index = 0 To GridView_Docs.GroupCount - 1 For index = 0 To GridView_Docs.GroupCount - 1
Dim v = GridView_Docs.GroupedColumns(index).ToString Dim v = GridView_Docs.GroupedColumns(index).ToString
If LOG_ERRORS_ONLY = False Then ClassLogger.Add($" >> Addig tag [{GridView_Docs.Columns.Item("PROFILE_ID")}] for group...", False) LOGGER.Debug($" >> Addig tag [{GridView_Docs.Columns.Item("PROFILE_ID")}] for group...", False)
GridView_Docs.GroupedColumns(index).Tag = GridView_Docs.Columns.Item("PROFILE_ID") GridView_Docs.GroupedColumns(index).Tag = GridView_Docs.Columns.Item("PROFILE_ID")
Next Next
@ -1180,7 +1217,8 @@ Public Class frmMain
GridView_Docs.Columns("Last edited").DisplayFormat.FormatType = FormatType.DateTime GridView_Docs.Columns("Last edited").DisplayFormat.FormatType = FormatType.DateTime
GridView_Docs.Columns("Last edited").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss" GridView_Docs.Columns("Last edited").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected Error in Formatting Grid: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in Formatting Grid: " & ex.Message)
End Try End Try
Try Try
For Each grid_column As GridColumn In GridView_Docs.Columns For Each grid_column As GridColumn In GridView_Docs.Columns
@ -1202,6 +1240,7 @@ Public Class frmMain
Try Try
grid_column.Dispose() grid_column.Dispose()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
End Try End Try
@ -1211,7 +1250,8 @@ Public Class frmMain
End If End If
Next Next
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected Error in Checking ColumnsGrid: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in Checking ColumnsGrid: " & ex.Message)
End Try End Try
@ -1219,7 +1259,7 @@ Public Class frmMain
'GridView_Docs.SaveLayoutToXml(GetXML_LayoutName()) 'GridView_Docs.SaveLayoutToXml(GetXML_LayoutName())
SaveGridLayout() SaveGridLayout()
If GridView_Docs.Columns.Count <= 2 Then If GridView_Docs.Columns.Count <= 2 Then
ClassLogger.Add("GridView_Docs.Columns.Count <= 2 - Reset_Gridlayout will be forced...", False) LOGGER.Info("GridView_Docs.Columns.Count <= 2 - Reset_Gridlayout will be forced...", False)
Reset_GridLayout() Reset_GridLayout()
End If End If
@ -1231,6 +1271,7 @@ Public Class frmMain
Try Try
GridView_Docs.Columns.Clear() GridView_Docs.Columns.Clear()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
End Try End Try
End If End If
@ -1240,7 +1281,8 @@ Public Class frmMain
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Load_Grid_Overview - Fehler: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Load_Grid_Overview - Fehler: " & ex.Message)
MsgBox("Fehler Load_Grid_Overview - Fehler: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:") MsgBox("Fehler Load_Grid_Overview - Fehler: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
End Try End Try
Cursor = Cursors.Default Cursor = Cursors.Default
@ -1308,6 +1350,7 @@ Public Class frmMain
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
End Try End Try
End Sub End Sub
@ -1347,6 +1390,7 @@ Public Class frmMain
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
End Try End Try
End Sub End Sub

View File

@ -35,11 +35,12 @@ Public Class frmMassValidator
'_windreamPM.Create_Session() '_windreamPM.Create_Session()
If LOG_ERRORS_ONLY = False Then ClassLogger.Add("windream initialized frmMassValidator", False) LOGGER.Debug("windream initialized frmMassValidator", False)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error Init_windream:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:") MsgBox("Error Init_windream:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
ClassLogger.Add(">> Fehler in Init_windream: " & ex.Message, True) LOGGER.Info(">> Fehler in Init_windream: " & ex.Message, True)
Exit Sub Exit Sub
End Try End Try
@ -53,10 +54,11 @@ Public Class frmMassValidator
End If End If
Try Try
DT_PROFILE_CONTROLS = ClassDatabase.Return_Datatable("SELECT * FROM TBPM_PROFILE_CONTROLS WHERE CTRL_TYPE <> 'TABLE' AND SQL_UEBERPRUEFUNG NOT LIKE '%WMI%' AND PROFIL_ID = " & CURRENT_ProfilGUID) DT_PROFILE_CONTROLS = ClassDatabase.Return_Datatable("SELECT * FROM TBPM_PROFILE_CONTROLS WHERE CTRL_TYPE <> 'TABLE' AND SQL_UEBERPRUEFUNG NOT LIKE '%WMI%' AND PROFIL_ID = " & CURRENT_ProfilGUID)
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Profile Data geladen", False) LOGGER.Debug(" >> Profile Data geladen", False)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error LOADING profile-data:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:") MsgBox("Error LOADING profile-data:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
ClassLogger.Add(">> Fehler in LOADING profile-data: " & ex.Message, True) LOGGER.Info(">> Fehler in LOADING profile-data: " & ex.Message, True)
Me.Close() Me.Close()
End Try End Try
@ -64,7 +66,7 @@ Public Class frmMassValidator
Delimiter = CURRENT_DT_CONFIG.Rows(0).Item("VEKTOR_DELIMITER") Delimiter = CURRENT_DT_CONFIG.Rows(0).Item("VEKTOR_DELIMITER")
If CURRENT_DT_PROFILE.Rows.Count = 0 Then If CURRENT_DT_PROFILE.Rows.Count = 0 Then
ClassLogger.Add(">> Profildaten konnten nicht geladen werden - Übergebenes Profil: : " & CURRENT_ProfilName, True) LOGGER.Info(">> Profildaten konnten nicht geladen werden - Übergebenes Profil: : " & CURRENT_ProfilName, True)
MsgBox("Achtung: Profildaten konnten nicht übergeben oder geladen werden.", MsgBoxStyle.Critical, "Achtung:") MsgBox("Achtung: Profildaten konnten nicht übergeben oder geladen werden.", MsgBoxStyle.Critical, "Achtung:")
Me.Close() Me.Close()
End If End If
@ -95,10 +97,10 @@ Public Class frmMassValidator
Next Next
If LOG_ERRORS_ONLY = False Then If LOG_ERRORS_ONLY = False Then
ClassLogger.Add(" >> Profildaten gespeichert", False) LOGGER.Info(" >> Profildaten gespeichert", False)
ClassLogger.Add(" >> WD_Search: " & WM_SEARCH, False) LOGGER.Info(" >> WD_Search: " & WM_SEARCH, False)
ClassLogger.Add(" >> finalProfile: " & FINAL_PROFILE, False) LOGGER.Info(" >> finalProfile: " & FINAL_PROFILE, False)
ClassLogger.Add(" >> Move2Folder: " & MOVE2Folder, False) LOGGER.Info(" >> Move2Folder: " & MOVE2Folder, False)
End If End If
@ -110,7 +112,7 @@ Public Class frmMassValidator
'Catch ex As Exception 'Catch ex As Exception
' MsgBox("Error SAVING Profile-Data:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:") ' MsgBox("Error SAVING Profile-Data:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
' ClassLogger.Add(">> Fehler in SAVING Profile-Data: " & ex.Message, True) ' LOGGER.Info(">> Fehler in SAVING Profile-Data: " & ex.Message, True)
'End Try 'End Try
'Me.lblerror.Visible = False 'Me.lblerror.Visible = False
@ -118,100 +120,100 @@ Public Class frmMassValidator
btnSave.Text = String.Format("Finish all documents (#{0})", CURRENT_DT_MASS_CHANGE_DOCS.Rows.Count.ToString) btnSave.Text = String.Format("Finish all documents (#{0})", CURRENT_DT_MASS_CHANGE_DOCS.Rows.Count.ToString)
Else Else
btnSave.Text = String.Format("Alle Dokumente (#{0}) abschliessen.", CURRENT_DT_MASS_CHANGE_DOCS.Rows.Count.ToString) btnSave.Text = String.Format("Alle Dokumente (#{0}) abschliessen.", CURRENT_DT_MASS_CHANGE_DOCS.Rows.Count.ToString)
End If End If
End Sub End Sub
Sub Load_Controls() Sub Load_Controls()
' Try ' Try
pnldesigner.Controls.Clear() pnldesigner.Controls.Clear()
'Dim dt As DataTable = DD_DMSLiteDataSet.VWPM_CONTROL_INDEX 'Dim dt As DataTable = DD_DMSLiteDataSet.VWPM_CONTROL_INDEX
For Each dr As DataRow In DT_PROFILE_CONTROLS.Rows For Each dr As DataRow In DT_PROFILE_CONTROLS.Rows
Dim ctrl As Control Dim ctrl As Control
Select Case dr.Item("CTRL_TYPE").ToString.ToUpper Select Case dr.Item("CTRL_TYPE").ToString.ToUpper
Case "TXT" Case "TXT"
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Versuch TXT zu laden", False) LOGGER.Debug(" >> Versuch TXT zu laden", False)
Dim txt As TextBox = ClassControlCreator.CreateExistingTextbox(dr, False) Dim txt As TextBox = ClassControlCreator.CreateExistingTextbox(dr, False)
AddHandler txt.GotFocus, AddressOf OnTextBoxFocus AddHandler txt.GotFocus, AddressOf OnTextBoxFocus
AddHandler txt.LostFocus, AddressOf OnTextBoxLostFocus AddHandler txt.LostFocus, AddressOf OnTextBoxLostFocus
AddHandler txt.KeyUp, AddressOf OnTextBoxKeyUp AddHandler txt.KeyUp, AddressOf OnTextBoxKeyUp
ctrl = txt ctrl = txt
Case "LBL" Case "LBL"
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Versuch LBL zu laden", False) LOGGER.Debug(" >> Versuch LBL zu laden", False)
ctrl = ClassControlCreator.CreateExistingLabel(dr, False) ctrl = ClassControlCreator.CreateExistingLabel(dr, False)
Case "CMB" Case "CMB"
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Versuch CMB zu laden", False) LOGGER.Debug(" >> Versuch CMB zu laden", False)
Dim cmb = ClassControlCreator.CreateExistingCombobox(dr, False) Dim cmb = ClassControlCreator.CreateExistingCombobox(dr, False)
AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex
#Region "CONTROL LIST" #Region "CONTROL LIST"
If ClassControlCreator.GET_CONTROL_PROPERTIES(DT_PROFILE_CONTROLS, cmb.Name) = 0 Then If ClassControlCreator.GET_CONTROL_PROPERTIES(DT_PROFILE_CONTROLS, cmb.Name) = 0 Then
MsgBox("Unexpected Error in getting control-properties (CMB load) - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) MsgBox("Unexpected Error in getting control-properties (CMB load) - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
Exit Sub Exit Sub
End If End If
Dim CURR_SQL_PROVIDER As String Dim CURR_SQL_PROVIDER As String
If CURRENT_CONTROL_ID > 0 Then If CURRENT_CONTROL_ID > 0 Then
If CURR_CON_ID > 0 Then If CURR_CON_ID > 0 Then
Dim commandsql = CURR_SELECT_CONTROL Dim commandsql = CURR_SELECT_CONTROL
If commandsql <> "" Then If commandsql <> "" Then
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> ConID > 0 And commandsql <> ''", False) LOGGER.Debug(" >> ConID > 0 And commandsql <> ''", False)
Dim connectionString As String Dim connectionString As String
Dim ConRow As DataRow() = ClassControlCreator.GET_CONNECTION_INFO(CURR_CON_ID) Dim ConRow As DataRow() = ClassControlCreator.GET_CONNECTION_INFO(CURR_CON_ID)
If ConRow Is Nothing Then If ConRow Is Nothing Then
MsgBox("Unexpected Error in getting Coninfo (CMB load) - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) MsgBox("Unexpected Error in getting Coninfo (CMB load) - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
Exit Sub Exit Sub
End If End If
For Each row As DataRow In ConRow For Each row As DataRow In ConRow
Select Case row("SQL_PROVIDER").ToString.ToLower Select Case row("SQL_PROVIDER").ToString.ToLower
Case "ms-sql" Case "ms-sql"
CURR_SQL_PROVIDER = "ms-sql" CURR_SQL_PROVIDER = "ms-sql"
If row("USERNAME") = "WINAUTH" Then If row("USERNAME") = "WINAUTH" Then
connectionString = "Data Source=" & row("SERVER") & ";Initial Catalog=" & row("DATENBANK") & ";Trusted_Connection=True;" connectionString = "Data Source=" & row("SERVER") & ";Initial Catalog=" & row("DATENBANK") & ";Trusted_Connection=True;"
Else Else
connectionString = "Data Source=" & row("SERVER") & ";Initial Catalog= " & row("DATENBANK") & ";User Id=" & row("USERNAME") & ";Password=" & row("PASSWORD") & ";" connectionString = "Data Source=" & row("SERVER") & ";Initial Catalog= " & row("DATENBANK") & ";User Id=" & row("USERNAME") & ";Password=" & row("PASSWORD") & ";"
End If End If
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> ConnString Sql-Server: " & connectionString) LOGGER.Debug(" >> ConnString Sql-Server: " & connectionString)
Case "oracle" Case "oracle"
CURR_SQL_PROVIDER = "oracle" CURR_SQL_PROVIDER = "oracle"
Dim conn As New OracleConnectionStringBuilder Dim conn As New OracleConnectionStringBuilder
Dim connstr As String Dim connstr As String
If row("SERVER") <> "" And row("DATENBANK").GetType.ToString <> "system.dbnull" Then If row("SERVER") <> "" And row("DATENBANK").GetType.ToString <> "system.dbnull" Then
connstr = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & row("SERVER") & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" & connstr = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & row("SERVER") & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" &
row("DATENBANK") & ")));User Id=" & row("USERNAME") & ";Password=" & row("PASSWORD") & ";" row("DATENBANK") & ")));User Id=" & row("USERNAME") & ";Password=" & row("PASSWORD") & ";"
Else Else
conn.DataSource = row("SERVER") conn.DataSource = row("SERVER")
conn.UserID = row("USERNAME") conn.UserID = row("USERNAME")
conn.Password = row("PASSWORD") conn.Password = row("PASSWORD")
conn.PersistSecurityInfo = True conn.PersistSecurityInfo = True
conn.ConnectionTimeout = 120 conn.ConnectionTimeout = 120
connstr = conn.ConnectionString connstr = conn.ConnectionString
End If End If
connectionString = connstr connectionString = connstr
Case Else Case Else
ClassLogger.Add("ConnectionString-Type not integrated", False) LOGGER.Info("ConnectionString-Type not integrated", False)
MsgBox("ConnectionString-Type not integrated", MsgBoxStyle.Critical) MsgBox("ConnectionString-Type not integrated", MsgBoxStyle.Critical)
Exit Sub Exit Sub
End Select End Select
Next Next
If connectionString Is Nothing = False And CURR_SQL_PROVIDER = "ms-sql" Then If connectionString Is Nothing = False And CURR_SQL_PROVIDER = "ms-sql" Then
Try Try
Dim sqlCnn As SqlClient.SqlConnection Dim sqlCnn As SqlClient.SqlConnection
Dim sqlCmd As SqlClient.SqlCommand Dim sqlCmd As SqlClient.SqlCommand
Dim adapter As New SqlClient.SqlDataAdapter Dim adapter As New SqlClient.SqlDataAdapter
Dim NewDataset As New DataSet Dim NewDataset As New DataSet
Dim i As Integer Dim i As Integer
'sql = ClassPatterns.ReplaceAllValues(sql, pnldesigner, aktivesDokument) 'sql = ClassPatterns.ReplaceAllValues(sql, pnldesigner, aktivesDokument)
@ -234,61 +236,62 @@ Public Class frmMassValidator
sqlCnn.Close() sqlCnn.Close()
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected Error in running depending sql-command: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in running depending sql-command: " & ex.Message)
Clipboard.SetText("Error: " & ex.Message & vbNewLine & "SQL: " & CURR_SELECT_CONTROL) Clipboard.SetText("Error: " & ex.Message & vbNewLine & "SQL: " & CURR_SELECT_CONTROL)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected Error in running depending sql-command:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected Error in running depending sql-command:")
End Try End Try
End If
Else
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Else Row 571", False)
End If End If
Else Else
If CURR_CHOICE_LIST <> "" Then LOGGER.Debug(" >> Else Row 571", False)
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> In add_ComboBox - AListe: " & CURR_CHOICE_LIST, False) End If
Else
If CURR_CHOICE_LIST <> "" Then
LOGGER.Debug(" >> In add_ComboBox - AListe: " & CURR_CHOICE_LIST, False)
Dim liste = WINDREAM.GetValuesfromAuswahlliste(CURR_CHOICE_LIST) Dim liste = WINDREAM.GetValuesfromAuswahlliste(CURR_CHOICE_LIST)
If liste IsNot Nothing Then If liste IsNot Nothing Then
cmb.Items.Add("") cmb.Items.Add("")
For Each index As String In liste For Each index As String In liste
cmb.Items.Add(index) cmb.Items.Add(index)
Next Next
cmb.SelectedIndex = -1 cmb.SelectedIndex = -1
Else Else
MsgBox("Resultliste windream is nothing!", MsgBoxStyle.Exclamation, CURR_CHOICE_LIST) MsgBox("Resultliste windream is nothing!", MsgBoxStyle.Exclamation, CURR_CHOICE_LIST)
End If
End If End If
End If End If
End If End If
End If
#End Region #End Region
Dim maxWith As Integer = cmb.Width Dim maxWith As Integer = cmb.Width
Using g As Graphics = Me.CreateGraphics Using g As Graphics = Me.CreateGraphics
For Each oItem As Object In cmb.Items 'Für alle Einträge... For Each oItem As Object In cmb.Items 'Für alle Einträge...
Dim g1 As Graphics = cmb.CreateGraphics Dim g1 As Graphics = cmb.CreateGraphics
If g1.MeasureString(Text, cmb.Font).Width + 30 > maxWith Then If g1.MeasureString(Text, cmb.Font).Width + 30 > maxWith Then
maxWith = g1.MeasureString(Text, cmb.Font).Width + 30 maxWith = g1.MeasureString(Text, cmb.Font).Width + 30
End If End If
g1.Dispose() g1.Dispose()
Next oItem Next oItem
End Using End Using
cmb.DropDownWidth = maxWith cmb.DropDownWidth = maxWith
ctrl = cmb ctrl = cmb
Case "DTP" Case "DTP"
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Versuch DTP zu laden", False) LOGGER.Debug(" >> Versuch DTP zu laden", False)
ctrl = ClassControlCreator.CreateExistingDatepicker(dr, False) ctrl = ClassControlCreator.CreateExistingDatepicker(dr, False)
Case "DGV" Case "DGV"
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Versuch DGV zu laden", False) LOGGER.Debug(" >> Versuch DGV zu laden", False)
Dim dgv = ClassControlCreator.CreateExistingDataGridView(dr, False) Dim dgv = ClassControlCreator.CreateExistingDataGridView(dr, False)
AddHandler dgv.RowValidating, AddressOf onDGVRowValidating AddHandler dgv.RowValidating, AddressOf onDGVRowValidating
ctrl = dgv ctrl = dgv
Case "CHK" Case "CHK"
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Versuch Checkbox zu laden", False) LOGGER.Debug(" >> Versuch Checkbox zu laden", False)
ctrl = ClassControlCreator.CreateExisingCheckbox(dr, False) ctrl = ClassControlCreator.CreateExisingCheckbox(dr, False)
'Case "TABLE" 'Case "TABLE"
' If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch Tabelle zu laden", False) ' If LogErrorsOnly = False Then LOGGER.Info(" >> Versuch Tabelle zu laden", False)
' For Each c As DataColumn In DT_PROFILE_CONTROLS.Columns ' For Each c As DataColumn In DT_PROFILE_CONTROLS.Columns
' '... = c.ColumnName ' '... = c.ColumnName
@ -300,32 +303,32 @@ Public Class frmMassValidator
' ctrl = ClassControlCreator.CreateExistingTable(dr, columns, False) ' ctrl = ClassControlCreator.CreateExistingTable(dr, columns, False)
Case "LINE" Case "LINE"
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Versuch Linie zu laden", False) LOGGER.Debug(" >> Versuch Linie zu laden", False)
ctrl = ClassControlCreator.CreateExistingLine(dr, False) ctrl = ClassControlCreator.CreateExistingLine(dr, False)
End Select End Select
If TypeOf ctrl IsNot Label Then If TypeOf ctrl IsNot Label Then
' If first_control Is Nothing Then ' If first_control Is Nothing Then
'first_control = ctrl 'first_control = ctrl
'End If 'End If
'last_control = ctrl 'last_control = ctrl
End If End If
pnldesigner.Controls.Add(ctrl) pnldesigner.Controls.Add(ctrl)
LoadSimpleData(ctrl, dr.Item("GUID")) LoadSimpleData(ctrl, dr.Item("GUID"))
Next Next
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Controls geladen", False) LOGGER.Debug(" >> Controls geladen", False)
ClassLogger.Add("", False) LOGGER.Info("", False)
CTRLS_Loaded = True CTRLS_Loaded = True
FillIndexValues() FillIndexValues()
'Catch ex As Exception 'Catch ex As Exception
' If LogErrorsOnly = False Then MsgBox("Error Load_Controls: " & ex.Message, MsgBoxStyle.Critical, "Attention error:") ' If LogErrorsOnly = False Then MsgBox("Error Load_Controls: " & ex.Message, MsgBoxStyle.Critical, "Attention error:")
' ' allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Error Load_Controls: " & ex.Message, Environment.UserName) ' ' allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Error Load_Controls: " & ex.Message, Environment.UserName)
' ClassLogger.Add("Unvorhergesehener Fehler bei Load_Controls:" & ex.Message) ' LOGGER.Info("Unvorhergesehener Fehler bei Load_Controls:" & ex.Message)
' ClassLogger.Add("", False) ' LOGGER.Info("", False)
'End Try 'End Try
@ -354,7 +357,7 @@ Public Class frmMassValidator
Dim defaultValue As String = NotNull(controlRow.Item("DEFAULT_VALUE"), String.Empty) Dim defaultValue As String = NotNull(controlRow.Item("DEFAULT_VALUE"), String.Empty)
indexname = idxname indexname = idxname
Dim LoadIDX As Boolean = controlRow.Item("LOAD_IDX_VALUE") Dim LoadIDX As Boolean = controlRow.Item("LOAD_IDX_VALUE")
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> INDEX: " & idxname & " - CONTROLNAME: " & inctrl.Name & " - LOAD IDXVALUES: " & LoadIDX.ToString, False) LOGGER.Debug(" >> INDEX: " & idxname & " - CONTROLNAME: " & inctrl.Name & " - LOAD IDXVALUES: " & LoadIDX.ToString, False)
Dim wertWD Dim wertWD
Select Case Type Select Case Type
Case "System.Windows.Forms.TextBox" Case "System.Windows.Forms.TextBox"
@ -368,7 +371,7 @@ Public Class frmMassValidator
If LoadIDX = False Or idxname = "DD PM-ONLY FOR DISPLAY" Then If LoadIDX = False Or idxname = "DD PM-ONLY FOR DISPLAY" Then
' Wenn kein Index exisitiert, defaultValue laden ' Wenn kein Index exisitiert, defaultValue laden
inctrl.Text = defaultValue inctrl.Text = defaultValue
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexwert soll nicht geladen werden.", False) LOGGER.Debug(" >> Indexwert soll nicht geladen werden.", False)
Exit Select Exit Select
End If End If
@ -381,12 +384,13 @@ Public Class frmMassValidator
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
errormessage = "Unexpected error in FillIndexValues TextBox(MI):" & vbNewLine & ex.Message & vbNewLine & "Check Logfile" errormessage = "Unexpected error in FillIndexValues TextBox(MI):" & vbNewLine & ex.Message & vbNewLine & "Check Logfile"
My.Settings.Save() My.Settings.Save()
frmError.ShowDialog() frmError.ShowDialog()
ClassLogger.Add(">> Unexpected error in FillIndexValues TextBox(MI): " & ex.Message, True) LOGGER.Info(">> Unexpected error in FillIndexValues TextBox(MI): " & ex.Message, True)
ClassLogger.Add(">> Controltype: " & controltype, False) LOGGER.Info(">> Controltype: " & controltype, False)
ClassLogger.Add(">> Indexname windream: " & indexname, False) LOGGER.Info(">> Indexname windream: " & indexname, False)
Exit Sub Exit Sub
End Try End Try
@ -404,7 +408,7 @@ Public Class frmMassValidator
Else Else
cmb.Text = defaultValue cmb.Text = defaultValue
End If End If
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexwert soll nicht geladen werden.", False) LOGGER.Debug(" >> Indexwert soll nicht geladen werden.", False)
Exit Select Exit Select
End If End If
wertWD = GetWM_Value_Multiple_Docs(idxname) wertWD = GetWM_Value_Multiple_Docs(idxname)
@ -428,7 +432,7 @@ Public Class frmMassValidator
End If End If
If idxname Is Nothing = False Then If idxname Is Nothing = False Then
If LoadIDX = False Then If LoadIDX = False Then
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexwert soll nicht geladen werden.", False) LOGGER.Debug(" >> Indexwert soll nicht geladen werden.", False)
Exit Select Exit Select
End If End If
@ -501,7 +505,7 @@ Public Class frmMassValidator
Dim chk As CheckBox = inctrl Dim chk As CheckBox = inctrl
If LoadIDX = False Then If LoadIDX = False Then
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexwert soll nicht geladen werden.", False) LOGGER.Debug(" >> Indexwert soll nicht geladen werden.", False)
If defaultValue <> String.Empty Then If defaultValue <> String.Empty Then
Dim result Dim result
@ -515,7 +519,7 @@ Public Class frmMassValidator
wertWD = GetWM_Value_Multiple_Docs(idxname) wertWD = GetWM_Value_Multiple_Docs(idxname)
If wertWD Is Nothing Then If wertWD Is Nothing Then
ClassLogger.Add(">> Zurückgegebener Wert des Wertes für Checkbox mit Indexname '" & indexname & "' ist nothing. Check defaultvalue", False) LOGGER.Info(">> Zurückgegebener Wert des Wertes für Checkbox mit Indexname '" & indexname & "' ist nothing. Check defaultvalue", False)
chk.Checked = False chk.Checked = False
Else Else
If wertWD.ToString = "" Then If wertWD.ToString = "" Then
@ -531,11 +535,11 @@ Public Class frmMassValidator
Else Else
Dim _value Dim _value
If wertWD.ToString = "System.Object[]" Then If wertWD.ToString = "System.Object[]" Then
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> CheckBoxValue with VektorField: " & idxname, False) LOGGER.Debug(" >> CheckBoxValue with VektorField: " & idxname, False)
If wertWD.length = 1 Then If wertWD.length = 1 Then
_value = wertWD(0) _value = wertWD(0)
Else ' Else '
ClassLogger.Add(" >> Vectorfield " & idxname & "' contains more then one value - First value will be used", False) LOGGER.Info(" >> Vectorfield " & idxname & "' contains more then one value - First value will be used", False)
_value = wertWD(0) _value = wertWD(0)
End If End If
Else Else
@ -549,7 +553,8 @@ Public Class frmMassValidator
chk.Checked = False chk.Checked = False
End Select End Select
Catch ex As Exception Catch ex As Exception
ClassLogger.Add(">> Unvorhergesehener Fehler bei CBool(wertWD) - CheckBox: " & ex.Message & vbNewLine & "Wert WD: " & wertWD.ToString, True) LOGGER.Error(ex)
LOGGER.Info(">> Unvorhergesehener Fehler bei CBool(wertWD) - CheckBox: " & ex.Message & vbNewLine & "Wert WD: " & wertWD.ToString, True)
chk.Checked = False chk.Checked = False
End Try End Try
End If End If
@ -566,12 +571,13 @@ Public Class frmMassValidator
End Select End Select
Next Next
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
errormessage = "Unexpected Error in FillIndexValues(MI):" & vbNewLine & ex.Message & vbNewLine & "Check Logfile" errormessage = "Unexpected Error in FillIndexValues(MI):" & vbNewLine & ex.Message & vbNewLine & "Check Logfile"
My.Settings.Save() My.Settings.Save()
frmError.ShowDialog() frmError.ShowDialog()
ClassLogger.Add(">> Unexpected Error in FillIndexValues(MIs: " & ex.Message, True) LOGGER.Info(">> Unexpected Error in FillIndexValues(MIs: " & ex.Message, True)
ClassLogger.Add(">> Controltype: " & controltype, False) LOGGER.Info(">> Controltype: " & controltype, False)
ClassLogger.Add(">> Indexname windream: " & indexname, False) LOGGER.Info(">> Indexname windream: " & indexname, False)
End Try End Try
@ -588,7 +594,8 @@ Public Class frmMassValidator
Try Try
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH")) WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH"))
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("error while creating WMObject in (textCheckIndex): " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("error while creating WMObject in (textCheckIndex): " & ex.Message)
Exit For Exit For
End Try End Try
If Not IsNothing(WMDOC) Then If Not IsNothing(WMDOC) Then
@ -599,11 +606,11 @@ Public Class frmMassValidator
tempIndexValue = WMDOC.GetVariableValue(idxname) tempIndexValue = WMDOC.GetVariableValue(idxname)
If IsNothing(tempIndexValue) Then tempIndexValue = "" If IsNothing(tempIndexValue) Then tempIndexValue = ""
If tempIndexValue.ToString = "System.Object[]" Then If tempIndexValue.ToString = "System.Object[]" Then
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> TextBox with VektorField: " & idxname, False) LOGGER.Debug(" >> TextBox with VektorField: " & idxname, False)
If tempIndexValue.Length = 1 Then If tempIndexValue.Length = 1 Then
tempIndexValue = tempIndexValue(0) tempIndexValue = tempIndexValue(0)
Else ' Else '
ClassLogger.Add(" >> Vectorfield " & idxname & "' contains more then one value - First value will be used", False) LOGGER.Info(" >> Vectorfield " & idxname & "' contains more then one value - First value will be used", False)
tempIndexValue = tempIndexValue(0) tempIndexValue = tempIndexValue(0)
End If End If
End If End If
@ -625,7 +632,8 @@ Public Class frmMassValidator
Next Next
Return valueAllOver Return valueAllOver
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected error in GetWM_Value_Multiple_Docs: " & ex.Message, True) LOGGER.Error(ex)
LOGGER.Info("Unexpected error in GetWM_Value_Multiple_Docs: " & ex.Message, True)
Return "Unexp. error in GetWM_Value_Multiple_Docs" Return "Unexp. error in GetWM_Value_Multiple_Docs"
End Try End Try
End Function End Function
@ -665,8 +673,9 @@ Public Class frmMassValidator
If value Is Nothing Then value = "" If value Is Nothing Then value = ""
Return value Return value
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Unexpected Error in ReturnVektor_IndexValue(MV): " & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Unexpected Error in ReturnVektor_IndexValue(MV): " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
ClassLogger.Add("Unexpected Error in ReturnVektor_IndexValue(MV): " & ex.Message) LOGGER.Info("Unexpected Error in ReturnVektor_IndexValue(MV): " & ex.Message)
Return "" Return ""
End Try End Try
@ -703,22 +712,23 @@ Public Class frmMassValidator
For Each ROW As DataRow In CURR_DT_DEPENDING_CONTROLS.Rows For Each ROW As DataRow In CURR_DT_DEPENDING_CONTROLS.Rows
'Try 'Try
Dim displayboxname = ROW.Item(Name).ToString Dim displayboxname = ROW.Item(Name).ToString
If Not IsDBNull(ROW.Item(1)) And Not IsDBNull(ROW.Item(2)) Then If Not IsDBNull(ROW.Item(1)) And Not IsDBNull(ROW.Item(2)) Then
Dim sql_Statement = ROW.Item(2) Dim sql_Statement = ROW.Item(2)
sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, pnldesigner, WMObject, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL) sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, pnldesigner, WMObject, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL)
_dependingControl_in_action = True _dependingControl_in_action = True
Depending_Control_Set_Result(displayboxname, sql_Statement, ROW.Item(1)) Depending_Control_Set_Result(displayboxname, sql_Statement, ROW.Item(1))
_dependingControl_in_action = False _dependingControl_in_action = False
End If End If
'Catch ex As Exception 'Catch ex As Exception
' ClassLogger.Add("Unexpected Error in displaying SQL-result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message) ' LOGGER.Info("Unexpected Error in displaying SQL-result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message)
'End Try 'End Try
Next Next
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected Error in Eventhandler OnTextBoxKeyUp - ERROR: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in Eventhandler OnTextBoxKeyUp - ERROR: " & ex.Message)
End Try End Try
End If End If
@ -728,9 +738,9 @@ Public Class frmMassValidator
Private Sub Depending_Control_Set_Result(displayboxname As String, sqlCommand As String, sqlConnection As String) Private Sub Depending_Control_Set_Result(displayboxname As String, sqlCommand As String, sqlConnection As String)
'Try 'Try
Dim resultDT As DataTable = ClassDatabase.Return_Datatable_CS(sqlCommand, sqlConnection) Dim resultDT As DataTable = ClassDatabase.Return_Datatable_CS(sqlCommand, sqlConnection)
If Not IsNothing(resultDT) Then If Not IsNothing(resultDT) Then
'Ist das Control ein Control was mehrfachwerte enthalten kann 'Ist das Control ein Control was mehrfachwerte enthalten kann
If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_DATAGRIDVIEW) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_TABLE) Then If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_DATAGRIDVIEW) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_TABLE) Then
If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Then If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Then
Dim cmbpanel As ComboBox = pnldesigner.Controls(displayboxname) Dim cmbpanel As ComboBox = pnldesigner.Controls(displayboxname)
If IsNothing(cmbpanel) Then If IsNothing(cmbpanel) Then
@ -743,17 +753,17 @@ Public Class frmMassValidator
ElseIf displayboxname.StartsWith(ClassControlCreator.PREFIX_DATAGRIDVIEW) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_TABLE) Then ElseIf displayboxname.StartsWith(ClassControlCreator.PREFIX_DATAGRIDVIEW) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_TABLE) Then
'not implemented 'not implemented
End If End If
Else Else
If resultDT.Rows.Count = 1 Then If resultDT.Rows.Count = 1 Then
pnldesigner.Controls(displayboxname).Text = resultDT.Rows(0).Item(0).ToString pnldesigner.Controls(displayboxname).Text = resultDT.Rows(0).Item(0).ToString
Else Else
pnldesigner.Controls(displayboxname).Text = "RESULT = resultDT.Rows.Count <> 1" pnldesigner.Controls(displayboxname).Text = "RESULT = resultDT.Rows.Count <> 1"
ClassLogger.Add(">> Datatable-SQL: " & sqlCommand, False) LOGGER.Info(">> Datatable-SQL: " & sqlCommand, False)
End If End If
End If End If
End If End If
'Catch ex As Exception 'Catch ex As Exception
' ClassLogger.Add("Unexpected Ersror in Depending_Control_Set_Result - ERROR: " & ex.Message) ' LOGGER.Info("Unexpected Ersror in Depending_Control_Set_Result - ERROR: " & ex.Message)
' MsgBox("Unexpected error in Depending_Control_Set_Result: " & ex.Message, MsgBoxStyle.Critical) ' MsgBox("Unexpected error in Depending_Control_Set_Result: " & ex.Message, MsgBoxStyle.Critical)
'End Try 'End Try
End Sub End Sub
@ -762,14 +772,14 @@ Public Class frmMassValidator
If cmb.SelectedIndex <> -1 And CTRLS_Loaded = True And FORM_Shown = True Then If cmb.SelectedIndex <> -1 And CTRLS_Loaded = True And FORM_Shown = True Then
' Try ' Try
If ClassControlCreator.GET_CONTROL_PROPERTIES(DT_PROFILE_CONTROLS, cmb.Name) = 0 Then If ClassControlCreator.GET_CONTROL_PROPERTIES(DT_PROFILE_CONTROLS, cmb.Name) = 0 Then
MsgBox("Unexpected Error in getting control-properties CMB - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) MsgBox("Unexpected Error in getting control-properties CMB - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
Exit Sub Exit Sub
End If End If
If ClassControlCreator.GET_DEPENDING_CONTROLS(DT_PROFILE_CONTROLS, cmb.Name) = False Then If ClassControlCreator.GET_DEPENDING_CONTROLS(DT_PROFILE_CONTROLS, cmb.Name) = False Then
MsgBox("Unexpected Error in getting dependent controls CMB- Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) MsgBox("Unexpected Error in getting dependent controls CMB- Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
Exit Sub Exit Sub
End If End If
If _dependingControl_in_action = True Or CURR_DT_DEPENDING_CONTROLS Is Nothing Then If _dependingControl_in_action = True Or CURR_DT_DEPENDING_CONTROLS Is Nothing Then
Exit Sub Exit Sub
End If End If
@ -777,24 +787,24 @@ Public Class frmMassValidator
For Each ROW As DataRow In CURR_DT_DEPENDING_CONTROLS.Rows For Each ROW As DataRow In CURR_DT_DEPENDING_CONTROLS.Rows
'Try 'Try
Dim displayboxname = ROW.Item("NAME").ToString Dim displayboxname = ROW.Item("NAME").ToString
If Not IsDBNull(ROW.Item("CONNECTION_ID")) And Not IsDBNull(ROW.Item("SQL_UEBERPRUEFUNG")) Then If Not IsDBNull(ROW.Item("CONNECTION_ID")) And Not IsDBNull(ROW.Item("SQL_UEBERPRUEFUNG")) Then
Dim sql_Statement = ROW.Item("SQL_UEBERPRUEFUNG") Dim sql_Statement = ROW.Item("SQL_UEBERPRUEFUNG")
sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, pnldesigner, WMObject, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL) sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, pnldesigner, WMObject, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL)
_dependingControl_in_action = True _dependingControl_in_action = True
Depending_Control_Set_Result(displayboxname, sql_Statement, ROW.Item(1)) Depending_Control_Set_Result(displayboxname, sql_Statement, ROW.Item(1))
_dependingControl_in_action = False _dependingControl_in_action = False
End If End If
'Catch ex As Exception 'Catch ex As Exception
' ClassLogger.Add("Unexpected Error in displaying SQL-result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message) ' LOGGER.Info("Unexpected Error in displaying SQL-result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message)
'End Try 'End Try
Next Next
'Catch ex As Exception 'Catch ex As Exception
' ClassLogger.Add("Unexpected Error in Eventhandler OnCmbselectedIndex - ERROR: " & ex.Message) ' LOGGER.Info("Unexpected Error in Eventhandler OnCmbselectedIndex - ERROR: " & ex.Message)
'End Try 'End Try
SendKeys.Send("{TAB}") SendKeys.Send("{TAB}")
@ -846,7 +856,8 @@ Public Class frmMassValidator
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected Error in Display SQL result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in Display SQL result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message)
End Try End Try
Next Next
@ -854,7 +865,8 @@ Public Class frmMassValidator
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected Error in Eventhandler Variable SQL Result - ERROR: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in Eventhandler Variable SQL Result - ERROR: " & ex.Message)
End Try End Try
End Sub End Sub
@ -924,7 +936,8 @@ Public Class frmMassValidator
Try Try
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH")) WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH"))
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message)
Exit For Exit For
End Try End Try
If Not IsNothing(WMDOC) Then If Not IsNothing(WMDOC) Then
@ -943,6 +956,7 @@ Public Class frmMassValidator
WORK_HISTORY_ENTRY = Nothing WORK_HISTORY_ENTRY = Nothing
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
WORK_HISTORY_ENTRY = Nothing WORK_HISTORY_ENTRY = Nothing
End Try End Try
If Not IsNothing(WORK_HISTORY_ENTRY) Then If Not IsNothing(WORK_HISTORY_ENTRY) Then
@ -956,7 +970,7 @@ Public Class frmMassValidator
' alle Vorkommen innerhalbd er Namenkonvention durchlaufen ' alle Vorkommen innerhalbd er Namenkonvention durchlaufen
For Each element As System.Text.RegularExpressions.Match In elemente For Each element As System.Text.RegularExpressions.Match In elemente
Try Try
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> element in RegeX WORK_HISTORY_ENTRY: " & element.Value, False) LOGGER.Debug(" >> element in RegeX WORK_HISTORY_ENTRY: " & element.Value, False)
Dim CTRL_ID = element.Value.Substring(2, element.Value.Length - 3) Dim CTRL_ID = element.Value.Substring(2, element.Value.Length - 3)
CTRL_ID = CTRL_ID.Replace("CTRLID", "") CTRL_ID = CTRL_ID.Replace("CTRLID", "")
Dim value_from_control Dim value_from_control
@ -972,6 +986,7 @@ Public Class frmMassValidator
Try Try
value_from_control = inctrl.Text value_from_control = inctrl.Text
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
value_from_control = String.Empty value_from_control = String.Empty
End Try End Try
@ -980,6 +995,7 @@ Public Class frmMassValidator
Try Try
value_from_control = cmb.Text value_from_control = cmb.Text
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
value_from_control = String.Empty value_from_control = String.Empty
End Try End Try
Case "System.Windows.Forms.DateTimePicker" Case "System.Windows.Forms.DateTimePicker"
@ -987,6 +1003,7 @@ Public Class frmMassValidator
Try Try
value_from_control = dtp.Value.ToString value_from_control = dtp.Value.ToString
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
value_from_control = String.Empty value_from_control = String.Empty
End Try End Try
@ -995,6 +1012,7 @@ Public Class frmMassValidator
Try Try
value_from_control = chk.Checked value_from_control = chk.Checked
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
value_from_control = String.Empty value_from_control = String.Empty
End Try End Try
End Select End Select
@ -1005,7 +1023,8 @@ Public Class frmMassValidator
WORK_HISTORY_ENTRY = WORK_HISTORY_ENTRY.ToString.Replace(element.Value, value_from_control) WORK_HISTORY_ENTRY = WORK_HISTORY_ENTRY.ToString.Replace(element.Value, value_from_control)
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected Error in Checking control values for WORK_HISTORY_ENTRY - ERROR: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in Checking control values for WORK_HISTORY_ENTRY - ERROR: " & ex.Message)
End Try End Try
Next Next
If WORK_HISTORY_ENTRY.ToString.Contains("@DATE") Then If WORK_HISTORY_ENTRY.ToString.Contains("@DATE") Then
@ -1086,7 +1105,7 @@ Public Class frmMassValidator
' errormessage = "Unvorhergesehener Fehler bei Abschluss:" & ex.Message ' errormessage = "Unvorhergesehener Fehler bei Abschluss:" & ex.Message
' My.Settings.Save() ' My.Settings.Save()
' frmError.ShowDialog() ' frmError.ShowDialog()
' ClassLogger.Add(">> Unvorhergesehener Fehler bei Abschluss: " & ex.Message, True) ' LOGGER.Info(">> Unvorhergesehener Fehler bei Abschluss: " & ex.Message, True)
'End Try 'End Try
Else Else
'lblerror.Visible = True 'lblerror.Visible = True
@ -1119,9 +1138,9 @@ Public Class frmMassValidator
Dim ctrl = dr.Item("NAME") Dim ctrl = dr.Item("NAME")
'Nur wenn der Name der Zeile entspricht und der Index READ_ONLY FALSE ist 'Nur wenn der Name der Zeile entspricht und der Index READ_ONLY FALSE ist
If dr.Item("NAME") = inctrl.Name And (_READ_ONLY = False Or dr.Item("SQL_UEBERPRUEFUNG") <> "") And _IDXName <> "DD PM-ONLY FOR DISPLAY" Then If dr.Item("NAME") = inctrl.Name And (_READ_ONLY = False Or dr.Item("SQL_UEBERPRUEFUNG") <> "") And _IDXName <> "DD PM-ONLY FOR DISPLAY" Then
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexierung für Control (" & CONTROL_ID & ") '" & ctrl & "' gestartet. Indexname '" & _IDXName & "'", False) LOGGER.Debug(" >> Indexierung für Control (" & CONTROL_ID & ") '" & ctrl & "' gestartet. Indexname '" & _IDXName & "'", False)
If _IDXName = "" Then If _IDXName = "" Then
ClassLogger.Add(" >> Indexname is unexpected empty.", False) LOGGER.Info(" >> Indexname is unexpected empty.", False)
Continue For Continue For
End If End If
Dim Type As String = inctrl.GetType.ToString Dim Type As String = inctrl.GetType.ToString
@ -1166,10 +1185,11 @@ Public Class frmMassValidator
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
Dim st As New StackTrace(True) Dim st As New StackTrace(True)
st = New StackTrace(ex, True) st = New StackTrace(ex, True)
MsgBox("Unvorhergesehener Fehler in Check_UpdateIndexe TextBox: " & vbNewLine & ex.Message & vbNewLine & "Line: " & st.GetFrame(0).GetFileLineNumber().ToString, MsgBoxStyle.Critical, "Error:") MsgBox("Unvorhergesehener Fehler in Check_UpdateIndexe TextBox: " & vbNewLine & ex.Message & vbNewLine & "Line: " & st.GetFrame(0).GetFileLineNumber().ToString, MsgBoxStyle.Critical, "Error:")
ClassLogger.Add("Unvorhergesehener Fehler in Check_UpdateIndexe:" & ex.Message & " - Line: " & st.GetFrame(0).GetFileLineNumber().ToString, True) LOGGER.Info("Unvorhergesehener Fehler in Check_UpdateIndexe:" & ex.Message & " - Line: " & st.GetFrame(0).GetFileLineNumber().ToString, True)
Return True Return True
End Try End Try
@ -1247,7 +1267,7 @@ Public Class frmMassValidator
End If End If
Else Else
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> DateValue is 01.01.0001 00:00:00", False) LOGGER.Debug(" >> DateValue is 01.01.0001 00:00:00", False)
End If End If
Case "System.Windows.Forms.CheckBox" Case "System.Windows.Forms.CheckBox"
Dim chk As CheckBox = inctrl Dim chk As CheckBox = inctrl
@ -1364,7 +1384,7 @@ Public Class frmMassValidator
' Dim st As New StackTrace(True) ' Dim st As New StackTrace(True)
' st = New StackTrace(ex, True) ' st = New StackTrace(ex, True)
' MsgBox("Unvorhergesehener Fehler in Check_UpdateIndexe: " & vbNewLine & ex.Message & vbNewLine & "Line: " & st.GetFrame(0).GetFileLineNumber().ToString, MsgBoxStyle.Critical, "Error:") ' MsgBox("Unvorhergesehener Fehler in Check_UpdateIndexe: " & vbNewLine & ex.Message & vbNewLine & "Line: " & st.GetFrame(0).GetFileLineNumber().ToString, MsgBoxStyle.Critical, "Error:")
' ClassLogger.Add("Unvorhergesehener Fehler in Check_UpdateIndexe:" & ex.Message & " - Line: " & st.GetFrame(0).GetFileLineNumber().ToString, True) ' LOGGER.Info("Unvorhergesehener Fehler in Check_UpdateIndexe:" & ex.Message & " - Line: " & st.GetFrame(0).GetFileLineNumber().ToString, True)
' Return True ' Return True
'End Try 'End Try
@ -1387,7 +1407,8 @@ Public Class frmMassValidator
Try Try
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH")) WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH"))
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("error while creating WMObject in (IndexMultipleFiles): " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("error while creating WMObject in (IndexMultipleFiles): " & ex.Message)
_allfine = False _allfine = False
Exit For Exit For
@ -1404,7 +1425,7 @@ Public Class frmMassValidator
'Das Array der Idnexwerte überprüfen 'Das Array der Idnexwerte überprüfen
If idxvalue Is Nothing = False Then If idxvalue Is Nothing = False Then
If idxvalue.Length() > 1 Then If idxvalue.Length() > 1 Then
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexing Index '" & idxxname & "' with Arrayvalue", False) LOGGER.Debug(" >> Indexing Index '" & idxxname & "' with Arrayvalue", False)
Dim anzahl As Integer = 0 Dim anzahl As Integer = 0
For Each indexvalue As String In idxvalue For Each indexvalue As String In idxvalue
ReDim Preserve arrValue(anzahl) ReDim Preserve arrValue(anzahl)
@ -1412,7 +1433,7 @@ Public Class frmMassValidator
anzahl += 1 anzahl += 1
Next Next
Else Else
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexing Index '" & idxxname & "' with value '" & idxvalue(0) & "'", False) LOGGER.Debug(" >> Indexing Index '" & idxxname & "' with value '" & idxvalue(0) & "'", False)
ReDim Preserve arrValue(0) ReDim Preserve arrValue(0)
arrValue(0) = idxvalue(0).ToString arrValue(0) = idxvalue(0).ToString
End If End If
@ -1427,7 +1448,8 @@ Public Class frmMassValidator
Return _allfine Return _allfine
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected error in IndexMultipleFiles: " & ex.Message.ToString, True) LOGGER.Error(ex)
LOGGER.Info("Unexpected error in IndexMultipleFiles: " & ex.Message.ToString, True)
Return False Return False
End Try End Try
End Function End Function
@ -1439,7 +1461,8 @@ Public Class frmMassValidator
Try Try
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH")) WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH"))
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message)
_allfine = False _allfine = False
missing = True missing = True
Exit For Exit For
@ -1498,7 +1521,7 @@ Public Class frmMassValidator
'Das Array der Idnexwerte überprüfen 'Das Array der Idnexwerte überprüfen
If idxvalue Is Nothing = False Then If idxvalue Is Nothing = False Then
If idxvalue.Length() > 1 Then If idxvalue.Length() > 1 Then
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexing Index '" & idxxname & "' with Arrayvalue", False) LOGGER.Debug(" >> Indexing Index '" & idxxname & "' with Arrayvalue", False)
Dim anzahl As Integer = 0 Dim anzahl As Integer = 0
For Each indexvalue As String In idxvalue For Each indexvalue As String In idxvalue
ReDim Preserve arrValue(anzahl) ReDim Preserve arrValue(anzahl)
@ -1506,7 +1529,7 @@ Public Class frmMassValidator
anzahl += 1 anzahl += 1
Next Next
Else Else
If LOG_ERRORS_ONLY = False Then ClassLogger.Add(" >> Indexing Index '" & idxxname & "' with value '" & idxvalue(0) & "'", False) LOGGER.Debug(" >> Indexing Index '" & idxxname & "' with value '" & idxvalue(0) & "'", False)
ReDim Preserve arrValue(0) ReDim Preserve arrValue(0)
arrValue(0) = idxvalue(0).ToString arrValue(0) = idxvalue(0).ToString
End If End If
@ -1516,7 +1539,8 @@ Public Class frmMassValidator
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected Error in IndexSinglefile: " & ex.Message.ToString, True) LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in IndexSinglefile: " & ex.Message.ToString, True)
Return Err() Return Err()
End Try End Try
End Function End Function
@ -1526,7 +1550,8 @@ Public Class frmMassValidator
Dim Bezeichner As String = VKTBezeichner.Replace("[%VKT", "") Dim Bezeichner As String = VKTBezeichner.Replace("[%VKT", "")
PM_String = "DD-PM" & Delimiter & Bezeichner & Delimiter & input & Delimiter & Environment.UserName & Delimiter & Now.ToString PM_String = "DD-PM" & Delimiter & Bezeichner & Delimiter & input & Delimiter & Environment.UserName & Delimiter & Now.ToString
Catch ex As Exception Catch ex As Exception
ClassLogger.Add(">> Fehler in Return_PM_VEKTOR: " & ex.Message, True) LOGGER.Error(ex)
LOGGER.Info(">> Fehler in Return_PM_VEKTOR: " & ex.Message, True)
PM_String = "DD-PM ERROR: " & ex.Message PM_String = "DD-PM ERROR: " & ex.Message
End Try End Try
Return PM_String Return PM_String
@ -1542,7 +1567,8 @@ Public Class frmMassValidator
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add(">> Fehler in Return_LOGString: " & ex.Message, True) LOGGER.Error(ex)
LOGGER.Info(">> Fehler in Return_LOGString: " & ex.Message, True)
PM_String = "DD-PM ERROR: " & ex.Message PM_String = "DD-PM ERROR: " & ex.Message
End Try End Try
Return PM_String Return PM_String

View File

@ -26,6 +26,7 @@ Public Class frmSQL_Admin
MsgBox("Der SQL-Befehl wurde erfolgreich ausgeführt!", MsgBoxStyle.Information, "Erfolgsmeldung:") MsgBox("Der SQL-Befehl wurde erfolgreich ausgeführt!", MsgBoxStyle.Information, "Erfolgsmeldung:")
connection.Close() connection.Close()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei Datenbank-Connect:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei Datenbank-Connect:")
End Try End Try
Cursor = Cursors.Default Cursor = Cursors.Default
@ -60,6 +61,7 @@ Public Class frmSQL_Admin
End With End With
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei open-File:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei open-File:")
End Try End Try

View File

@ -58,6 +58,7 @@ Public Class frmSQL_DESIGNER
'Windream initialisieren (Connection, Session, ... aufbauen) 'Windream initialisieren (Connection, Session, ... aufbauen)
'_windreamPM.Create_Session() '_windreamPM.Create_Session()
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei Initialisieren von windream: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:") MsgBox("Fehler bei Initialisieren von windream: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
End Try End Try
cmbIndexe.Items.Clear() cmbIndexe.Items.Clear()
@ -82,6 +83,7 @@ Public Class frmSQL_DESIGNER
btnAddControl.Visible = False btnAddControl.Visible = False
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Unexpected Error while loading form: " & ex.Message, MsgBoxStyle.Critical) MsgBox("Unexpected Error while loading form: " & ex.Message, MsgBoxStyle.Critical)
End Try End Try
@ -183,7 +185,7 @@ Public Class frmSQL_DESIGNER
Return dataset Return dataset
Else Else
If LOG_ERRORS_ONLY = True Then ClassLogger.Add(" >> It's an Oracle-Connection (ExecuteWithConnection)", False) If LOG_ERRORS_ONLY = True Then LOGGER.Info(" >> It's an Oracle-Connection (ExecuteWithConnection)", False)
Dim sqlConnection As OracleConnection Dim sqlConnection As OracleConnection
Dim sqlCommand As OracleCommand Dim sqlCommand As OracleCommand
Dim sqlAdapter As New OracleDataAdapter Dim sqlAdapter As New OracleDataAdapter
@ -204,7 +206,8 @@ Public Class frmSQL_DESIGNER
End If End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add(" - Unvorhergesehener Fehler bei TestSQL - Fehler: " & vbNewLine & ex.Message) LOGGER.Error(ex)
LOGGER.Info(" - Unvorhergesehener Fehler bei TestSQL - Fehler: " & vbNewLine & ex.Message)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei TestSQL:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei TestSQL:")
Return Nothing Return Nothing
End Try End Try

View File

@ -112,7 +112,7 @@ Public NotInheritable Class frmSplash
Private Sub bw_RunWorkerCompleted(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs) Private Sub bw_RunWorkerCompleted(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs)
' Bei Fehler MsgBox anzeigen und Programm beenden ' Bei Fehler MsgBox anzeigen und Programm beenden
If e.Error IsNot Nothing Then If e.Error IsNot Nothing Then
ClassLogger.Add("Unexpected error in Initializing application....") LOGGER.Info("Unexpected error in Initializing application....")
MsgBox(e.Error.Message, MsgBoxStyle.Critical, "Unexpected error in Initializing application") MsgBox(e.Error.Message, MsgBoxStyle.Critical, "Unexpected error in Initializing application")
Application.Exit() Application.Exit()
End If End If

View File

@ -13,6 +13,7 @@ Public Class frmUserKonfig_AddUsers
Dim XMLPath = System.IO.Path.Combine(Application.UserAppDataPath(), Filename) Dim XMLPath = System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
GridViewUsers.SaveLayoutToXml(XMLPath) GridViewUsers.SaveLayoutToXml(XMLPath)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error in SaveGrid_Layout:" & vbNewLine & ex.Message) MsgBox("Error in SaveGrid_Layout:" & vbNewLine & ex.Message)
End Try End Try
End Sub End Sub
@ -40,6 +41,7 @@ Public Class frmUserKonfig_AddUsers
'DT_GROUPS_EXCLUSIVE = ClassDatabase.Return_Datatable(sql) 'DT_GROUPS_EXCLUSIVE = ClassDatabase.Return_Datatable(sql)
GetGroups(USER_USERNAME) GetGroups(USER_USERNAME)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error in Load Groups:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Error in Load Groups:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try End Try
Try Try
@ -51,6 +53,7 @@ Public Class frmUserKonfig_AddUsers
GridViewUsers.ClearSelection() GridViewUsers.ClearSelection()
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error in Load Grid_Layout:" & vbNewLine & ex.Message) MsgBox("Error in Load Grid_Layout:" & vbNewLine & ex.Message)
End Try End Try
Cursor = Cursors.Default Cursor = Cursors.Default
@ -78,6 +81,7 @@ Public Class frmUserKonfig_AddUsers
Next Next
Return groups Return groups
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error in GetActiveDirectoryGroups:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Error in GetActiveDirectoryGroups:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
Return Nothing Return Nothing
End Try End Try
@ -114,6 +118,7 @@ Public Class frmUserKonfig_AddUsers
Try Try
newUserRow("Username") = userldap.SamAccountName newUserRow("Username") = userldap.SamAccountName
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
newUserRow("Username") = user.ToString newUserRow("Username") = user.ToString
End Try End Try
Dim email As String = userldap.EmailAddress Dim email As String = userldap.EmailAddress
@ -121,7 +126,8 @@ Public Class frmUserKonfig_AddUsers
newUserRow("Surname") = NAME newUserRow("Surname") = NAME
newUserRow("Email") = email newUserRow("Email") = email
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Unexpected Error in Read User LDAP-Configurations: " & vbNewLine) LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in Read User LDAP-Configurations: " & vbNewLine)
End Try End Try
DT_ADD_USERS.Rows.Add(newUserRow) DT_ADD_USERS.Rows.Add(newUserRow)
TBAD_UsersBindingSource.DataSource = DT_ADD_USERS TBAD_UsersBindingSource.DataSource = DT_ADD_USERS
@ -144,12 +150,14 @@ Public Class frmUserKonfig_AddUsers
Try Try
PRENAME = row.Item(2) PRENAME = row.Item(2)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
PRENAME = "" PRENAME = ""
End Try End Try
Dim NAME As String = row.Item(3) Dim NAME As String = row.Item(3)
Try Try
NAME = row.Item(3) NAME = row.Item(3)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
NAME = "" NAME = ""
End Try End Try
@ -157,6 +165,7 @@ Public Class frmUserKonfig_AddUsers
Try Try
email = row.Item(4) email = row.Item(4)
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
email = "" email = ""
End Try End Try
Dim SQL Dim SQL
@ -165,7 +174,7 @@ Public Class frmUserKonfig_AddUsers
If ClassDatabase.Execute_non_Query(SQL, False) = True Then If ClassDatabase.Execute_non_Query(SQL, False) = True Then
Dim ID = ClassDatabase.Execute_Scalar("SELECT MAX(GUID) FROM TBDD_USER", CONNECTION_STRING) Dim ID = ClassDatabase.Execute_Scalar("SELECT MAX(GUID) FROM TBDD_USER", CONNECTION_STRING)
Dim msg = String.Format(">> USER {0}, {1} - {2} ADDED TO CONFIGURATION", NAME, PRENAME, USERNAME) Dim msg = String.Format(">> USER {0}, {1} - {2} ADDED TO CONFIGURATION", NAME, PRENAME, USERNAME)
ClassLogger.Add(msg, False) LOGGER.Info(msg, False)
SQL = String.Format("INSERT INTO TBDD_USER_MODULES (USER_ID,MODULE_ID) VALUES ({0},(SELECT GUID FROM TBDD_MODULES WHERE SHORT_NAME = 'PM'))", ID) SQL = String.Format("INSERT INTO TBDD_USER_MODULES (USER_ID,MODULE_ID) VALUES ({0},(SELECT GUID FROM TBDD_MODULES WHERE SHORT_NAME = 'PM'))", ID)
If ClassDatabase.Execute_non_Query(SQL, False) = False Then If ClassDatabase.Execute_non_Query(SQL, False) = False Then
MsgBox("Attention: could not add user to module! - Please check the log.", MsgBoxStyle.Exclamation) MsgBox("Attention: could not add user to module! - Please check the log.", MsgBoxStyle.Exclamation)
@ -204,6 +213,7 @@ Public Class frmUserKonfig_AddUsers
Return True Return True
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error in UserExists: " & vbNewLine & ex.Message) MsgBox("Error in UserExists: " & vbNewLine & ex.Message)
Return False Return False
End Try End Try
@ -284,9 +294,9 @@ Public Class frmUserKonfig_AddUsers
And Not groupname.StartsWith("Einstellungen eingehender") And Not groupname.StartsWith("Windows-Auth") And Not groupname.StartsWith("Terminalserver-Liz") And Not groupname.StartsWith("Zulässige") And Not groupname.StartsWith("Abgelehnte") And Not groupname.StartsWith("Schreibgeschützte Domänen") _ And Not groupname.StartsWith("Einstellungen eingehender") And Not groupname.StartsWith("Windows-Auth") And Not groupname.StartsWith("Terminalserver-Liz") And Not groupname.StartsWith("Zulässige") And Not groupname.StartsWith("Abgelehnte") And Not groupname.StartsWith("Schreibgeschützte Domänen") _
And Not groupname.StartsWith("Klonbare") And Not groupname.StartsWith("PrivUser") And Not groupname.StartsWith("Protected User") And Not groupname.StartsWith("Dns") And Not groupname.StartsWith("DHCP") And Not groupname.StartsWith("IIS_IUSR") And Not groupname.StartsWith("Richtlinien-Ersteller") _ And Not groupname.StartsWith("Klonbare") And Not groupname.StartsWith("PrivUser") And Not groupname.StartsWith("Protected User") And Not groupname.StartsWith("Dns") And Not groupname.StartsWith("DHCP") And Not groupname.StartsWith("IIS_IUSR") And Not groupname.StartsWith("Richtlinien-Ersteller") _
And Not groupname.StartsWith("Abgelehnte RODC-Kenn") And Not groupname.StartsWith("Reporting") Then And Not groupname.StartsWith("Abgelehnte RODC-Kenn") And Not groupname.StartsWith("Reporting") Then
' Console.WriteLine(CStr(sidResult.Properties("name")(0))) ' Console.WriteLine(CStr(sidResult.Properties("name")(0)))
lbGroups.Items.Add(groupname) lbGroups.Items.Add(groupname)
End If End If
' End If ' End If
'End If 'End If
@ -297,6 +307,7 @@ Public Class frmUserKonfig_AddUsers
lblgroup_refresh() lblgroup_refresh()
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error in GetGroups:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Error in GetGroups:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try End Try
Cursor = Cursors.Default Cursor = Cursors.Default
@ -325,6 +336,7 @@ Public Class frmUserKonfig_AddUsers
lblgroup_refresh() lblgroup_refresh()
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Error in Load Groups:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Error in Load Groups:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try End Try
Cursor = Cursors.Default Cursor = Cursors.Default

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,8 @@
My.Settings.frmValidatorSearchPosition = Me.Location My.Settings.frmValidatorSearchPosition = Me.Location
My.Settings.Save() My.Settings.Save()
Catch ex As Exception Catch ex As Exception
ClassLogger.Add("Error in Save FormLayout: " & ex.Message) LOGGER.Error(ex)
LOGGER.Info("Error in Save FormLayout: " & ex.Message)
End Try End Try
End Sub End Sub