This commit is contained in:
SchreiberM 2020-02-10 16:26:28 +01:00
parent 2b9e0e7ef4
commit ddb694c8e8
35 changed files with 259700 additions and 46 deletions

1
.gitignore vendored
View File

@ -155,3 +155,4 @@ $RECYCLE.BIN/
# Mac desktop service store files # Mac desktop service store files
.DS_Store .DS_Store
/.vs/ToolCollection/v15/Server/sqlite3 /.vs/ToolCollection/v15/Server/sqlite3
/ToolCollection/.vs/ToolCollection/v16/Server/sqlite3

View File

@ -591,27 +591,27 @@ Public Class ClassNIDatenbankzugriff
Try Try
Select Case dt.Rows.Count Select Case dt.Rows.Count
Case 0 Case 0
_Logger.Warn($"{WMFilename} # SQL liefert keine Zeile zurück: [{selectAnweisung}]") _Logger.Debug($"{WMFilename} # SQL liefert keine Zeile zurück: [{selectAnweisung}]")
If QuellVektor = True Then If QuellVektor = True Then
SQLconnect.Close() SQLconnect.Close()
Return "Empty Row" Return "Empty Row"
Else Else
SQLconnect.Close() SQLconnect.Close()
Return Nothing Return ""
End If End If
Case 1 Case 1
' einen einzigen relevanten Wert zurückgeben ' einen einzigen relevanten Wert zurückgeben
Dim sqlresult = dt.Rows(0).Item(0) Dim sqlresult = dt.Rows(0).Item(0)
If IsDBNull(sqlresult) Then If IsDBNull(sqlresult) Then
_Logger.Warn($"{WMFilename} # Genau 1 Zeile allerdings System.DBNull - [{selectAnweisung}]") _Logger.Debug($"{WMFilename} # Genau 1 Zeile allerdings System.DBNull - [{selectAnweisung}]")
If QuellVektor = True Then If QuellVektor = True Then
SQLconnect.Close() SQLconnect.Close()
Return "NULL Row" Return "NULL Row"
Else Else
SQLconnect.Close() SQLconnect.Close()
Return Nothing Return ""
End If End If
Else Else
_Logger.Debug($"{WMFilename} # Genau 1 Zeile - SQL-Ergebnis: '" & sqlresult.ToString & "'") _Logger.Debug($"{WMFilename} # Genau 1 Zeile - SQL-Ergebnis: '" & sqlresult.ToString & "'")
@ -692,6 +692,7 @@ Public Class ClassNIDatenbankzugriff
Catch ex As Exception Catch ex As Exception
' bei einem Fehler einen Eintrag in der Logdatei erzeugen ' bei einem Fehler einen Eintrag in der Logdatei erzeugen
_Logger.Error(ex) _Logger.Error(ex)
_Logger.Warn($"SQL-Command [{selectAnweisung}]")
If My.Settings.vNIMailsenden = True Then If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.GetValueFromMssqlDb - Build Datenadapter => SQL-Anweisungen prüfen (" & selectAnweisung & "): " & ex.Message) email.Send_EMail("Profilname: " & Profilname & "<br>ClassNIDatenbankzugriff.GetValueFromMssqlDb - Build Datenadapter => SQL-Anweisungen prüfen (" & selectAnweisung & "): " & ex.Message)
End If End If

View File

