MS IDB und WINDREAM
This commit is contained in:
parent
a2a2ef244f
commit
bc4567a628
@ -397,7 +397,7 @@ Public Class ClassControls
|
||||
Continue For
|
||||
End If
|
||||
|
||||
oControlSql = ClassPatterns.ReplaceUserValues(oControlSql, USER_PRENAME, USER_SURNAME, USER_SHORT_NAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_DOKART_ID)
|
||||
oControlSql = ClassPatterns.ReplaceUserValues(oControlSql, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_DOKART_ID)
|
||||
oControlSql = ClassPatterns.ReplaceInternalValues(oControlSql)
|
||||
oControlSql = ClassPatterns.ReplaceControlValues(oControlSql, Panel)
|
||||
|
||||
|
||||
@ -187,6 +187,32 @@ Public Class ClassDatabase
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function Execute_non_Query_ConStr(ExecuteCMD As String, ConnString As String, Optional userInput As Boolean = False)
|
||||
Try
|
||||
Dim SQLconnect As New SqlClient.SqlConnection
|
||||
Dim SQLcommand As SqlClient.SqlCommand
|
||||
SQLconnect.ConnectionString = ConnString
|
||||
SQLconnect.Open()
|
||||
SQLcommand = SQLconnect.CreateCommand
|
||||
'Update Last Created Record in Foo
|
||||
SQLcommand.CommandText = ExecuteCMD
|
||||
LOGGER.Debug("Execute_non_Query_ConStr Created: " & ExecuteCMD)
|
||||
SQLcommand.ExecuteNonQuery()
|
||||
SQLcommand.Dispose()
|
||||
SQLconnect.Close()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
If userInput = True Then
|
||||
MsgBox("Error in Execute_non_Query_ConStr - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & ExecuteCMD, MsgBoxStyle.Critical)
|
||||
End If
|
||||
Clipboard.SetText("Error Execute_non_Query_ConStr: " & ex.Message & vbNewLine & "SQL: " & ExecuteCMD)
|
||||
LOGGER.Info("Fehler bei Execute_non_Query_ConStr: " & ex.Message, True)
|
||||
LOGGER.Info("#SQL: " & ExecuteCMD, False)
|
||||
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function Execute_Scalar(sql_command As String, ConString As String, Optional userInput As Boolean = False)
|
||||
Dim result
|
||||
Try
|
||||
|
||||
226
Global_Indexer/ClassIDBData.vb
Normal file
226
Global_Indexer/ClassIDBData.vb
Normal file
@ -0,0 +1,226 @@
|
||||
Public Class ClassIDBData
|
||||
Public DTVWIDB_BE_ATTRIBUTE As DataTable
|
||||
''' <summary>
|
||||
''' Gets all indices by BusinessEntity.
|
||||
''' </summary>
|
||||
''' <param name="BusinessEntity">Title of Business Entity</param>
|
||||
''' <returns>Array with all Indices</returns>
|
||||
''' <remarks></remarks>
|
||||
'''
|
||||
Public Function Init()
|
||||
Dim oSQL = $"SELECT * FROM VWIDB_BE_ATTRIBUTE"
|
||||
DTVWIDB_BE_ATTRIBUTE = ClassDatabase.Return_Datatable_CS(oSQL, CONNECTION_STRING_IDB)
|
||||
End Function
|
||||
Public IDBSystemIndices As List(Of String)
|
||||
Public Function GetIndicesByBE(ByVal BusinessEntity As String) As String()
|
||||
Try
|
||||
Dim aNames(4) As String
|
||||
aNames(0) = "ObjectID"
|
||||
aNames(1) = "IDBCreatedWhen"
|
||||
aNames(2) = "IDBCreatedWho"
|
||||
aNames(3) = "IDBChangedWhen"
|
||||
aNames(4) = "IDBChangedWho"
|
||||
IDBSystemIndices = aNames.ToList
|
||||
' Array für Indizes vorbereiten
|
||||
Dim aIndexNames(DTVWIDB_BE_ATTRIBUTE.Rows.Count + 4) As String
|
||||
Dim oCount As Integer = 0
|
||||
aIndexNames(oCount) = "ObjectID"
|
||||
oCount += 1
|
||||
aIndexNames(oCount) = "IDBCreatedWhen"
|
||||
oCount += 1
|
||||
aIndexNames(oCount) = "IDBCreatedWho"
|
||||
oCount += 1
|
||||
aIndexNames(oCount) = "IDBChangedWhen"
|
||||
oCount += 1
|
||||
aIndexNames(oCount) = "IDBChangedWho"
|
||||
For Each oRow As DataRow In DTVWIDB_BE_ATTRIBUTE.Rows
|
||||
oCount += 1
|
||||
aIndexNames(oCount) = oRow.Item("ATTR_TITLE")
|
||||
|
||||
Next
|
||||
|
||||
|
||||
' Indexarray sortiert zurückgeben
|
||||
Array.Sort(aIndexNames)
|
||||
' Indexarray zurückgeben
|
||||
Return aIndexNames
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error getting the IDB Indicies")
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
Public Function GetTypeOfIndex(ByVal indexname As String) As Integer
|
||||
Try
|
||||
For Each oRow As DataRow In DTVWIDB_BE_ATTRIBUTE.Rows
|
||||
If oRow.Item("ATTR_TITLE") = indexname Then
|
||||
Dim oType = oRow.Item("TYP_ID")
|
||||
Return oType
|
||||
End If
|
||||
Next
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Function GetVariableValue(oAttributeName As String, Optional oIDBTyp As Integer = 0, Optional FromIDB As Boolean = False) As Object
|
||||
Try
|
||||
Dim oSingleAttribute As Boolean = True
|
||||
Select Case oIDBTyp
|
||||
Case 8
|
||||
oSingleAttribute = False
|
||||
Case 9
|
||||
oSingleAttribute = False
|
||||
End Select
|
||||
Dim oAttributeValue
|
||||
|
||||
If oSingleAttribute = True And IDB_DT_DOC_DATA.Rows.Count = 1 And FromIDB = False Then
|
||||
Try
|
||||
If oAttributeName = "IDBCreatedWhen" Then
|
||||
oAttributeName = "ADDED_WHEN"
|
||||
ElseIf oAttributeName = "IDBCreatedWho" Then
|
||||
oAttributeName = "ADDED_WHO"
|
||||
ElseIf oAttributeName = "IDBChangedWhen" Then
|
||||
oAttributeName = "CHANGED_WHEN"
|
||||
ElseIf oAttributeName = "IDBChangedWho" Then
|
||||
oAttributeName = "CHANGED_WHO"
|
||||
End If
|
||||
|
||||
oAttributeValue = IDB_DT_DOC_DATA.Rows(0).Item(oAttributeName)
|
||||
Catch ex As Exception
|
||||
LOGGER.Debug($"Error getting Attribute from IDB_DT_DOC_DATA: {ex.Message}")
|
||||
End Try
|
||||
|
||||
End If
|
||||
If Not IsNothing(oAttributeValue) Then
|
||||
Return oAttributeValue
|
||||
Else
|
||||
LOGGER.Debug($"oAttributeValue for Attribute [{oAttributeName}] is so far nothing..Now trying FNIDB_PM_GET_VARIABLE_VALUE ")
|
||||
End If
|
||||
Dim oFNSQL = $"SELECT * FROM [dbo].[FNIDB_PM_GET_VARIABLE_VALUE] ({IDB_DOC_ID},'{oAttributeName}','{USER_LANGUAGE}',CONVERT(BIT,'{IDB_USES_WMFILESTORE}'))"
|
||||
oAttributeValue = ClassDatabase.Return_Datatable_CS(oFNSQL, CONNECTION_STRING_IDB)
|
||||
Dim odt As DataTable = oAttributeValue
|
||||
If odt.Rows.Count = 1 Then
|
||||
oAttributeValue = odt.Rows(0).Item(0)
|
||||
End If
|
||||
Return oAttributeValue
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Function Delete_Term_Object_From_Metadata(oAttributeName As String, oTerm2Delete As String) As Object
|
||||
Try
|
||||
Dim oAttributeValue
|
||||
Dim oID_IS_FOREIGN As Integer
|
||||
oID_IS_FOREIGN = 0
|
||||
If IDB_USES_WMFILESTORE Then
|
||||
oID_IS_FOREIGN = 1
|
||||
End If
|
||||
Dim oDELSQL = $"EXEC PRIDB_DELETE_TERM_OBJECT_METADATA {IDB_DOC_ID},'{oAttributeName}','{oTerm2Delete}','{USER_USERNAME}','{USER_LANGUAGE}',{oID_IS_FOREIGN}"
|
||||
ClassDatabase.Execute_non_Query_ConStr(oDELSQL, CONNECTION_STRING_IDB)
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Function Delete_AttributeData(pIDB_OBJID As Int64, pAttributeName As String) As Object
|
||||
Try
|
||||
Dim oDELSQL = $"EXEC PRIDB_DELETE_ATTRIBUTE_DATA {pIDB_OBJID},'{pAttributeName}','{USER_USERNAME}'"
|
||||
ClassDatabase.Execute_non_Query_ConStr(oDELSQL, CONNECTION_STRING_IDB)
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
Public Function SetVariableValue(oAttributeName As String, oNewValue As Object, Optional CheckDeleted As Boolean = False, Optional oIDBTyp As Integer = 0)
|
||||
Try
|
||||
Dim omytype = oNewValue.GetType.ToString
|
||||
If omytype = "System.Data.DataTable" Then
|
||||
Dim oDTMyNewValues As DataTable = oNewValue
|
||||
Dim oOldAttributeResult
|
||||
Dim oTypeOldResult
|
||||
|
||||
If CheckDeleted = True Then
|
||||
oOldAttributeResult = GetVariableValue(oAttributeName, oIDBTyp)
|
||||
oTypeOldResult = oOldAttributeResult.GetType.ToString
|
||||
If oTypeOldResult = "System.Data.DataTable" Then
|
||||
Dim myOldValues As DataTable = oOldAttributeResult
|
||||
If myOldValues.Rows.Count > 1 Then
|
||||
|
||||
'now Checking whether the old row still remains in Vector? If not it will be deleted as it cannot be replaced in multivalues
|
||||
For Each oOldValueRow As DataRow In myOldValues.Rows
|
||||
Dim oExists As Boolean = False
|
||||
For Each oNewValueRow As DataRow In oDTMyNewValues.Rows
|
||||
Dim oInfo1 = $"Checking oldValue[{oOldValueRow.Item(0)}] vs NewValue [{oNewValueRow.Item(1)}]"
|
||||
If oNewValueRow.Item(1).ToString.ToUpper = oOldValueRow.Item(0).ToString.ToUpper Then
|
||||
oExists = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If oExists = False Then
|
||||
Dim oInfo = $"Value [{oOldValueRow.Item(0)}] no longer existing in Vector-Attribute [{oAttributeName}] - will be deleted!"
|
||||
LOGGER.Info(oInfo)
|
||||
SetVariableValue(IDB_LOG_INDEX, oInfo)
|
||||
Delete_Term_Object_From_Metadata(oAttributeName, oOldValueRow.Item(0))
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
Else
|
||||
If oDTMyNewValues.Rows.Count > 1 Then
|
||||
Dim oExists As Boolean = False
|
||||
For Each oNewValueRow As DataRow In oDTMyNewValues.Rows
|
||||
Dim oInfo1 = $"Checking oldValue[{oOldAttributeResult}] vs NewValue [{oNewValueRow.Item(1)}]"
|
||||
If oNewValueRow.Item(1).ToString.ToUpper = oOldAttributeResult.ToString.ToUpper Then
|
||||
oExists = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If oExists = False Then
|
||||
Dim oInfo2 = $"Value [{oOldAttributeResult}] no longer existing in Vector-Attribute [{oAttributeName}] - will be deleted!"
|
||||
LOGGER.Info(oInfo2)
|
||||
SetVariableValue(IDB_LOG_INDEX, oInfo2)
|
||||
Delete_Term_Object_From_Metadata(oAttributeName, oOldAttributeResult)
|
||||
End If
|
||||
Else
|
||||
Dim oInfo = $"Value [{oOldAttributeResult}] of Attribute [{oAttributeName}] obviously was updated during runtime - will be deleted!"
|
||||
LOGGER.Info(oInfo)
|
||||
SetVariableValue(IDB_LOG_INDEX, oInfo)
|
||||
Delete_Term_Object_From_Metadata(oAttributeName, oOldAttributeResult)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
For Each oNewValueRow As DataRow In oDTMyNewValues.Rows
|
||||
Dim oSuccess As Boolean = False
|
||||
Dim oFNSQL = $"DECLARE @NEW_OBJ_MD_ID BIGINT " & vbNewLine & $"EXEC PRIDB_NEW_OBJ_DATA {IDB_DOC_ID},'{oAttributeName}','{USER_USERNAME}','{oNewValueRow.Item(1).ToString}','{USER_LANGUAGE}',{IDB_DOC_ID},@OMD_ID = @NEW_OBJ_MD_ID OUTPUT"
|
||||
oSuccess = ClassDatabase.Execute_non_Query_ConStr(oFNSQL, CONNECTION_STRING_IDB)
|
||||
If oSuccess = False Then
|
||||
Return False
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
Else
|
||||
Dim oFNSQL = $"DECLARE @NEW_OBJ_MD_ID BIGINT " & vbNewLine & $"EXEC PRIDB_NEW_OBJ_DATA {IDB_DOC_ID},'{oAttributeName}','{USER_USERNAME}','{oNewValue}','{USER_LANGUAGE}',{IDB_DOC_ID},@OMD_ID = @NEW_OBJ_MD_ID OUTPUT"
|
||||
Return ClassDatabase.Execute_non_Query_ConStr(oFNSQL, CONNECTION_STRING_IDB)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
@ -2,6 +2,7 @@
|
||||
Imports DLLLicenseManager
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Config
|
||||
Imports DigitalData.Modules.Windream
|
||||
|
||||
Public Class ClassInit
|
||||
Public _lizenzManager As ClassLicenseManager
|
||||
@ -70,6 +71,23 @@ Public Class ClassInit
|
||||
Else
|
||||
Throw New Exception("Unexpected error while initializing basic-settings. More info in the log.")
|
||||
End If
|
||||
Else
|
||||
If IDB_ACTIVE = False Then
|
||||
Try
|
||||
WINDREAM = New Windream(LOGCONFIG, False, "", "", True, "", "", "", "")
|
||||
If Not IsNothing(WINDREAM) Then
|
||||
If WINDREAM.SessionLoggedin = True Then
|
||||
LOGGER.Debug("windream initialisiert")
|
||||
Else
|
||||
Throw New Exception("Could not create a windream session")
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn("CHECKING WMConnectivity: " & ex.Message)
|
||||
Throw New Exception("Unexpected error in CHECKING WMConnectivity")
|
||||
End Try
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@ -80,12 +98,12 @@ Public Class ClassInit
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable(oSql)
|
||||
If DT.Rows.Count = 1 Then
|
||||
GI_withWindream = DT.Rows(0).Item("BIT1")
|
||||
vWLaufwerk = DT.Rows(0).Item("STRING1")
|
||||
|
||||
'vWLaufwerk = DT.Rows(0).Item("STRING1")
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Load_BasicConfig" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
@ -199,36 +217,10 @@ Public Class ClassInit
|
||||
End Sub
|
||||
Public Sub InitUserLogin()
|
||||
Try
|
||||
Dim sql = "SELECT MAX(GUID) FROM TBDD_USER WHERE (LOWER(USERNAME) = LOWER('@user'))"
|
||||
sql = sql.Replace("@user", Environment.UserName)
|
||||
' LOGGER.Info(">> Username: " & Environment.UserName)
|
||||
Dim oSql As String
|
||||
|
||||
USER_ID = ClassDatabase.Execute_Scalar(sql, MyConnectionString, True)
|
||||
Try
|
||||
Dim USERID = CInt(USER_ID)
|
||||
Catch ex As Exception
|
||||
LOGGER.Info("User '" & Environment.UserName & "' not configured in Useradministration! (DBNull)")
|
||||
LOGGER.Error(ex.Message)
|
||||
'MsgBox("Achtung: Sie sind nicht in der Userverwaltung hinterlegt." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:")
|
||||
'Me.Close()
|
||||
START_INCOMPLETE = True
|
||||
Throw New Exception("You are not configured in the Useradministration." & vbNewLine & "Please contact the system administrator!")
|
||||
Exit Sub
|
||||
End Try
|
||||
|
||||
Dim oUserDatatable As DataTable = ClassDatabase.Return_Datatable($"SELECT * FROM TBDD_USER WHERE GUID = {USER_ID}")
|
||||
If Not IsNothing(oUserDatatable) AndAlso Not IsDBNull(oUserDatatable.Rows.Item(0)) Then
|
||||
Dim oRow As DataRow = oUserDatatable.Rows.Item(0)
|
||||
USER_SHORT_NAME = NotNull(oRow.Item("SHORTNAME"), String.Empty)
|
||||
USER_PRENAME = NotNull(oRow.Item("PRENAME"), String.Empty)
|
||||
USER_SURNAME = NotNull(oRow.Item("NAME"), String.Empty)
|
||||
USER_EMAIL = NotNull(oRow.Item("EMAIL"), String.Empty)
|
||||
USER_USERNAME = NotNull(oRow.Item("USERNAME"), String.Empty)
|
||||
End If
|
||||
|
||||
'Check_User_Exists_in_GIGroups()
|
||||
sql = String.Format("SELECT * FROM [dbo].[FNDD_CHECK_USER_MODULE] ('{0}','GLOBIX',{1})", Environment.UserName, 1)
|
||||
Dim DT_CHECKUSER_MODULE As DataTable = ClassDatabase.Return_Datatable(sql)
|
||||
oSql = String.Format("SELECT * FROM [dbo].[FNDD_CHECK_USER_MODULE] ('{0}','GLOBIX',{1})", Environment.UserName, 1)
|
||||
Dim DT_CHECKUSER_MODULE As DataTable = ClassDatabase.Return_Datatable(oSql)
|
||||
If DT_CHECKUSER_MODULE.Rows.Count = 0 Then
|
||||
LOGGER.Info("DT_CHECKUSER_MODULE.Rows.Count = 0")
|
||||
START_INCOMPLETE = True
|
||||
@ -237,7 +229,23 @@ Public Class ClassInit
|
||||
Exit Sub
|
||||
End If
|
||||
If DT_CHECKUSER_MODULE.Rows.Count = 1 Then
|
||||
If DT_CHECKUSER_MODULE.Rows(0).Item("USER_ID") = 0 Then
|
||||
LOGGER.Info("User '" & Environment.UserName & "' not configured in Useradministration!")
|
||||
START_INCOMPLETE = True
|
||||
Throw New Exception("You are not configured in the Useradministration." & vbNewLine & "Please contact the system administrator!")
|
||||
Exit Sub
|
||||
End If
|
||||
USER_IN_MODULE = DT_CHECKUSER_MODULE.Rows(0).Item("MODULE_ACCESS")
|
||||
USER_ID = DT_CHECKUSER_MODULE.Rows(0).Item("USER_ID")
|
||||
USER_SURNAME = IIf(IsDBNull(DT_CHECKUSER_MODULE.Rows(0).Item("USER_SURNAME")), "", DT_CHECKUSER_MODULE.Rows(0).Item("USER_SURNAME"))
|
||||
USER_PRENAME = IIf(IsDBNull(DT_CHECKUSER_MODULE.Rows(0).Item("USER_PRENAME")), "", DT_CHECKUSER_MODULE.Rows(0).Item("USER_PRENAME"))
|
||||
USER_SHORTNAME = IIf(IsDBNull(DT_CHECKUSER_MODULE.Rows(0).Item("USER_SHORTNAME")), "", DT_CHECKUSER_MODULE.Rows(0).Item("USER_SHORTNAME"))
|
||||
USER_EMAIL = IIf(IsDBNull(DT_CHECKUSER_MODULE.Rows(0).Item("USER_EMAIL")), "", DT_CHECKUSER_MODULE.Rows(0).Item("USER_EMAIL"))
|
||||
USER_LANGUAGE = DT_CHECKUSER_MODULE.Rows(0).Item("USER_LANGUAGE")
|
||||
USER_IN_MODULE = DT_CHECKUSER_MODULE.Rows(0).Item("MODULE_ACCESS")
|
||||
USER_IS_ADMIN = DT_CHECKUSER_MODULE.Rows(0).Item("IS_ADMIN")
|
||||
USERCOUNT_LOGGED_IN = DT_CHECKUSER_MODULE.Rows(0).Item("USERCOUNT_LOGGED_IN")
|
||||
ClassParamRefresh.Refresh_Params(DT_CHECKUSER_MODULE)
|
||||
If USER_IN_MODULE = False Then
|
||||
LOGGER.Info(" - User: " & Environment.UserName & " nicht für Modul freigegben!")
|
||||
START_INCOMPLETE = True
|
||||
@ -261,22 +269,22 @@ Public Class ClassInit
|
||||
End If
|
||||
USER_LANGUAGE = DT_CHECKUSER_MODULE.Rows(0).Item("USER_LANGUAGE")
|
||||
|
||||
sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_ID & " AND UPPER(MODULE) = UPPER('Global-Indexer')"
|
||||
ClassDatabase.Execute_non_Query(sql, True)
|
||||
sql = "INSERT INTO TBDD_USER_MODULE_LOG_IN (USER_ID,MODULE) VALUES (" & USER_ID & ",'Global-Indexer')"
|
||||
ClassDatabase.Execute_non_Query(sql)
|
||||
sql = "SELECT COUNT(*) AS Expr1 FROM TBDD_USER_MODULE_LOG_IN WHERE Upper(MODULE) = UPPER('Global-Indexer')"
|
||||
Dim anzahl = ClassDatabase.Execute_Scalar(sql, MyConnectionString, True)
|
||||
LOGGER.Info(" >> Anzahl Angemeldete User: " & anzahl.ToString)
|
||||
UserLoggedin = CInt(anzahl)
|
||||
UserLoggedin += 1
|
||||
If LICENSE_COUNT < UserLoggedin And LICENSE_EXPIRED = False Then
|
||||
MsgBox("Die Anzahl der aktuell angemeldeten User (" & UserLoggedin.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:")
|
||||
LOGGER.Info(" >> Die Anzahl der aktuell angemeldeten User (" & UserLoggedin.ToString & ") überschreitet die Anzahl der Lizenzen (" & LICENSE_COUNT & ") für Global Indexer!")
|
||||
oSql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_ID & " AND UPPER(MODULE) = UPPER('Global-Indexer')"
|
||||
ClassDatabase.Execute_non_Query(oSql, True)
|
||||
oSql = "INSERT INTO TBDD_USER_MODULE_LOG_IN (USER_ID,MODULE) VALUES (" & USER_ID & ",'Global-Indexer')"
|
||||
ClassDatabase.Execute_non_Query(oSql)
|
||||
oSql = "SELECT COUNT(*) AS Expr1 FROM TBDD_USER_MODULE_LOG_IN WHERE Upper(MODULE) = UPPER('Global-Indexer')"
|
||||
' Dim anzahl = ClassDatabase.Execute_Scalar(sql, MyConnectionString, True)
|
||||
'LOGGER.Info(" >> Anzahl Angemeldete User: " & anzahl.ToString)
|
||||
' UserLoggedin = CInt(anzahl)
|
||||
' UserLoggedin += 1
|
||||
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:")
|
||||
LOGGER.Info(" >> Die Anzahl der aktuell angemeldeten User (" & USERCOUNT_LOGGED_IN.ToString & ") überschreitet die Anzahl der Lizenzen (" & LICENSE_COUNT & ") für Global Indexer!")
|
||||
If USER_IS_ADMIN = False Then
|
||||
'Anmeldung wieder herausnehmen
|
||||
sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_ID & " AND MODULE= 'Global-Indexer'"
|
||||
ClassDatabase.Execute_non_Query(sql, True)
|
||||
oSql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_ID & " AND MODULE= 'Global-Indexer'"
|
||||
ClassDatabase.Execute_non_Query(oSql, True)
|
||||
LOGGER.Info(" - Wieder abgemeldet")
|
||||
START_INCOMPLETE = True
|
||||
End If
|
||||
|
||||
53
Global_Indexer/ClassParamRefresh.vb
Normal file
53
Global_Indexer/ClassParamRefresh.vb
Normal file
@ -0,0 +1,53 @@
|
||||
Public Class ClassParamRefresh
|
||||
Public Shared Sub Refresh_Params(DT_CHECKUSER As DataTable)
|
||||
If DT_CHECKUSER.Rows.Count = 1 Then
|
||||
USERCOUNT_LOGGED_IN = DT_CHECKUSER.Rows(0).Item("USERCOUNT_LOGGED_IN")
|
||||
Try
|
||||
WORKING_MODE = DT_CHECKUSER.Rows(0).Item("WORKING_MODE")
|
||||
Catch ex As Exception
|
||||
WORKING_MODE = ""
|
||||
End Try
|
||||
'Try
|
||||
' ADDITIONAL_TITLE = DT_CHECKUSER.Rows(0).Item("ADDITIONAL_TITLE")
|
||||
' If ADDITIONAL_TITLE = String.Empty Then
|
||||
' ADDITIONAL_TITLE = My.Application.Info.ProductName
|
||||
' End If
|
||||
'Catch ex As Exception
|
||||
' ADDITIONAL_TITLE = My.Application.Info.ProductName
|
||||
'End Try
|
||||
|
||||
Dim oSplitWorkMode As String() = WORKING_MODE.Split("#")
|
||||
|
||||
' Use For Each loop over words and display them.
|
||||
Dim oMode As String
|
||||
For Each oMode In oSplitWorkMode
|
||||
LOGGER.Debug($"oWorkingMode Parameter: {oMode}")
|
||||
If oMode.StartsWith("IDB_CONID!") Then
|
||||
Dim CON_ID = oMode.Replace("GLOBIX.IDB_CONID!", "")
|
||||
Dim oConString = ClassDatabase.Get_ConnectionString(CON_ID)
|
||||
CONNECTION_STRING_IDB = oConString
|
||||
Dim oSQL = $"SELECT * FROM TBIDB_ATTRIBUTE"
|
||||
Dim oDT As DataTable = ClassDatabase.Return_Datatable_CS(oSQL, CONNECTION_STRING_IDB)
|
||||
If Not IsNothing(oDT) Then
|
||||
If oDT.Rows.Count > 0 Then
|
||||
IDB_ACTIVE = True
|
||||
Else
|
||||
LOGGER.Warn($"Got an IDB-ConnID [{CON_ID}] but check DTAttribute.Row.Count is [{oDT.Rows.Count}]!!")
|
||||
End If
|
||||
Else
|
||||
LOGGER.Warn($"Got an IDB-ConnID [{CON_ID}] but check DT Attribute is Nothing!!")
|
||||
End If
|
||||
ElseIf oMode.StartsWith("IDB.LOG_INDEX") Then
|
||||
IDB_LOG_INDEX = oMode.Replace("IDB.LOG_INDEX!", "")
|
||||
'ElseIf oMode.StartsWith("PM.COLORSCHEME") Then
|
||||
' Dim oColorScheme = oMode.Replace("PM.COLORSCHEME=", "")
|
||||
' RIBBON_COLOR_SCHEME = oColorScheme.ToUpper
|
||||
|
||||
Else
|
||||
LOGGER.Info($"Wrong oMode: {oMode}")
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
File diff suppressed because it is too large
Load Diff
@ -166,6 +166,9 @@
|
||||
<Reference Include="DigitalData.Modules.Logging">
|
||||
<HintPath>..\..\DDMonorepo\Modules.Config\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Windream">
|
||||
<HintPath>..\..\DDMonorepo\Modules.Windream\bin\Debug\DigitalData.Modules.Windream.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DLLLicenseManager, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\DLLLicenseManager.dll</HintPath>
|
||||
@ -241,15 +244,16 @@
|
||||
<Compile Include="ClassFormFunctions.vb" />
|
||||
<Compile Include="ClassHelper.vb" />
|
||||
<Compile Include="ClassHotkey_Windream.vb" />
|
||||
<Compile Include="ClassIDBData.vb" />
|
||||
<Compile Include="ClassIndexFunctions.vb" />
|
||||
<Compile Include="ClassInit.vb" />
|
||||
<Compile Include="ClassLayout.vb" />
|
||||
<Compile Include="ClassLicence.vb" />
|
||||
<Compile Include="ClassLogger.vb" />
|
||||
<Compile Include="ClassParamRefresh.vb" />
|
||||
<Compile Include="ClassPatterns.vb" />
|
||||
<Compile Include="ClassPostprocessing.vb" />
|
||||
<Compile Include="ClassWindowAPI.vb" />
|
||||
<Compile Include="ClassWindream.vb" />
|
||||
<Compile Include="ClassEmailHeaderExtractor.vb" />
|
||||
<Compile Include="clsHotkey.vb" />
|
||||
<Compile Include="Form1.Designer.vb">
|
||||
@ -380,7 +384,7 @@
|
||||
</Compile>
|
||||
<Compile Include="ModuleCURRENT.vb" />
|
||||
<Compile Include="ModuleHelpers.vb" />
|
||||
<Compile Include="ModuleMySettings.vb" />
|
||||
<Compile Include="ModuleRuntime.vb" />
|
||||
<Compile Include="ModuleUserSavings.vb" />
|
||||
<Compile Include="ModuleWindowHandles.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
@ -429,6 +433,7 @@
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmAdministration.resx">
|
||||
<DependentUpon>frmAdministration.vb</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmConfig_Basic.de.resx">
|
||||
<DependentUpon>frmConfig_Basic.vb</DependentUpon>
|
||||
|
||||
@ -31,14 +31,14 @@ Module ModuleCURRENT
|
||||
Public USER_ID
|
||||
Public USER_IN_MODULE As Boolean = False
|
||||
Public USER_IS_ADMIN As Boolean = False
|
||||
Public UserLoggedin As Integer = 0
|
||||
|
||||
Public USER_SHORT_NAME As String = ""
|
||||
Public USER_SHORTNAME As String = ""
|
||||
Public USER_PRENAME As String = ""
|
||||
Public USER_SURNAME As String = ""
|
||||
Public USER_EMAIL As String = ""
|
||||
Public USER_LANGUAGE As String = "DE"
|
||||
Public USER_USERNAME As String = ""
|
||||
Public USERCOUNT_LOGGED_IN As Integer = 0
|
||||
|
||||
Public CURRENT_FOLDERWATCH As String = ""
|
||||
Public CURRENT_SCAN_FOLDERWATCH As String = ""
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Imports System.IO
|
||||
Imports System.Xml
|
||||
|
||||
Module ModuleMySettings
|
||||
Imports DigitalData.Modules.Windream
|
||||
Module ModuleRuntime
|
||||
'Dim ConfigPath As String = Path.Combine(Application.UserAppDataPath(), "UserConfig.xml")
|
||||
Public Const USER_CONFIG_FILE = "UserConfig.xml"
|
||||
Public Const COMPUTER_CONFIG_FILE = "ComputerConfig.xml"
|
||||
@ -9,7 +9,19 @@ Module ModuleMySettings
|
||||
Public MyConnectionString As String = ""
|
||||
Public LogErrorsOnly As Boolean = True
|
||||
Public GI_withWindream As Boolean = False
|
||||
Public vWLaufwerk As String = "W"
|
||||
'Public vWLaufwerk As String = "W"
|
||||
'Public myPreviewActive As Boolean = True
|
||||
Public FW_started As Boolean = False
|
||||
Public IDB_ACTIVE As Boolean = False
|
||||
Public WORKING_MODE As String
|
||||
Public CONNECTION_STRING_IDB As String
|
||||
|
||||
Public IDBData As ClassIDBData
|
||||
Public IDB_USES_WMFILESTORE As Boolean = False
|
||||
Public IDB_DOC_DATA_SQL As String
|
||||
Public IDB_DT_DOC_DATA As DataTable
|
||||
Public IDB_DOC_ID As Int64
|
||||
Public IDB_LOG_INDEX As String
|
||||
|
||||
Public WINDREAM As Windream
|
||||
End Module
|
||||
@ -7,7 +7,8 @@ Public Class frmAdministration
|
||||
Public Shared _aktDokart_Id As Integer
|
||||
|
||||
Private GroupToDelete As Integer = Nothing
|
||||
|
||||
Private SourceAttributes As List(Of String)
|
||||
Private SourceObjectTypes As List(Of String)
|
||||
Private IsInsert As Boolean = False
|
||||
Dim frmloaded As Boolean = False
|
||||
Private Sub TBDD_DOKUMENTARTBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs)
|
||||
@ -72,10 +73,15 @@ Public Class frmAdministration
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in frmAdministration_Load: " & vbNewLine & ex.Message, MsgBoxStyle.Exclamation)
|
||||
End Try
|
||||
If GI_withWindream = True Then
|
||||
If ClassWindream.Init() = True Then
|
||||
End If
|
||||
If IDB_ACTIVE = False Then
|
||||
WINDREAM_DIRECTCheckBox.Visible = True
|
||||
Else
|
||||
WINDREAM_DIRECTCheckBox.Visible = False
|
||||
End If
|
||||
'If GI_withWindream = True Then
|
||||
' If ClassWindream.Init() = True Then
|
||||
' End If
|
||||
'End If
|
||||
End Sub
|
||||
Private Sub ObjektTypenEintragen()
|
||||
Try
|
||||
@ -86,12 +92,17 @@ Public Class frmAdministration
|
||||
Me.OBJEKTTYPComboBox.Items.Clear()
|
||||
ListBoxControl1.Items.Clear()
|
||||
' alle Objekttypen durchlaufen
|
||||
For Each oDokumentTyp In ClassWindream.GetObjecttypesAsObjects
|
||||
If SourceObjectTypes Is Nothing Then
|
||||
SourceObjectTypes = WINDREAM.ObjectTypes
|
||||
End If
|
||||
|
||||
For Each otype As String In SourceObjectTypes
|
||||
' und in die Combobox eintragen
|
||||
Me.OBJEKTTYPComboBox.Items.Add(oDokumentTyp.aName)
|
||||
ListBoxControl1.Items.Add(oDokumentTyp.aName)
|
||||
Next
|
||||
|
||||
|
||||
pnlObjekttype_Config.Enabled = True
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Unexpected error inm Eintragen der Objekttypen")
|
||||
@ -306,9 +317,14 @@ Public Class frmAdministration
|
||||
If Me.OBJEKTTYPComboBox.SelectedIndex <> -1 Then
|
||||
Me.WD_INDEXComboBox.Items.Clear()
|
||||
Me.WD_INDEXComboBox.Items.Add("")
|
||||
Dim indexe = ClassWindream.GetIndicesByObjecttype(OBJEKTTYPComboBox.Text)
|
||||
If indexe IsNot Nothing Then
|
||||
For Each index As String In indexe
|
||||
If SourceAttributes Is Nothing Then
|
||||
SourceAttributes = WINDREAM.GetIndiciesByObjecttype(OBJEKTTYPComboBox.Text)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If SourceAttributes IsNot Nothing Then
|
||||
For Each index As String In SourceAttributes
|
||||
Me.WD_INDEXComboBox.Items.Add(index)
|
||||
Next
|
||||
End If
|
||||
@ -321,9 +337,11 @@ Public Class frmAdministration
|
||||
Try
|
||||
If Me.OBJEKTTYPComboBox.SelectedIndex <> -1 Then
|
||||
Me.INDEXNAME_AutoIndexCMB.Items.Clear()
|
||||
Dim indexe = ClassWindream.GetIndicesByObjecttype(OBJEKTTYPComboBox.Text)
|
||||
If indexe IsNot Nothing Then
|
||||
For Each index As String In indexe
|
||||
If SourceAttributes Is Nothing Then
|
||||
SourceAttributes = WINDREAM.GetIndiciesByObjecttype(OBJEKTTYPComboBox.Text)
|
||||
End If
|
||||
If SourceAttributes IsNot Nothing Then
|
||||
For Each index As String In SourceAttributes
|
||||
Me.INDEXNAME_AutoIndexCMB.Items.Add(index)
|
||||
Next
|
||||
End If
|
||||
@ -510,10 +528,14 @@ Public Class frmAdministration
|
||||
IDX_EMAIL_SUBJECTComboBox.Items.Clear()
|
||||
IDX_EMAIL_TOComboBox.Items.Clear()
|
||||
IDX_CHECK_ATTACHMENTComboBox.Items.Clear()
|
||||
Dim indexe = ClassWindream.GetIndicesByObjecttype(Otype)
|
||||
If indexe IsNot Nothing Then
|
||||
For Each index As String In indexe
|
||||
Select Case ClassWindream.GetTypeOfIndexAsIntByName(index)
|
||||
If SourceAttributes Is Nothing Then
|
||||
SourceAttributes = WINDREAM.GetIndiciesByObjecttype(Otype)
|
||||
End If
|
||||
|
||||
|
||||
If SourceAttributes IsNot Nothing Then
|
||||
For Each index As String In SourceAttributes
|
||||
Select Case WINDREAM.GetIndexType(index)
|
||||
Case 4 'Boolean
|
||||
Me.IDX_CHECK_ATTACHMENTComboBox.Items.Add(index)
|
||||
Case Else
|
||||
@ -537,7 +559,10 @@ Public Class frmAdministration
|
||||
' Combobox leeren
|
||||
ListBoxControl1.Items.Clear()
|
||||
' alle Objekttypen durchlaufen
|
||||
For Each oDokumentTyp In ClassWindream.GetObjecttypesAsObjects
|
||||
If SourceObjectTypes Is Nothing Then
|
||||
SourceObjectTypes = WINDREAM.ObjectTypes
|
||||
End If
|
||||
For Each oDokumentTyp In SourceObjectTypes
|
||||
' und in die Combobox eintragen
|
||||
ListBoxControl1.Items.Add(oDokumentTyp.aName)
|
||||
Next
|
||||
@ -596,10 +621,7 @@ Public Class frmAdministration
|
||||
lblWDINDEX.Visible = True
|
||||
OBJEKTTYPComboBox.Visible = True
|
||||
WD_INDEXComboBox.Visible = True
|
||||
|
||||
If ClassWindream.Init() = True Then
|
||||
ObjektTypenEintragen()
|
||||
End If
|
||||
Else
|
||||
lblObjekttyp.Visible = False
|
||||
lblWDINDEX.Visible = False
|
||||
@ -1007,7 +1029,7 @@ Public Class frmAdministration
|
||||
End If
|
||||
|
||||
' Vektorindexe fangen bei 4000 an
|
||||
Return ClassWindream.GetTypeOfIndexAsIntByName(selectedIndexName) > 4000
|
||||
Return WINDREAM.GetIndexType(selectedIndexName) > 4000
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
|
||||
@ -7,10 +7,11 @@
|
||||
' Combobox leeren
|
||||
Me.cmbObjekttyp.Items.Clear()
|
||||
' alle Objekttypen durchlaufen
|
||||
For Each oDokumentTyp In ClassWindream.GetObjecttypesAsObjects
|
||||
For Each otype As String In WINDREAM.ObjectTypes
|
||||
' und in die Combobox eintragen
|
||||
Me.cmbObjekttyp.Items.Add(oDokumentTyp.aName)
|
||||
Me.cmbObjekttyp.Items.Add(otype)
|
||||
Next
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Unexpected error inm Eintragen der Objekttypen")
|
||||
End Try
|
||||
@ -40,13 +41,11 @@
|
||||
GroupBox1.Visible = True
|
||||
GroupBox2_Controls.Visible = False
|
||||
GroupBoxMainWindow.Visible = False
|
||||
If ClassWindream.Init() = True Then
|
||||
If IDB_ACTIVE = False Then
|
||||
ObjektTypenEintragen()
|
||||
Else
|
||||
MsgBox("Windream konnte nicht initiiert werden! Formular wird geschlossen - Check logfile", MsgBoxStyle.Information)
|
||||
Me.Close()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
Sub load_users()
|
||||
Try
|
||||
|
||||
@ -568,7 +568,7 @@ Public Class frmIndex
|
||||
Case "Username".ToUpper
|
||||
oNamenkonvention = oNamenkonvention.Replace(oElement.Value, Environment.UserName)
|
||||
Case "Usercode".ToUpper
|
||||
oNamenkonvention = oNamenkonvention.Replace(oElement.Value, USER_SHORT_NAME)
|
||||
oNamenkonvention = oNamenkonvention.Replace(oElement.Value, USER_SHORTNAME)
|
||||
Case ""
|
||||
End Select
|
||||
If datetemp <> "" Then
|
||||
@ -697,13 +697,15 @@ Public Class frmIndex
|
||||
Count += 1
|
||||
|
||||
' den Typ des Zielindexes auslesen
|
||||
Dim indexType As Integer = ClassWindream.GetTypeOfIndexAsIntByName(indexname)
|
||||
Dim indexType As Integer = WINDREAM.GetIndexType(indexname)
|
||||
|
||||
If indexType < ClassWindream.WMObjectVariableValueTypeVector Then
|
||||
indexierung_erfolgreich = ClassWindream.DateiIndexieren(CURRENT_NEWFILENAME, indexname, idxvalue)
|
||||
If indexType < WINDREAM.WMObjectVariableValueTypeVector Then
|
||||
indexierung_erfolgreich = WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, indexname, idxvalue, CURR_DOKART_OBJECTTYPE)
|
||||
Else
|
||||
Dim indexArray = Split(idxvalue, ClassConstants.VECTORSEPARATOR)
|
||||
indexierung_erfolgreich = ClassWindream.Indexiere(CURRENT_NEWFILENAME.Substring(2), indexname, indexArray)
|
||||
Dim oSplitArray = Split(idxvalue, ClassConstants.VECTORSEPARATOR)
|
||||
Dim oListofString As List(Of String)
|
||||
oListofString = (From o In oSplitArray Select 0.ToString.ToList)
|
||||
indexierung_erfolgreich = WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, indexname, oListofString, CURR_DOKART_OBJECTTYPE)
|
||||
End If
|
||||
|
||||
'indexierung_erfolgreich = ClassWindream.DateiIndexieren(CURRENT_NEWFILENAME, indexname, idxvalue)
|
||||
@ -739,16 +741,18 @@ Public Class frmIndex
|
||||
Count += 1
|
||||
|
||||
' den Typ des Zielindexes auslesen
|
||||
Dim indexType As Integer = ClassWindream.GetTypeOfIndexAsIntByName(indexname)
|
||||
Dim indexType As Integer = WINDREAM.GetIndexType(indexname)
|
||||
|
||||
If indexType < ClassWindream.WMObjectVariableValueTypeVector Then
|
||||
indexierung_erfolgreich = ClassWindream.DateiIndexieren(CURRENT_NEWFILENAME, indexname, Indexvalue)
|
||||
If indexType < WINDREAM.WMObjectVariableValueTypeVector Then
|
||||
indexierung_erfolgreich = WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, indexname, Indexvalue, CURR_DOKART_OBJECTTYPE)
|
||||
Else
|
||||
Dim indexArray = Split(Indexvalue, ClassConstants.VECTORSEPARATOR)
|
||||
indexierung_erfolgreich = ClassWindream.Indexiere(CURRENT_NEWFILENAME.Substring(2), indexname, indexArray)
|
||||
Dim oSplitArray = Split(Indexvalue, ClassConstants.VECTORSEPARATOR)
|
||||
Dim oListofString As List(Of String)
|
||||
oListofString = (From o In oSplitArray Select 0.ToString.ToList)
|
||||
indexierung_erfolgreich = WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, indexname, oListofString, CURR_DOKART_OBJECTTYPE)
|
||||
End If
|
||||
|
||||
indexierung_erfolgreich = ClassWindream.DateiIndexieren(CURRENT_NEWFILENAME, indexname, Indexvalue)
|
||||
indexierung_erfolgreich = WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, indexname, Indexvalue, CURR_DOKART_OBJECTTYPE)
|
||||
If indexierung_erfolgreich = False Then
|
||||
MsgBox("Error in indexing file - See log", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
@ -782,7 +786,7 @@ Public Class frmIndex
|
||||
Private Function WriteIndex2File(indexname As String, indexvalue As String)
|
||||
Try
|
||||
LOGGER.Info(" >> Indexvalue: " & indexvalue.ToString)
|
||||
Return ClassWindream.DateiIndexieren(CURRENT_NEWFILENAME, indexname, indexvalue)
|
||||
Return WINDREAM.SetFileIndex(CURRENT_NEWFILENAME, indexname, indexvalue, CURR_DOKART_OBJECTTYPE)
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in WriteIndex2File:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
@ -838,9 +842,9 @@ Public Class frmIndex
|
||||
finalize_pattern = rowregex.Item("REGEX")
|
||||
End If
|
||||
Next
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = '" & ClassWindream._WDObjekttyp & "'")
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = '" & CURR_DOKART_OBJECTTYPE & "'")
|
||||
If IsNothing(DT) Then
|
||||
LOGGER.Info(" >> SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = '" & ClassWindream._WDObjekttyp & "' RESULTED in NOTHING")
|
||||
LOGGER.Info(" >> SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = '" & CURR_DOKART_OBJECTTYPE & "' RESULTED in NOTHING")
|
||||
Return False
|
||||
End If
|
||||
If DT.Rows.Count = 1 Then
|
||||
@ -1127,7 +1131,7 @@ Public Class frmIndex
|
||||
Private Function SetAttachmentIndices()
|
||||
Dim indexierung_erfolgreich As Boolean = True
|
||||
Try
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = '" & ClassWindream._WDObjekttyp & "'")
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = '" & CURR_DOKART_OBJECTTYPE & "'")
|
||||
If DT.Rows.Count = 1 Then
|
||||
|
||||
If Not CURRENT_MESSAGEID Is Nothing Then
|
||||
@ -1172,8 +1176,8 @@ Public Class frmIndex
|
||||
|
||||
Private Function SINGLEFILE_2_WINDREAM(_Objekttyp As String)
|
||||
Try
|
||||
ClassWindream._WDObjekttyp = _Objekttyp
|
||||
Dim streamresult = ClassWindream.Stream_File(CURRENT_WORKFILE, CURRENT_NEWFILENAME)
|
||||
CURR_DOKART_OBJECTTYPE = _Objekttyp
|
||||
Dim streamresult = WINDREAM.NewFileStream(CURRENT_WORKFILE, CURRENT_NEWFILENAME)
|
||||
|
||||
If CONFIG.Config.DeleteOriginalFile = True Then
|
||||
Try
|
||||
@ -1751,7 +1755,7 @@ Public Class frmIndex
|
||||
Dim oPlaceholderResult As String
|
||||
Dim oValue As String = ClassHelper.NotNull(oAutoIndexRow.Item("VALUE"), "")
|
||||
|
||||
oPlaceholderResult = GetPlaceholderValue(oValue, CURRENT_WORKFILE, USER_SHORT_NAME)
|
||||
oPlaceholderResult = GetPlaceholderValue(oValue, CURRENT_WORKFILE, USER_SHORTNAME)
|
||||
|
||||
If Not IsNothing(oPlaceholderResult) Then
|
||||
oValue = oPlaceholderResult
|
||||
@ -1774,7 +1778,7 @@ Public Class frmIndex
|
||||
Dim oManualIndexResult As String = Nothing
|
||||
|
||||
' Einfachen Platzhalter Wert erzeugen
|
||||
oPlaceholderResult = GetPlaceholderValue(oIndexValue, CURRENT_WORKFILE, USER_SHORT_NAME)
|
||||
oPlaceholderResult = GetPlaceholderValue(oIndexValue, CURRENT_WORKFILE, USER_SHORTNAME)
|
||||
|
||||
' Einfachen Platzhalter ersetzen
|
||||
If Not IsNothing(oPlaceholderResult) Then
|
||||
@ -2241,10 +2245,6 @@ Public Class frmIndex
|
||||
exp2WD = SINGLEFILE_2_WINDREAM(CURR_DOKART_OBJECTTYPE)
|
||||
End If
|
||||
If exp2WD = True Then
|
||||
'Prüfen ob Session da ist - wenn nicht nochmal neu initiieren
|
||||
If ClassWindream._session Is Nothing Then
|
||||
ClassWindream.Init()
|
||||
End If
|
||||
'Kein Fehler in Export2windream
|
||||
err = False
|
||||
If Write_Indizes() = True Then
|
||||
|
||||
@ -318,7 +318,7 @@ Public Class frmStart
|
||||
IndexForm = New frmIndex()
|
||||
|
||||
'Lizenz abgellaufen, überprüfen ob User Admin ist
|
||||
If LICENSE_COUNT < UserLoggedin Then
|
||||
If LICENSE_COUNT < USERCOUNT_LOGGED_IN Then
|
||||
If USER_IS_ADMIN = True Then
|
||||
LOGGER.Info(">> User is Admin - Timer will be started")
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
@ -647,7 +647,7 @@ Public Class frmStart
|
||||
End If
|
||||
End Sub
|
||||
Private Sub TimerClose3Minutes_Tick(sender As Object, e As EventArgs) Handles TimerClose3Minutes.Tick
|
||||
If LICENSE_EXPIRED = True Or LICENSE_COUNT < UserLoggedin Then
|
||||
If LICENSE_EXPIRED = True Or LICENSE_COUNT < USERCOUNT_LOGGED_IN Then
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
MsgBox("Global Indexer wird nun geschlossen, weil keine neue Lizenzdaten eingegeben wurden!", MsgBoxStyle.Information)
|
||||
Else
|
||||
@ -730,4 +730,11 @@ Public Class frmStart
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub frmStart_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp
|
||||
If e.KeyCode = Keys.F12 Then
|
||||
If START_INCOMPLETE Then
|
||||
frmLicense.ShowDialog()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Loading…
x
Reference in New Issue
Block a user