diff --git a/.vs/ToolCollection/FileContentIndex/read.lock b/.vs/ToolCollection/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/ToolCollection/ClassNIWindream.vb b/ToolCollection/ClassNIWindream.vb index 2cbf953..448e424 100644 --- a/ToolCollection/ClassNIWindream.vb +++ b/ToolCollection/ClassNIWindream.vb @@ -845,6 +845,10 @@ Public Class ClassNIWindream Case 8204 oIndexValue = oIndexValue.Replace(" ", "") + Return CInt(oIndexValue) + Case WMObjectVariableValueTypeInteger + oIndexValue = oIndexValue.Replace(" ", "") + Return CInt(oIndexValue) Case WMObjectVariableValueTypeCurrency Dim aValueWrapper As System.Runtime.InteropServices.CurrencyWrapper = New System.Runtime.InteropServices.CurrencyWrapper(CDec(oIndexValue)) diff --git a/ToolCollection/ClassWD_Rechte.vb b/ToolCollection/ClassWD_Rechte.vb index 0ddfeb7..278af94 100644 --- a/ToolCollection/ClassWD_Rechte.vb +++ b/ToolCollection/ClassWD_Rechte.vb @@ -100,6 +100,8 @@ Public Class ClassWD_Rechte End Try End If + _Logger.Debug("#RightModule successfully initialized!") + Return True Catch ex As Exception If Err.Number = -2147220985 Then @@ -198,6 +200,7 @@ Public Class ClassWD_Rechte Else SessionAsUser = aSession If aSession.aLoggedin = True Then + _Logger.Debug($"#Impersonate login [{UserName}] successfull!") Return SessionAsUser End If @@ -538,6 +541,7 @@ Public Class ClassWD_Rechte Else _msg = "Right for User: '" & UserOrGroup.aName & "'""" End If + _Logger.Debug($"Working on {_msg} ...") If Err.Number <> 0 Then Dim msg = "Fehler bei Zugriff auf UserGroupRelation - Err.Number: " & Err.Number & vbCrLf & Err.Description @@ -552,21 +556,33 @@ Public Class ClassWD_Rechte 'einem Rechteträger ALLE Rechte zu entziehen 'entfernt ihn gleichzeitig aus der Auflistung der Rechteträger - Object_Rights2Delete.Delete2(UserOrGroup, WMAccessRightAllRights) - If Err.Number <> 0 Then - Dim msg = "Fehler bei Zugriff Delete2 - Err.Number: " & Err.Number & vbCrLf & Err.Description - If _form = True Then - MsgBox(msg, MsgBoxStyle.Critical) + _Logger.Debug($"Now deleting the right...") + Try + Object_Rights2Delete.Delete2(UserOrGroup, WMAccessRightAllRights) + Catch ex As Exception + If Err.Number <> 0 Then + Dim msg = "Fehler bei Zugriff Delete2 - Err.Number: " & Err.Number & vbCrLf & Err.Description + If _form = True Then + MsgBox(msg, MsgBoxStyle.Critical) + Else + _Logger.Warn(msg) + End If Else - _Logger.Warn(msg) + Dim msg = "Unexpected error Delete2 - Error: " & vbNewLine & ex.Message + If _form = True Then + MsgBox(msg, MsgBoxStyle.Critical) + Else + _Logger.Error(ex) + End If End If _Erfolgreich = False Return _Erfolgreich + End Try + - End If Next If _form = False Then - _Logger.Info("* Die Rechte wurden erfolgreich entfernt.") + _Logger.Info("* Die Rechte wurden erfolgreich entfernt *") End If diff --git a/ToolCollection/My Project/AssemblyInfo.vb b/ToolCollection/My Project/AssemblyInfo.vb index 4ded619..9f78b94 100644 --- a/ToolCollection/My Project/AssemblyInfo.vb +++ b/ToolCollection/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/ToolCollection/frmNB_AD.vb b/ToolCollection/frmNB_AD.vb index 871e7e0..681c61a 100644 --- a/ToolCollection/frmNB_AD.vb +++ b/ToolCollection/frmNB_AD.vb @@ -32,6 +32,7 @@ Public Class frmNB_AD Private Sub frmNB_AD_Load(sender As Object, e As EventArgs) Handles Me.Load _MyLogger = New LogConfig(LogConfig.PathType.CustomPath, Path.Combine(My.Application.Info.DirectoryPath, "Log")) _Logger = _MyLogger.GetLogger() + _MyLogger.Debug = Not (My.Settings.vLogErrorsonly) _SQLLite = New ClassSQLITE(_MyLogger) _windreamRechte = New ClassWD_Rechte(_MyLogger, _SQLLite) _windreamRechte.Init() diff --git a/ToolCollection/frmNIHauptseite.vb b/ToolCollection/frmNIHauptseite.vb index 30faa31..2af16b4 100644 --- a/ToolCollection/frmNIHauptseite.vb +++ b/ToolCollection/frmNIHauptseite.vb @@ -968,22 +968,22 @@ Public Class frmNIHauptseite oSqlCommand = oSqlCommand.Replace("[FULLNAME]", My.Settings.MRWD_Laufwerk & ":" & dokument.aPath) End If - If oSqlCommand.Contains("[%DOCFilename]") Then - oSqlCommand = oSqlCommand.Replace("[%DOCFilename]", dokument.aName) + If oSqlCommand.Contains("[DOCFilename]") Then + oSqlCommand = oSqlCommand.Replace("[DOCFilename]", dokument.aName) End If - If oSqlCommand.Contains("[%DOCFilenameoE]") Then + If oSqlCommand.Contains("[DOCFilenameoE]") Then Dim Filename As String = aktivesDokument.aName.ToString.Substring(0, aktivesDokument.aName.LastIndexOf(".")) - oSqlCommand = oSqlCommand.Replace("[%DOCFilenameoE]", Path.GetFileNameWithoutExtension(Filename)) + oSqlCommand = oSqlCommand.Replace("[DOCFilenameoE]", Path.GetFileNameWithoutExtension(Filename)) End If - If oSqlCommand.Contains("[%DOCPath]") Then - oSqlCommand = oSqlCommand.Replace("[FULLNAME]", Path.GetDirectoryName(My.Settings.vWLaufwerk & ":" & dokument.aPath)) + If oSqlCommand.Contains("[DOCPath]") Then + oSqlCommand = oSqlCommand.Replace("[DOCPath]", Path.GetDirectoryName(My.Settings.vWLaufwerk & ":" & dokument.aPath)) End If If oSqlCommand.Contains("[%DATENow]") Then oSqlCommand = oSqlCommand.Replace("[%DATENow]", Now.ToShortDateString) End If - If oSqlCommand.Contains("[%DOCFULLPATH]") Then - oSqlCommand = oSqlCommand.Replace("[%DOCFULLPATH]", My.Settings.MRWD_Laufwerk & ":" & dokument.aPath) + If oSqlCommand.Contains("[DOCFULLPATH]") Then + oSqlCommand = oSqlCommand.Replace("[DOCFULLPATH]", My.Settings.MRWD_Laufwerk & ":" & dokument.aPath) End If _Logger.Debug($"oSqlCommand after Replace 1([{oSqlCommand}])") ' einen Regulären Ausdruck laden @@ -1021,7 +1021,7 @@ Public Class frmNIHauptseite ' und die Abfrage ein Ergebnis zurück gab If IndexwertAusWindream Is Nothing And Not oUnexpectedError Then ' IndexwertAusWindream ist Nothing (idxName_ohneSonderzeichen) - _Logger.Warn("ACHTUNG: der einschränkende Wert aus Windream für Index '" & idxName_ohneSonderzeichen & "' ist EMPTY oder NOTHING") + _Logger.Warn("ACHTUNG: der einschränkende Wert aus Windream für Index '" & idxName_ohneSonderzeichen & "' is NOTHING") _Logger.Warn("SQL-String bisher: " & oSqlCommand) ' wenn die Abfrage in windream kein Ergebnis gab, muss das error_in_Indexierungflag gesetzt werden oUnexpectedError = True