@ -369,13 +369,13 @@ Public Class ClassNIWindream
convertValue = CInt(value) convertValue = CInt(value)
_int = True _int = True
Case WMObjectVariableValueTypeFloat Case WMObjectVariableValueTypeFloat
' _Logger.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeFloat") _Logger.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeFloat")
value = value.ToString.Replace(" ", "") value = value.ToString.Replace(" ", "")
convertValue = CDbl(value) convertValue = CDbl(value)
Case WMObjectVariableValueTypeFixedPoint Case WMObjectVariableValueTypeFixedPoint
'_Logger.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeFixedPoint") '_Logger.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeFixedPoint")
value = value.ToString.Replace(" ", "") value = value.ToString.Replace(" ", "")
convertValue = CDbl(value) convertValue = value
_dbl = True _dbl = True
Case WMObjectVariableValueTypeBoolean Case WMObjectVariableValueTypeBoolean
'_Logger.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeBoolean") '_Logger.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeBoolean")
@ -388,7 +388,7 @@ Public Class ClassNIWindream
convertValue = value convertValue = value
Case WMObjectVariableValueTypeTimeStamp Case WMObjectVariableValueTypeTimeStamp
'_Logger.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeTimeStamp") '_Logger.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeTimeStamp")
convertValue = CDbl(value) convertValue = CDate(value)
Case WMObjectVariableValueTypeCurrency Case WMObjectVariableValueTypeCurrency
' _Logger.Debug(">> Typ des windream-Indexes: WMObjectVariableValueTypeCurrency") ' _Logger.Debug(">> Typ des windream-Indexes: WMObjectVariableValueTypeCurrency")
'Wegen currency muß ein eigenes Objekt vom typ Variant erzeugt werden 'Wegen currency muß ein eigenes Objekt vom typ Variant erzeugt werden
@ -995,6 +995,7 @@ Public Class ClassNIWindream
End Try End Try
End Function End Function
Public Function NEW_MOVE_FILE(targetpath As String, sourcepath As String, oMethod As String) As Boolean Public Function NEW_MOVE_FILE(targetpath As String, sourcepath As String, oMethod As String) As Boolean
Dim oWMFile As WINDREAMLib.WMObject
Try Try
If My.Settings.vLogErrorsonly = False Then If My.Settings.vLogErrorsonly = False Then
_Logger.Info($"targetpath ({targetpath})") _Logger.Info($"targetpath ({targetpath})")
@ -1015,7 +1016,7 @@ Public Class ClassNIWindream
sourcepath = sourcepath.Replace("W:\", "\") sourcepath = sourcepath.Replace("W:\", "\")
Const WMEntityDocument = 1 Const WMEntityDocument = 1
Dim IndexwertAusWindream As Object = Nothing Dim IndexwertAusWindream As Object = Nothing
Dim oWMFile As WINDREAMLib.WMObject
oWMFile = oWMSession.GetWMObjectByPath(WMEntityDocument, sourcepath) oWMFile = oWMSession.GetWMObjectByPath(WMEntityDocument, sourcepath)
If oWMFile.lock Then If oWMFile.lock Then
oWMFile.aPath = targetpath oWMFile.aPath = targetpath
@ -1032,6 +1033,10 @@ Public Class ClassNIWindream
End If End If
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
If Not IsNothing(oWMFile) Then
oWMFile.unlock()
End If
Return False Return False
End Try End Try
End Function End Function

View File

@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.3.0.5")> <Assembly: AssemblyVersion("2.3.0.7")>
<Assembly: AssemblyFileVersion("1.5.1.0")> <Assembly: AssemblyFileVersion("1.5.1.0")>

View File

@ -830,7 +830,7 @@ Namespace My
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _ <Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("16;17;18;19;20")> _ Global.System.Configuration.DefaultSettingValueAttribute("10;11;12")> _
Public ReadOnly Property NI_WORKING_HOURS() As String Public ReadOnly Property NI_WORKING_HOURS() As String
Get Get
Return CType(Me("NI_WORKING_HOURS"),String) Return CType(Me("NI_WORKING_HOURS"),String)
@ -894,8 +894,8 @@ Namespace My
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _ <Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _ Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=172.24.12.41\tests;Initial Catalog=DD_ECM_TEST;Persist Security Info="& _ Global.System.Configuration.DefaultSettingValueAttribute("Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Secu"& _
"True;User ID=sa;Password=dd")> _ "rity Info=True;User ID=sa;Password=dd")> _
Public ReadOnly Property DDECMConString() As String Public ReadOnly Property DDECMConString() As String
Get Get
Return CType(Me("DDECMConString"),String) Return CType(Me("DDECMConString"),String)
@ -914,8 +914,8 @@ Namespace My
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _ <Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _ Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=172.24.12.41\tests;Initial Catalog=DD_ECM_TEST;Persist Security Info="& _ Global.System.Configuration.DefaultSettingValueAttribute("Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Secu"& _
"True;User ID=sa;Password=dd")> _ "rity Info=True;User ID=sa;Password=dd")> _
Public ReadOnly Property DD_ECM_TESTConnectionString() As String Public ReadOnly Property DD_ECM_TESTConnectionString() As String
Get Get
Return CType(Me("DD_ECM_TESTConnectionString"),String) Return CType(Me("DD_ECM_TESTConnectionString"),String)

View File

@ -198,7 +198,7 @@
<Value Profile="(Default)">0</Value> <Value Profile="(Default)">0</Value>
</Setting> </Setting>
<Setting Name="NI_WORKING_HOURS" Type="System.String" Scope="Application"> <Setting Name="NI_WORKING_HOURS" Type="System.String" Scope="Application">
<Value Profile="(Default)">16;17;18;19;20</Value> <Value Profile="(Default)">10;11;12</Value>
</Setting> </Setting>
<Setting Name="FB_DATASOURCE" Type="System.String" Scope="Application"> <Setting Name="FB_DATASOURCE" Type="System.String" Scope="Application">
<Value Profile="(Default)" /> <Value Profile="(Default)" />
@ -221,9 +221,9 @@
<Setting Name="DDECMConString" Type="(Connection string)" Scope="Application"> <Setting Name="DDECMConString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt; <DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; &lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=172.24.12.41\tests;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd&lt;/ConnectionString&gt; &lt;ConnectionString&gt;Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd&lt;/ConnectionString&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue> &lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=172.24.12.41\tests;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd</Value> <Value Profile="(Default)">Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd</Value>
</Setting> </Setting>
<Setting Name="REGEX_INVALID_PATH" Type="System.String" Scope="Application"> <Setting Name="REGEX_INVALID_PATH" Type="System.String" Scope="Application">
<Value Profile="(Default)">[\\\/:\*\?""'&lt;&gt;|]</Value> <Value Profile="(Default)">[\\\/:\*\?""'&lt;&gt;|]</Value>
@ -231,10 +231,10 @@
<Setting Name="DD_ECM_TESTConnectionString" Type="(Connection string)" Scope="Application"> <Setting Name="DD_ECM_TESTConnectionString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt; <DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; &lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=172.24.12.41\tests;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd&lt;/ConnectionString&gt; &lt;ConnectionString&gt;Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt; &lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue> &lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=172.24.12.41\tests;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd</Value> <Value Profile="(Default)">Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd</Value>
</Setting> </Setting>
<Setting Name="myDateiname" Type="System.String" Scope="User"> <Setting Name="myDateiname" Type="System.String" Scope="User">
<Value Profile="(Default)">myInvalidDateiname.pdf</Value> <Value Profile="(Default)">myInvalidDateiname.pdf</Value>

View File

@ -11,9 +11,9 @@
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</configSections> </configSections>
<connectionStrings> <connectionStrings>
<add name="ToolCollection.My.MySettings.DDECMConString" connectionString="Data Source=172.24.12.41\tests;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd" /> <add name="ToolCollection.My.MySettings.DDECMConString" connectionString="Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd" />
<add name="ToolCollection.My.MySettings.DD_ECM_TESTConnectionString" <add name="ToolCollection.My.MySettings.DD_ECM_TESTConnectionString"
connectionString="Data Source=172.24.12.41\tests;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd" connectionString="Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd"
providerName="System.Data.SqlClient" /> providerName="System.Data.SqlClient" />
</connectionStrings> </connectionStrings>
<system.diagnostics> <system.diagnostics>
@ -237,7 +237,7 @@
<value>0</value> <value>0</value>
</setting> </setting>
<setting name="NI_WORKING_HOURS" serializeAs="String"> <setting name="NI_WORKING_HOURS" serializeAs="String">
<value>16;17;18;19;20</value> <value>10;11;12</value>
</setting> </setting>
<setting name="FB_DATASOURCE" serializeAs="String"> <setting name="FB_DATASOURCE" serializeAs="String">
<value /> <value />

View File

@ -707,7 +707,7 @@ Public Class frmNIHauptseite
End Function End Function
' Indexiert die windream-Suchergebnisse ' Indexiert die windream-Suchergebnisse
Public Sub IndexiereVerarbeiteDokument(ByVal dokument As WMObject) Public Sub IndexiereVerarbeiteDokument(ByVal dokument As WMObject)
Dim oResultNachindexierung = Nothing
Try Try
If bwDatei.CancellationPending Then If bwDatei.CancellationPending Then
_Logger.Debug("bwDatei.CancellationPending - IndexiereVerarbeiteDokument - Exit Sub") _Logger.Debug("bwDatei.CancellationPending - IndexiereVerarbeiteDokument - Exit Sub")
@ -927,7 +927,7 @@ Public Class frmNIHauptseite
' wenn kein error_in_Indexierung aufgetreten ist ' wenn kein error_in_Indexierung aufgetreten ist
If oUnexpectedError = False Then If oUnexpectedError = False Then
Dim oResultNachindexierung = Nothing ' Der Nachindexierungswert: entweder aus Datenbankabrage oder aus xml-File oResultNachindexierung = Nothing ' Der Nachindexierungswert: entweder aus Datenbankabrage oder aus xml-File
'Indexierung gegen ein Indexfeld 'Indexierung gegen ein Indexfeld
If INDEX_SQL_BEFEHL.Spalte.StartsWith("%") And INDEX_SQL_BEFEHL.Spalte.EndsWith("%") Then If INDEX_SQL_BEFEHL.Spalte.StartsWith("%") And INDEX_SQL_BEFEHL.Spalte.EndsWith("%") Then
'Ein manueller Wert in der Verknüpfung 'Ein manueller Wert in der Verknüpfung
@ -1001,7 +1001,7 @@ Public Class frmNIHauptseite
oResultNachindexierung = database.GetValueFromMssqlDb(dokument.aName, aktivesProfil.Profilname, selectArray(i), Me.aktivesProfil.DataSource, aktivesProfil.UserId, aktivesProfil.Password, MyDataset, aktivesProfil.InitialCatalog, INDEX_SQL_BEFEHL.Index, Quelle_is_vektor) oResultNachindexierung = database.GetValueFromMssqlDb(dokument.aName, aktivesProfil.Profilname, selectArray(i), Me.aktivesProfil.DataSource, aktivesProfil.UserId, aktivesProfil.Password, MyDataset, aktivesProfil.InitialCatalog, INDEX_SQL_BEFEHL.Index, Quelle_is_vektor)
ElseIf Me.aktivesProfil.DbArt = "ODBC" Then ElseIf Me.aktivesProfil.DbArt = "ODBC" Then
oResultNachindexierung = database.GetValueFromOdbcDb(aktivesProfil.Profilname, selectArray(i), Me.aktivesProfil.DataSource, aktivesProfil.UserId, aktivesProfil.Password, INDEX_SQL_BEFEHL.Index) oResultNachindexierung = database.GetValueFromOdbcDb(aktivesProfil.Profilname, selectArray(i), Me.aktivesProfil.DataSource, aktivesProfil.UserId, aktivesProfil.Password, INDEX_SQL_BEFEHL.Index)
MsgBox(oResultNachindexierung) ' MsgBox(oResultNachindexierung)
ElseIf Me.aktivesProfil.DbArt = "OLE (Access)" Then ElseIf Me.aktivesProfil.DbArt = "OLE (Access)" Then
oResultNachindexierung = database.GetValueFromOleDb(aktivesProfil.Profilname, selectArray(i), Me.aktivesProfil.DataSource, aktivesProfil.UserId, aktivesProfil.Password, INDEX_SQL_BEFEHL.Index) oResultNachindexierung = database.GetValueFromOleDb(aktivesProfil.Profilname, selectArray(i), Me.aktivesProfil.DataSource, aktivesProfil.UserId, aktivesProfil.Password, INDEX_SQL_BEFEHL.Index)
ElseIf Me.aktivesProfil.DbArt = "Firebird" Then ElseIf Me.aktivesProfil.DbArt = "Firebird" Then
@ -1145,10 +1145,21 @@ Public Class frmNIHauptseite
'###### '######
'nur wenn kein Fehler 'nur wenn kein Fehler
If Not oUnexpectedError Then If Not oUnexpectedError Then
Try
If Not IsNothing(oResultNachindexierung) Then
_Logger.Debug("oResultNachindexierung is not nothing...")
_Logger.Debug($"oResultNachindexierung = [{oResultNachindexierung.ToString}]...")
End If
Catch ex As Exception
_Logger.Warn("Unexpected error in checking isnothing for oResultNachindexierung: " & ex.Message)
_Logger.Warn("oResultNachindexierung Is Nothing..Continue For...")
Continue For
End Try
' wenn sowohl ein Index, als auch ein Wert gefunden/angegeben wurde, ' wenn sowohl ein Index, als auch ein Wert gefunden/angegeben wurde,
' der in den windream-Index geschrieben werden kann ' der in den windream-Index geschrieben werden kann
If oResultNachindexierung IsNot Nothing And INDEX_SQL_BEFEHL.Index IsNot Nothing Then If INDEX_SQL_BEFEHL.Index IsNot Nothing Then
result &= " - " & oResultNachindexierung result &= " - " & oResultNachindexierung.ToString
_ergebnisSQL = True _ergebnisSQL = True
Try Try
_Logger.Debug("Arraygößen werden angepasst:") _Logger.Debug("Arraygößen werden angepasst:")
@ -1518,7 +1529,7 @@ Public Class frmNIHauptseite
'Move and Rename ausführen 'Move and Rename ausführen
If _MRlicense = True And Not oUnexpectedError And unvollstaendig = False Then If _MRlicense = True And Not oUnexpectedError And unvollstaendig = False Then
Dim swMoveandrename As New ClassStopwatch("MoveandRename - Complete") Dim swMoveandrename As New ClassStopwatch("MoveandRename - Complete")
_Logger.Debug("Move and Rename ist aktiviert")
oUnexpectedError = FNMoveRename(dokument) oUnexpectedError = FNMoveRename(dokument)
'sd 'sd
'Dim sw1 As New ClassStopwatch("dokument.GetVariableValue(Me.aktivesProfil.MR_DAIndex)") 'Dim sw1 As New ClassStopwatch("dokument.GetVariableValue(Me.aktivesProfil.MR_DAIndex)")
@ -1625,6 +1636,7 @@ Public Class frmNIHauptseite
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
_Logger.Warn($"oResultNachindexierung so far: {oResultNachindexierung.tostring}")
If My.Settings.vNIMailsenden = True Then If My.Settings.vNIMailsenden = True Then
email.Send_EMail("Schwerwiegender Fehler bei IndexiereVerarbeiteDokument - <br> Profil: " & aktivesProfil.Profilname & "<br> Datei: " & dokument.aName.ToString & "<br> Fehler: " & ex.Message) email.Send_EMail("Schwerwiegender Fehler bei IndexiereVerarbeiteDokument - <br> Profil: " & aktivesProfil.Profilname & "<br> Datei: " & dokument.aName.ToString & "<br> Fehler: " & ex.Message)
End If End If
@ -1734,10 +1746,12 @@ Public Class frmNIHauptseite
Try Try
Dim oReturnString As String Dim oReturnString As String
Dim oActWMPath As String = "\\windream\objects" & myWMDocument.aPath Dim oActWMPath As String = "\\windream\objects" & myWMDocument.aPath
Dim oExtension As String = System.IO.Path.GetExtension(oActWMPath)
TBTC_MOVE_RENAMETableAdapter.Connection.ConnectionString = My.Settings.DDECMConString TBTC_MOVE_RENAMETableAdapter.Connection.ConnectionString = My.Settings.DDECMConString
Me.TBTC_MOVE_RENAMETableAdapter.FillByActive(Me.MyDataset.TBTC_MOVE_RENAME, aktivesProfil.Profilname) Me.TBTC_MOVE_RENAMETableAdapter.FillByActive(Me.MyDataset.TBTC_MOVE_RENAME, aktivesProfil.Profilname)
If MyDataset.TBTC_MOVE_RENAME.Rows.Count = 1 Then If MyDataset.TBTC_MOVE_RENAME.Rows.Count = 1 Then
Dim oExtension As String = System.IO.Path.GetExtension(oActWMPath) _Logger.Debug($"Found a Move and Rename Definition: [{MyDataset.TBTC_MOVE_RENAME.Rows(0).Item("FOLDER_FOR_INDEX")}]")
Dim oTargetpath As String Dim oTargetpath As String
'Regulären Ausdruck zum Auslesen der Indexe definieren 'Regulären Ausdruck zum Auslesen der Indexe definieren
Dim oPRegex As String = "\[%{1}[a-zA-Z0-9ß\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}" Dim oPRegex As String = "\[%{1}[a-zA-Z0-9ß\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}"
@ -1865,9 +1879,17 @@ Public Class frmNIHauptseite
End Select End Select
Next Next
oReturnString = oNamenkonvention oReturnString = oNamenkonvention
Else
If MyDataset.TBTC_MOVE_RENAME.Rows.Count = 0 Then
Return True
Else Else
oReturnString = oActWMPath oReturnString = oActWMPath
End If End If
End If
Dim oOldFilename = oReturnString.Substring(oReturnString.LastIndexOf("\") + 1) Dim oOldFilename = oReturnString.Substring(oReturnString.LastIndexOf("\") + 1)
_Logger.Debug($"oOldFilename: {oOldFilename}") _Logger.Debug($"oOldFilename: {oOldFilename}")
Dim oCleanFileName As String = String.Join("", oOldFilename.Split(Path.GetInvalidFileNameChars())) Dim oCleanFileName As String = String.Join("", oOldFilename.Split(Path.GetInvalidFileNameChars()))
@ -1883,6 +1905,21 @@ Public Class frmNIHauptseite
oReturnString = oReturnString.Replace(oOriginalPath, oCleanPathName) oReturnString = oReturnString.Replace(oOriginalPath, oCleanPathName)
End If End If
Dim oPathFile As String = oReturnString.Replace(oExtension, "")
Dim oNewPathFilename = oPathFile + oExtension
'Dim MoveFilename As String = DATEINAME.Replace(element.Value, "")
'Überprüfen ob File existiert
Dim oNewVersion As Integer = 1
Do While File.Exists(oNewPathFilename)
oNewVersion = oNewVersion + 1
oNewPathFilename = oPathFile & "~" & oNewVersion & oExtension
Loop
If oNewPathFilename <> oReturnString Then
oReturnString = oNewPathFilename
End If
If _windreamNI.NEW_MOVE_FILE(oReturnString, oActWMPath, "MO_RE") = True Then If _windreamNI.NEW_MOVE_FILE(oReturnString, oActWMPath, "MO_RE") = True Then
Return False Return False
Else Else

View File

@ -30,7 +30,6 @@ Partial Class frmNIMoveRenameNamenkonvention
Me.Label2 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label()
Me.GroupBox2 = New System.Windows.Forms.GroupBox() Me.GroupBox2 = New System.Windows.Forms.GroupBox()
Me.Button2 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button()
Me.btnVersionTZ = New System.Windows.Forms.Button()
Me.btnTrennzeichen = New System.Windows.Forms.Button() Me.btnTrennzeichen = New System.Windows.Forms.Button()
Me.btnVersion = New System.Windows.Forms.Button() Me.btnVersion = New System.Windows.Forms.Button()
Me.btndelete = New System.Windows.Forms.Button() Me.btndelete = New System.Windows.Forms.Button()
@ -39,6 +38,7 @@ Partial Class frmNIMoveRenameNamenkonvention
Me.cmbDate = New System.Windows.Forms.ComboBox() Me.cmbDate = New System.Windows.Forms.ComboBox()
Me.Label20 = New System.Windows.Forms.Label() Me.Label20 = New System.Windows.Forms.Label()
Me.btnAddDate = New System.Windows.Forms.Button() Me.btnAddDate = New System.Windows.Forms.Button()
Me.btnVersionTZ = New System.Windows.Forms.Button()
Me.GroupBox2.SuspendLayout() Me.GroupBox2.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
' '
@ -87,12 +87,6 @@ Partial Class frmNIMoveRenameNamenkonvention
Me.Button2.Name = "Button2" Me.Button2.Name = "Button2"
Me.Button2.UseVisualStyleBackColor = True Me.Button2.UseVisualStyleBackColor = True
' '
'btnVersionTZ
'
resources.ApplyResources(Me.btnVersionTZ, "btnVersionTZ")
Me.btnVersionTZ.Name = "btnVersionTZ"
Me.btnVersionTZ.UseVisualStyleBackColor = True
'
'btnTrennzeichen 'btnTrennzeichen
' '
resources.ApplyResources(Me.btnTrennzeichen, "btnTrennzeichen") resources.ApplyResources(Me.btnTrennzeichen, "btnTrennzeichen")
@ -144,6 +138,12 @@ Partial Class frmNIMoveRenameNamenkonvention
Me.btnAddDate.Name = "btnAddDate" Me.btnAddDate.Name = "btnAddDate"
Me.btnAddDate.UseVisualStyleBackColor = True Me.btnAddDate.UseVisualStyleBackColor = True
' '
'btnVersionTZ
'
resources.ApplyResources(Me.btnVersionTZ, "btnVersionTZ")
Me.btnVersionTZ.Name = "btnVersionTZ"
Me.btnVersionTZ.UseVisualStyleBackColor = True
'
'frmNIMoveRenameNamenkonvention 'frmNIMoveRenameNamenkonvention
' '
resources.ApplyResources(Me, "$this") resources.ApplyResources(Me, "$this")
@ -185,11 +185,10 @@ Partial Class frmNIMoveRenameNamenkonvention
Friend WithEvents btnTrennzeichen As System.Windows.Forms.Button Friend WithEvents btnTrennzeichen As System.Windows.Forms.Button
Friend WithEvents btnVersionTZ As System.Windows.Forms.Button
Friend WithEvents cmbDate As System.Windows.Forms.ComboBox Friend WithEvents cmbDate As System.Windows.Forms.ComboBox
Friend WithEvents Label20 As System.Windows.Forms.Label Friend WithEvents Label20 As System.Windows.Forms.Label
Friend WithEvents btnAddDate As System.Windows.Forms.Button Friend WithEvents btnAddDate As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents btnVersionTZ As Button
End Class End Class

View File

@ -258,7 +258,7 @@ Indizes und Textbausteinen zusammenzustellen.</value>
<value>MiddleLeft</value> <value>MiddleLeft</value>
</data> </data>
<data name="Button2.Location" type="System.Drawing.Point, System.Drawing"> <data name="Button2.Location" type="System.Drawing.Point, System.Drawing">
<value>175, 70</value> <value>175, 21</value>
</data> </data>
<data name="Button2.Size" type="System.Drawing.Size, System.Drawing"> <data name="Button2.Size" type="System.Drawing.Size, System.Drawing">
<value>163, 43</value> <value>163, 43</value>
@ -295,8 +295,12 @@ Indizes und Textbausteinen zusammenzustellen.</value>
<data name="btnVersionTZ.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing"> <data name="btnVersionTZ.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value> <value>MiddleLeft</value>
</data> </data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnVersionTZ.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnVersionTZ.Location" type="System.Drawing.Point, System.Drawing"> <data name="btnVersionTZ.Location" type="System.Drawing.Point, System.Drawing">
<value>175, 21</value> <value>175, 67</value>
</data> </data>
<data name="btnVersionTZ.Size" type="System.Drawing.Size, System.Drawing"> <data name="btnVersionTZ.Size" type="System.Drawing.Size, System.Drawing">
<value>163, 43</value> <value>163, 43</value>
@ -310,6 +314,9 @@ Indizes und Textbausteinen zusammenzustellen.</value>
<data name="btnVersionTZ.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing"> <data name="btnVersionTZ.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleRight</value> <value>MiddleRight</value>
</data> </data>
<data name="btnVersionTZ.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;btnVersionTZ.Name" xml:space="preserve"> <data name="&gt;&gt;btnVersionTZ.Name" xml:space="preserve">
<value>btnVersionTZ</value> <value>btnVersionTZ</value>
</data> </data>
@ -334,7 +341,7 @@ Indizes und Textbausteinen zusammenzustellen.</value>
<value>MiddleLeft</value> <value>MiddleLeft</value>
</data> </data>
<data name="btnTrennzeichen.Location" type="System.Drawing.Point, System.Drawing"> <data name="btnTrennzeichen.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 70</value> <value>6, 21</value>
</data> </data>
<data name="btnTrennzeichen.Size" type="System.Drawing.Size, System.Drawing"> <data name="btnTrennzeichen.Size" type="System.Drawing.Size, System.Drawing">
<value>163, 43</value> <value>163, 43</value>
@ -372,10 +379,10 @@ Indizes und Textbausteinen zusammenzustellen.</value>
<value>MiddleLeft</value> <value>MiddleLeft</value>
</data> </data>
<data name="btnVersion.Location" type="System.Drawing.Point, System.Drawing"> <data name="btnVersion.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 21</value> <value>6, 67</value>
</data> </data>
<data name="btnVersion.Size" type="System.Drawing.Size, System.Drawing"> <data name="btnVersion.Size" type="System.Drawing.Size, System.Drawing">
<value>163, 43</value> <value>163, 45</value>
</data> </data>
<data name="btnVersion.TabIndex" type="System.Int32, mscorlib"> <data name="btnVersion.TabIndex" type="System.Int32, mscorlib">
<value>5</value> <value>5</value>
@ -386,6 +393,9 @@ Indizes und Textbausteinen zusammenzustellen.</value>
<data name="btnVersion.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing"> <data name="btnVersion.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleRight</value> <value>MiddleRight</value>
</data> </data>
<data name="btnVersion.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;btnVersion.Name" xml:space="preserve"> <data name="&gt;&gt;btnVersion.Name" xml:space="preserve">
<value>btnVersion</value> <value>btnVersion</value>
</data> </data>
@ -628,7 +638,6 @@ Indizes und Textbausteinen zusammenzustellen.</value>
<data name="$this.Font" type="System.Drawing.Font, System.Drawing"> <data name="$this.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9.75pt</value> <value>Segoe UI, 9.75pt</value>
</data> </data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms"> <data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 4, 3, 4</value> <value>3, 4, 3, 4</value>
</data> </data>

View File

@ -73,7 +73,6 @@
End Sub End Sub
Private Sub btnVersionTZ_Click(sender As Object, e As EventArgs) Handles btnVersionTZ.Click Private Sub btnVersionTZ_Click(sender As Object, e As EventArgs) Handles btnVersionTZ.Click
Dim altePosition As Integer = Me.txtnamenKonv.SelectionStart() Dim altePosition As Integer = Me.txtnamenKonv.SelectionStart()
Me.txtnamenKonv.Text = Me.txtnamenKonv.Text.Insert(altePosition, "~") Me.txtnamenKonv.Text = Me.txtnamenKonv.Text.Insert(altePosition, "~")
Me.txtnamenKonv.SelectionStart = altePosition + 1 Me.txtnamenKonv.SelectionStart = altePosition + 1

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff