MS Initial without WM
This commit is contained in:
parent
61a3e9b6d3
commit
64be5b9363
@ -1,8 +1,6 @@
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.OracleClient
|
||||
Imports System.IO
|
||||
Imports WINDREAMLib
|
||||
|
||||
Public Class ClassAllgemeineFunktionen
|
||||
Public Shared Function GUI_LANGUAGE_INFO(pTITLE As String)
|
||||
Dim oFilteredDatatable As DataTable = BASEDATA_DT_GUI_LANGUAGE_PHRASES.Clone()
|
||||
@ -149,82 +147,8 @@ Public Class ClassAllgemeineFunktionen
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Public Function Delete_xffres(originFile As String, clsWD As ClassWindream_allgemein)
|
||||
Try
|
||||
Dim Stammname As String = System.IO.Path.GetFileNameWithoutExtension(originFile)
|
||||
Dim Path As String = System.IO.Path.GetDirectoryName(originFile)
|
||||
Dim xffres As String = Path & "\" & Stammname & ".xffres"
|
||||
If file_exists(xffres, clsWD) = True Then
|
||||
System.IO.File.Delete(xffres)
|
||||
LOGGER.Info("Datei " & xffres & " erfolgreich gelöscht")
|
||||
Return True
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info(" Fehler bei Delete_xffres", True)
|
||||
LOGGER.Info("Fehlermeldung: " & ex.Message)
|
||||
End Try
|
||||
End Function
|
||||
'Public Function Delete_File(originFile As String)
|
||||
' Try
|
||||
|
||||
' If file_exists(originFile, False) = True Then
|
||||
' System.IO.File.Delete(originFile)
|
||||
' LOGGER.Info("Manuelles Löschen: Datei " & originFile & " erfolgreich gelöscht", False)
|
||||
' Return True
|
||||
' Else
|
||||
' MsgBox("Die Datei konnte nicht gelsöcht werden. File NOT EXISTS", MsgBoxStyle.Exclamation)
|
||||
' Return False
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' LOGGER.Info(" Fehler bei Delete_File", True)
|
||||
' LOGGER.Info("Fehlermeldung: " & ex.Message)
|
||||
' End Try
|
||||
'End Function
|
||||
|
||||
Public Function Move2Folder(ByVal vMove_File As String, ByVal vZiel_Pfad As String, Profile_ID As Integer, clsWD As ClassWindream_allgemein)
|
||||
Try
|
||||
|
||||
Dim extension As String = IO.Path.GetExtension(vMove_File)
|
||||
Dim Filename As String = IO.Path.GetFileName(vMove_File)
|
||||
Dim path As String = IO.Path.GetDirectoryName(vMove_File)
|
||||
Dim _Ziel As String
|
||||
_Ziel = vZiel_Pfad & "\" & Filename
|
||||
Dim version As Integer = 1
|
||||
If vZiel_Pfad <> path Then
|
||||
Dim Stammname As String = IO.Path.GetFileNameWithoutExtension(vMove_File)
|
||||
Do While file_exists(_Ziel, clsWD) = True
|
||||
Dim neuername As String = Stammname & "~" & version & extension
|
||||
_Ziel = neuername
|
||||
version = version + 1
|
||||
Loop
|
||||
My.Computer.FileSystem.MoveFile(vMove_File, _Ziel)
|
||||
LOGGER.Info("Datei erfolgreich verschoben - Ziel: " & _Ziel)
|
||||
Else
|
||||
LOGGER.Info("Ziel und Quellpfad sind identisch!")
|
||||
End If
|
||||
|
||||
Return ""
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Fehler bei Move2Folder", True)
|
||||
LOGGER.Info("Fehlermeldung")
|
||||
LOGGER.Info(ex.Message)
|
||||
Insert_LogEntry($"ERROR {ex.Message}")
|
||||
Return ex.Message
|
||||
End Try
|
||||
End Function
|
||||
Public Function file_exists(ByVal _file As String, clsWD As ClassWindream_allgemein)
|
||||
Try
|
||||
Return clsWD.CheckFileExists(_file)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Fehler in Funktion file_exists - Fehler: ", ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Function checkValue_Exists(sqlbefehl As String, Replace_value As String, Check_value As String, Typ As String, connString As String, profilid As Integer)
|
||||
Try
|
||||
Dim sql As String
|
||||
|
||||
@ -8,15 +8,6 @@ Public Class ClassConfig
|
||||
Public Property ConnectionStringTest As String = ""
|
||||
Public Property TestMode As Boolean = False
|
||||
|
||||
' PDF Viewer Settings
|
||||
Public Property UniversalViewerPath As String = ""
|
||||
Public Property XChangeViewerPath As String = ""
|
||||
Public Property SumatraViewerPath As String = ""
|
||||
|
||||
Public Property PDFViewerZoomLevel As Integer = 3
|
||||
Public Property PDFViewer As String = "internal"
|
||||
Public Property DefaultViewer As String = "docview"
|
||||
|
||||
' Windream Settings
|
||||
Public Property IndexDmsErstellt As String = "DMS erstellt"
|
||||
Public Property IndexDmsErstelltZeit As String = "DMS erstellt (Zeit)"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
Public Class ClassFinalizeDoc
|
||||
Public Shared Function Write_Final_Metadata(WMObject As WINDREAMLib.WMObject)
|
||||
Public Shared Function WMWrite_Final_Metadata(WMObject As Object) 'WINDREAMLib.WMObject)
|
||||
Try
|
||||
Dim _error As Boolean = False
|
||||
If CURRENT_DT_FINAL_INDEXING Is Nothing Then
|
||||
@ -14,32 +14,10 @@
|
||||
Dim INDEXNAME = dr.Item("INDEXNAME").ToString
|
||||
If value.ToUpper = "SQL-Command".ToUpper Then '###### Indexierung mit variablen SQL ###
|
||||
LOGGER.Debug("indexing with dynamic sql...")
|
||||
'Dim SQL_COMMAND = dr.Item("SQL_COMMAND")
|
||||
'' Regulären Ausdruck zum Auslesen der Indexe definieren
|
||||
'Dim preg As String = "\[%{1}[a-zA-Z0-9\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}"
|
||||
'' einen Regulären Ausdruck laden
|
||||
'Dim regulärerAusdruck As System.Text.RegularExpressions.Regex = New System.Text.RegularExpressions.Regex(preg)
|
||||
'' die Vorkommen im SQL-String auslesen
|
||||
'Dim elemente As System.Text.RegularExpressions.MatchCollection = regulärerAusdruck.Matches(SQL_COMMAND)
|
||||
''####
|
||||
'' alle Vorkommen innerhalbd er Namenkonvention durchlaufen
|
||||
'For Each element As System.Text.RegularExpressions.Match In elemente
|
||||
' Try
|
||||
' If LogErrorsOnly = False Then LOGGER.Info(" element in RegeX: " & element.Value)
|
||||
' Dim WDINDEXNAME = element.Value.Substring(2, element.Value.Length - 3)
|
||||
' Dim wertWD = WMObject.GetVariableValue(WDINDEXNAME)
|
||||
' If Not IsNothing(wertWD) Then
|
||||
' SQL_COMMAND = SQL_COMMAND.ToString.Replace(element.Value, wertWD)
|
||||
' Else
|
||||
' LOGGER.Info(">>Attention: indexvalue is invalid")
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' LOGGER.Info("Unexpected Error in Checking control values for Variable SQL Result - ERROR: " & ex.Message)
|
||||
' End Try
|
||||
'Next
|
||||
|
||||
Dim sql_Statement = clsPatterns.ReplaceUserValues(dr.Item("SQL_COMMAND"), USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
sql_Statement = clsPatterns.ReplaceInternalValues(sql_Statement)
|
||||
sql_Statement = clsPatterns.ReplaceWindreamIndicies(sql_Statement, WMObject)
|
||||
|
||||
|
||||
LOGGER.Debug("sql after ReplaceAllValues: " & sql_Statement)
|
||||
Dim dynamic_value = ClassDatabase.Execute_Scalar(sql_Statement, CONNECTION_STRING, True)
|
||||
@ -65,7 +43,7 @@
|
||||
ReDim Preserve result(0)
|
||||
result(0) = value
|
||||
|
||||
Dim oIndexType = WINDREAM.GetTypeOfIndex(INDEXNAME)
|
||||
Dim oIndexType = "" 'WINDREAM.GetTypeOfIndex(INDEXNAME)
|
||||
LOGGER.Debug($"oIndexType {oIndexType.ToString}")
|
||||
If oIndexType > 4000 And oIndexType < 5000 Then
|
||||
'Hier muss nun separat als Vektorfeld indexiert werden
|
||||
@ -79,7 +57,7 @@
|
||||
End If
|
||||
Else
|
||||
LOGGER.Debug("now indexing..")
|
||||
If Indexiere_File(INDEXNAME, result, WMObject) = True Then
|
||||
If WMIndexiere_File(INDEXNAME, result, WMObject) = True Then
|
||||
LOGGER.Debug("FINALER INDEX '" & INDEXNAME & "' WURDE ERFOLGREICH GESETZT")
|
||||
LOGGER.Debug("")
|
||||
'Nun das Logging
|
||||
@ -112,7 +90,7 @@
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Shared Function Indexiere_File(idxxname As String, idxvalue As Object, WMObject As WINDREAMLib.WMObject)
|
||||
Private Shared Function WMIndexiere_File(idxxname As String, idxvalue As Object, WMObject As Object) 'WINDREAMLib.WMObject)
|
||||
Dim File_indexiert As Boolean = False
|
||||
|
||||
' Try
|
||||
@ -141,7 +119,7 @@
|
||||
End If
|
||||
'Dim _windreamPM As New ClassPMWindream
|
||||
'Jetzt das eigentliche Indexieren der Datei
|
||||
File_indexiert = WINDREAM.RunIndexing(WMObject, arrIndex, arrValue)
|
||||
File_indexiert = "ToDo IDB" ' WINDREAM.RunIndexing(WMObject, arrIndex, arrValue)
|
||||
|
||||
Return File_indexiert
|
||||
End If
|
||||
@ -151,7 +129,7 @@
|
||||
' Return Err()
|
||||
'End Try
|
||||
End Function
|
||||
Private Shared Function Indexiere_VektorfeldPM(input As String, NameVectorfield As String, WMObject As WINDREAMLib.WMObject)
|
||||
Private Shared Function Indexiere_VektorfeldPM(input As String, NameVectorfield As String, WMObject As Object) ' WINDREAMLib.WMObject)
|
||||
|
||||
Dim _success As Boolean = True
|
||||
Dim Anzahl As Integer = 0
|
||||
@ -185,7 +163,7 @@
|
||||
|
||||
If myInputArr.Length > 0 Then
|
||||
'Jetzt die Datei indexieren
|
||||
If Indexiere_File(NameVectorfield, myInputArr, WMObject) = False Then
|
||||
If WMIndexiere_File(NameVectorfield, myInputArr, WMObject) = False Then
|
||||
_success = False
|
||||
'errmessage = "Fehler beim Indexieren Vektorfeld '" & NameVKTIndex & "' - ERROR: " & idxerr_message
|
||||
End If
|
||||
|
||||
@ -17,7 +17,7 @@ Public Class ClassInit
|
||||
LOGCONFIG = New LogConfig(LogConfig.PathType.AppData)
|
||||
LOGGER = LOGCONFIG.GetLogger("ProcessManager")
|
||||
|
||||
LOGGER.Info("## ProcessManager für Windream gestartet - {0}", Now)
|
||||
LOGGER.Info("## ProcessManager started - {0}", Now)
|
||||
End Sub
|
||||
|
||||
<STAThread()>
|
||||
|
||||
@ -1,628 +0,0 @@
|
||||
Imports WINDREAMLib
|
||||
Imports WMOSRCHLib
|
||||
|
||||
Public Class ClassPMWindream
|
||||
|
||||
Inherits ClassWindream_allgemein
|
||||
Dim clsWM As ClassWindream_allgemein
|
||||
'Private email As New ClassNIEmail
|
||||
Private allgFunk As New ClassAllgemeineFunktionen
|
||||
#Region "+++++ Konstanten +++++"
|
||||
Protected Const WMObjectEditModeObject = &H1F
|
||||
Protected Const WMObjectStreamOpenModeReadWrite = 2
|
||||
Protected Const WMEntityObjectType = 10
|
||||
Protected Const WMEntityDocument = 1
|
||||
|
||||
Const WMObjectVariableValueTypeUndefined = 0
|
||||
Const WMObjectVariableValueTypeString = 1
|
||||
Const WMObjectVariableValueTypeInteger = 2
|
||||
Const WMObjectVariableValueTypeFloat = 3
|
||||
Const WMObjectVariableValueTypeBoolean = 4
|
||||
Const WMObjectVariableValueTypeDate = 5
|
||||
Const WMObjectVariableValueTypeFixedPoint = 6
|
||||
Const WMObjectVariableValueTypeTimeStamp = 7
|
||||
Const WMObjectVariableValueTypeCurrency = 8
|
||||
Const WMObjectVariableValueTypeTime = 9
|
||||
Const WMObjectVariableValueTypeVariant = 10
|
||||
Const WMObjectVariableValueTypeMask = &HFFF
|
||||
Const WMObjectVariableValueFlagMask = &HFFFFF000
|
||||
Const WMObjectVariableValueTypeVector = &H1000
|
||||
Const WMObjectVariableValueTypeFulltext = &H2000
|
||||
Const WMObjectVariableValueTypeDefaultValue = &H4000
|
||||
|
||||
Const WMObjectEditModeIndexEdit = &H3DA
|
||||
#End Region
|
||||
|
||||
#Region "+++++ Variablen +++++"
|
||||
Private oController As New WMOSearchController
|
||||
#End Region
|
||||
|
||||
#Region "+++++ Allgemeine Methoden und Funktionen +++++"
|
||||
Sub New()
|
||||
MyBase.New()
|
||||
End Sub
|
||||
Private Function IsNotEmpty(ByVal aValue As Object)
|
||||
If aValue IsNot Nothing Then
|
||||
Return True
|
||||
|
||||
'If TypeOf aValue Is String Then
|
||||
' ' Änderung 28.08.2018: Auch ein leerer String gilt als Wert, damit indexfelder auch geleert werden können
|
||||
' 'If Not aValue = "" Then
|
||||
' ' Return True
|
||||
' 'End If
|
||||
|
||||
' Return False
|
||||
'Else
|
||||
' Return True
|
||||
'End If
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
Private Function return_type(ByVal _wert As Object)
|
||||
Return _wert.GetType
|
||||
End Function
|
||||
Public Function GetValuesfromAuswahlliste(ByVal listname As String)
|
||||
Try
|
||||
'Dim oAttribute = Me.oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityAttribute, listname)
|
||||
'Dim vType = oAttribute.getVariableValue("vItems")
|
||||
'Return vType
|
||||
Dim oChoiceList = oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityChoiceList, listname)
|
||||
If Err.Number = 0 And TypeName(oChoiceList) <> "Nothing" Then
|
||||
Dim Values = oChoiceList
|
||||
Values = oChoiceList.GetVariableValue("vItems")
|
||||
Dim anz As Integer = 0
|
||||
|
||||
For Each CLItem In Values
|
||||
If oChoiceList.aName IsNot Nothing Then
|
||||
anz += 1
|
||||
End If
|
||||
Next
|
||||
Dim strListe(anz - 1)
|
||||
Dim zahl As Integer = 0
|
||||
For Each CLItem In Values
|
||||
If oChoiceList.aName IsNot Nothing Then
|
||||
strListe(zahl) = CLItem
|
||||
zahl += 1
|
||||
End If
|
||||
Next
|
||||
Return strListe
|
||||
Else
|
||||
MsgBox("Auswahlliste: " & listname & " nicht gefunden!", MsgBoxStyle.Critical, "Fehler:")
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler in GetValuesfromAuswahlliste:")
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
Public Function Return_Type(Indexname As String)
|
||||
Try
|
||||
' das entsprechende Attribut aus windream auslesen
|
||||
Dim oAttribute = Me.oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityAttribute, Indexname)
|
||||
' den Variablentyp (String, Integer, ...) auslesen
|
||||
Dim vType = oAttribute.getVariableValue("dwAttrType")
|
||||
Return vType.ToString
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler in Return_Type:")
|
||||
Return ""
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function RunIndexing(ByVal oDocument As WMObject, ByVal Indizes() As String, ByVal aValues() As Object)
|
||||
Dim vType
|
||||
Try
|
||||
If Indizes IsNot Nothing And aValues IsNot Nothing Then
|
||||
If Not oDocument.aLocked Then
|
||||
|
||||
' 02.07. Änderung der Lock Methode, um eine Validierung auch zuzulassen, wenn das Recht "Datei ändern"
|
||||
' nicht gesetzt ist
|
||||
'oDocument.lock()
|
||||
|
||||
Try
|
||||
oDocument.LockFor(WMObjectEditModeIndexEdit)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
frmValidator.idxerr_message = "Could not lock WMFile - Check Your rights and inform the admin!"
|
||||
Return False
|
||||
End Try
|
||||
|
||||
Dim i As Integer = 0
|
||||
Dim indexname As String
|
||||
If aValues.Length = 1 And aValues(0) = "" Then
|
||||
LOGGER.Debug("Indexwert ist leer/Nothing - Keine Indexierung")
|
||||
End If
|
||||
'Jetzt jeden Indexwert durchlaufen
|
||||
For Each aName As String In Indizes
|
||||
indexname = aName
|
||||
' das entsprechende Attribut aus windream auslesen
|
||||
Dim oAttribute = Me.oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityAttribute, Indizes(i))
|
||||
' den Variablentyp (String, Integer, ...) auslesen
|
||||
vType = oAttribute.getVariableValue("dwAttrType")
|
||||
' wenn in aValues an Position i ein Wert steht
|
||||
|
||||
If IsNotEmpty(aValues(i)) Then
|
||||
Dim _int As Boolean = False
|
||||
Dim _date As Boolean = False
|
||||
Dim _dbl As Boolean = False
|
||||
Dim _bool As Boolean = False
|
||||
'If indexname = "Tournr" Then
|
||||
' MsgBox("Index: " & indexname & vbNewLine & "wert: " & aValues(i), MsgBoxStyle.Information, "Index: " & aName.ToString)
|
||||
'End If
|
||||
LOGGER.Debug(" ### Indexierung von Index: " & indexname & " ####")
|
||||
'MsgBox(oDocument.aName & vbNewLine & aValues(i) & vbNewLine & vType, MsgBoxStyle.Exclamation, "Zeile 87")
|
||||
Dim value = aValues(i)
|
||||
Dim convertValue
|
||||
Dim vektor As Boolean = False
|
||||
'Den Typ des Index-Feldes auslesen
|
||||
'MsgBox(value.GetType.ToString)
|
||||
Select Case vType
|
||||
'Case WMObjectVariableValueTypeUndefined
|
||||
Case WMObjectVariableValueTypeString
|
||||
LOGGER.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeString")
|
||||
convertValue = CStr(value)
|
||||
Case WMObjectVariableValueTypeInteger
|
||||
LOGGER.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeInteger")
|
||||
If IsNumeric(value) = False Then
|
||||
frmValidator.idxerr_message = "Unerlaubte Eingabe in Numerisches Feld: " & value
|
||||
LOGGER.Debug("Achtung: Value " & value & " kann nicht in Zahl konvertiert werden!")
|
||||
oDocument.Save()
|
||||
oDocument.unlock()
|
||||
Return False
|
||||
End If
|
||||
convertValue = CInt(value)
|
||||
_int = True
|
||||
Case WMObjectVariableValueTypeFloat
|
||||
LOGGER.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeFloat")
|
||||
Try
|
||||
convertValue = CDbl(value)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
frmValidator.idxerr_message = "Could't convert value '" & value & "' to double!"
|
||||
oDocument.Save()
|
||||
oDocument.unlock()
|
||||
Return False
|
||||
End Try
|
||||
|
||||
Case WMObjectVariableValueTypeFixedPoint
|
||||
LOGGER.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeFixedPoint")
|
||||
Try
|
||||
convertValue = CDbl(value)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
frmValidator.idxerr_message = "Could't convert value '" & value & "' to double!"
|
||||
oDocument.Save()
|
||||
oDocument.unlock()
|
||||
Return False
|
||||
End Try
|
||||
|
||||
_dbl = True
|
||||
Case WMObjectVariableValueTypeBoolean
|
||||
LOGGER.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeBoolean")
|
||||
convertValue = CBool(value)
|
||||
_bool = True
|
||||
Case WMObjectVariableValueTypeDate
|
||||
LOGGER.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeDate")
|
||||
_date = True
|
||||
'Dim _date As Date = value
|
||||
convertValue = value
|
||||
Case WMObjectVariableValueTypeTimeStamp
|
||||
LOGGER.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeTimeStamp")
|
||||
convertValue = CInt(value)
|
||||
Case WMObjectVariableValueTypeCurrency
|
||||
LOGGER.Info(" >> Typ des windream-Indexes: WMObjectVariableValueTypeCurrency")
|
||||
'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))
|
||||
convertValue = aValueWrapper
|
||||
Case WMObjectVariableValueTypeTime
|
||||
LOGGER.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeTime", False)
|
||||
'If ((value)) Then
|
||||
' convertValue = CDate(value)
|
||||
'Else
|
||||
' convertValue = ""
|
||||
'End If
|
||||
'Dim _date As Date = value
|
||||
convertValue = convertValue '*_date.ToShortTimeString
|
||||
Case WMObjectVariableValueTypeFloat
|
||||
LOGGER.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeFloat", False)
|
||||
convertValue = CStr(value)
|
||||
Case WMObjectVariableValueTypeVariant
|
||||
LOGGER.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeVariant", False)
|
||||
convertValue = CStr(value)
|
||||
Case WMObjectVariableValueTypeFulltext
|
||||
LOGGER.Debug("Typ des windream-Indexes: WMObjectVariableValueTypeFulltext", False)
|
||||
convertValue = CStr(value)
|
||||
Case 4100
|
||||
LOGGER.Debug("Typ des windream-Indexes: 4100 Vektor Boolean", False)
|
||||
vektor = True
|
||||
Case 4101
|
||||
LOGGER.Debug("Typ des windream-Indexes: 4101 Vektor Date", False)
|
||||
vektor = True
|
||||
Case 4104
|
||||
LOGGER.Debug("Typ des windream-Indexes: 4104 Vektor Currency", False)
|
||||
vektor = True
|
||||
Case 4097
|
||||
LOGGER.Debug("Typ des windream-Indexes: 4097 Vektor alphanumerisch", False)
|
||||
vektor = True
|
||||
Case 4098
|
||||
LOGGER.Debug("Typ des windream-Indexes: 4098 Vektor Numerisch", False)
|
||||
vektor = True
|
||||
Case 4099
|
||||
LOGGER.Debug("Typ des windream-Indexes: 4099 Vektor Kommazahl", False)
|
||||
vektor = True
|
||||
Case 36865
|
||||
LOGGER.Debug("Typ des windream-Indexes: 36865 Vektor alphanumerisch", False)
|
||||
vektor = True
|
||||
Case Else
|
||||
LOGGER.Debug("Typ des windream-Indexes konnte nicht bestimmt werden!", False)
|
||||
LOGGER.Debug("Versuch des Auslesens (vType): " & vType)
|
||||
'MsgBox(vType & vbNewLine & CStr(value), MsgBoxStyle.Exclamation, "Marlon-Case Else")
|
||||
convertValue = ""
|
||||
End Select
|
||||
If vektor = False Then
|
||||
If convertValue.ToString Is Nothing = False Then
|
||||
LOGGER.Debug("Konvertierter Wert: '" & convertValue.ToString & "'", False)
|
||||
End If
|
||||
End If
|
||||
'############################################################################################
|
||||
'####################### Der eigentliche Indexierungsvorgang ################################
|
||||
'############################################################################################
|
||||
If vektor = False Then
|
||||
If convertValue.ToString Is Nothing = False Then
|
||||
Try
|
||||
LOGGER.Debug("Jetzt indexieren: oDocument.SetVariableValue(" & aName & ", " & convertValue.ToString & ")", False)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info(" >> Unexpected Error in Logging SetVariableValue for " & aName & ": " & ex.Message, False)
|
||||
End Try
|
||||
|
||||
'Dim ArrValues()
|
||||
'ReDim ArrValues(0)
|
||||
'ArrValues(0) = convertValue
|
||||
'Dim ArrName()
|
||||
'ReDim ArrName(0)
|
||||
'ArrName(0) = "Tournr"
|
||||
'oDocument.SetValues(ArrName, ArrValues)
|
||||
If _int = True Then
|
||||
oDocument.SetVariableValue(aName, CInt(convertValue))
|
||||
ElseIf _date = True Then
|
||||
oDocument.SetVariableValue(aName, CDate(convertValue))
|
||||
ElseIf _bool Then
|
||||
oDocument.SetVariableValue(aName, CBool(convertValue))
|
||||
ElseIf _dbl Then
|
||||
oDocument.SetVariableValue(aName, CDbl(convertValue))
|
||||
Else
|
||||
oDocument.SetVariableValue(aName, convertValue)
|
||||
End If
|
||||
LOGGER.Debug("Index '" & aName & "' wurde geschrieben", False)
|
||||
Else
|
||||
LOGGER.Info(" >> Kein Indexwert vorhanden", False)
|
||||
End If
|
||||
Else
|
||||
'VEKTORFELDER, ALSO ÜBERPRÜFEN OB ERGEBNIS-ARRAY GEFÜLLT IST
|
||||
LOGGER.Debug("VEKTORFELD: Vorbereiten des Arrays", False)
|
||||
Dim myArray()
|
||||
'Dim anz As Integer = 0
|
||||
'For Each obj In aValues
|
||||
'ReDim Preserve myArray(anz)
|
||||
Select Case vType
|
||||
Case 4100
|
||||
'Vektortyp Boolean
|
||||
'Umwandeln in Boolean
|
||||
'Die Größe des Arrays festlegen
|
||||
ReDim myArray(aValues.Length - 1)
|
||||
Dim i1 As Integer = 0
|
||||
'Das Array durchlaufen und Werte für den Index in Array schreiben
|
||||
For Each obj In aValues
|
||||
Select Case obj.ToString.ToLower
|
||||
Case "falsch"
|
||||
obj = False
|
||||
Case "wahr"
|
||||
obj = True
|
||||
Case "nein"
|
||||
obj = False
|
||||
Case "ja"
|
||||
obj = True
|
||||
End Select
|
||||
myArray(i1) = CBool(obj)
|
||||
i1 = i1 + 1
|
||||
Next
|
||||
Case 4101
|
||||
'Vektortyp Date
|
||||
'Umwandeln in String
|
||||
'Die Größe des Arrays festlegen
|
||||
ReDim myArray(aValues.Length - 1)
|
||||
Dim i1 As Integer = 0
|
||||
'Das Array durchlaufen und Werte für den Index in Array schreiben
|
||||
For Each obj In aValues
|
||||
myArray(i1) = CDate(obj)
|
||||
i1 = i1 + 1
|
||||
Next
|
||||
Case 4104
|
||||
'Vektortyp Currency
|
||||
'Die Größe des Arrays festlegen
|
||||
ReDim myArray(aValues.Length - 1)
|
||||
Dim i1 As Integer = 0
|
||||
'Das Array durchlaufen und Werte für den Index in Array schreiben
|
||||
For Each obj In aValues
|
||||
Dim aValueWrapper As System.Runtime.InteropServices.CurrencyWrapper = New System.Runtime.InteropServices.CurrencyWrapper(CDec(obj))
|
||||
myArray(i1) = aValueWrapper
|
||||
i1 = i1 + 1
|
||||
Next
|
||||
Case 4097
|
||||
'Vektortyp ALPHANUMERISCH
|
||||
'Umwandeln in String
|
||||
'Die Größe des Arrays festlegen
|
||||
ReDim myArray(aValues.Length - 1)
|
||||
Dim i1 As Integer = 0
|
||||
'Das Array durchlaufen und Werte für den Index in Array schreiben
|
||||
For Each obj In aValues
|
||||
myArray(i1) = CStr(obj)
|
||||
i1 = i1 + 1
|
||||
Next
|
||||
|
||||
Case 4098
|
||||
'Umwandeln in Integer
|
||||
'Die Größe des Arrays festlegen
|
||||
ReDim myArray(aValues.Length - 1)
|
||||
Dim i1 As Integer = 0
|
||||
'Das Array durchlaufen und Werte für den Index in Array schreiben
|
||||
For Each obj In aValues
|
||||
myArray(i1) = CInt(obj)
|
||||
i1 = i1 + 1
|
||||
Next
|
||||
Case 4099
|
||||
'Umwandeln in Double
|
||||
'Die Größe des Arrays festlegen
|
||||
ReDim myArray(aValues.Length - 1)
|
||||
Dim i1 As Integer = 0
|
||||
'Das Array durchlaufen und Werte für den Index in Array schreiben
|
||||
For Each obj In aValues
|
||||
Dim Str As String = obj
|
||||
myArray(i1) = CDbl(Str.Replace(".", ","))
|
||||
i1 = i1 + 1
|
||||
Next
|
||||
|
||||
Case 36865
|
||||
'Umwandeln in String
|
||||
'Die Größe des Arrays festlegen
|
||||
ReDim myArray(aValues.Length - 1)
|
||||
Dim i1 As Integer = 0
|
||||
'Das Array durchlaufen und Werte für den Index in Array schreiben
|
||||
For Each obj In aValues
|
||||
myArray(i1) = CStr(obj)
|
||||
i1 = i1 + 1
|
||||
Next
|
||||
Case Else
|
||||
'Umwandeln in String
|
||||
'Die Größe des Arrays festlegen
|
||||
ReDim myArray(aValues.Length - 1)
|
||||
Dim i1 As Integer = 0
|
||||
'Das Array durchlaufen und Werte für den Index in Array schreiben
|
||||
For Each obj In aValues
|
||||
myArray(i1) = CStr(obj)
|
||||
i1 = i1 + 1
|
||||
Next
|
||||
End Select
|
||||
|
||||
'Jetzt die Nachindexierung für Vektor-Felder
|
||||
oDocument.SetVariableValue(aName, myArray)
|
||||
LOGGER.Debug("'SetVariableValue' für VEKTOR erfolgreich", False)
|
||||
End If
|
||||
End If
|
||||
i += 1
|
||||
|
||||
Next
|
||||
|
||||
' oDocument.LockRights()
|
||||
|
||||
'SetRights(WMObject, User)
|
||||
oDocument.Save()
|
||||
oDocument.unlock()
|
||||
LOGGER.Debug(" ### Indexierung erfolgreich beendet (Save und Unlock durchgeführt) ###", False)
|
||||
Return True
|
||||
Else
|
||||
LOGGER.Info(" ### Dokument ist gesperrt, Indexierung nicht möglich! ###", False)
|
||||
frmValidator.idxerr_message = "Dokument " & oDocument.aName & " ist gesperrt, Indexierung nicht möglich"
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("ClassSearchResult.RunIndexing - " & ex.Message, True)
|
||||
frmValidator.idxerr_message = "Unvorhergesehener Fehler in Indexing: " & ex.Message & vbNewLine & "vType: " & vType.ToString
|
||||
allgFunk.Insert_LogEntry($"ERROR RunIndexing>> {ex.Message}")
|
||||
oDocument.Save()
|
||||
oDocument.unlock()
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Sub SetfinalIndex(ByVal oDocument As WMObject, ByVal Indexname As String, ByVal _state As Boolean)
|
||||
Try
|
||||
If Indexname IsNot Nothing Then
|
||||
If Not oDocument.aLocked Then
|
||||
oDocument.LockFor(WMObjectEditModeIndexEdit)
|
||||
Dim i As Integer = 0
|
||||
|
||||
' das entsprechende Attribut aus windream auslesen
|
||||
Dim oAttribute = Me.oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityAttribute, Indexname)
|
||||
' den Variablentyp (String, Integer, ...) auslesen
|
||||
Dim vType = oAttribute.getVariableValue("dwAttrType")
|
||||
'MsgBox("Typ: " & vType.ToString, MsgBoxStyle.Critical, "_state: " & _state.ToString)
|
||||
' wenn in aValues an Position i ein Wert steht
|
||||
'MsgBox(oDocument.aName & vbNewLine & aValues(i) & vbNewLine & vType, MsgBoxStyle.Exclamation, "Zeile 87")
|
||||
Dim value = _state
|
||||
Dim convertValue
|
||||
'Den Typ des Index-Feldes auslesen
|
||||
LOGGER.Debug(">> Typ des windream-Indexes: " & vType.ToString)
|
||||
Select Case (vType)
|
||||
Case WMObjectVariableValueTypeBoolean
|
||||
convertValue = CBool(value)
|
||||
Case Else
|
||||
LOGGER.Info(">> Typ des windream-Indexes ist nicht BOOLEAN also Abbruch:")
|
||||
End Select
|
||||
'############################################################################################
|
||||
'####################### Der eigentliche Indexierungsvorgang ################################
|
||||
|
||||
oDocument.SetVariableValue(Indexname, convertValue)
|
||||
LOGGER.Debug(">> Index '" & Indexname & "' wurde gesetzt")
|
||||
oDocument.Save()
|
||||
oDocument.unlock()
|
||||
LOGGER.Info(">> DATEI wurde erfolgreich als fertig nachindexiert gekennzeichnet")
|
||||
Else
|
||||
LOGGER.Info(">> Dokument ist gesperrt, Indexierung erst im nächsten Durchlauf!")
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("ClassSearchResult.SetfinalIndex - " & ex.Message, True)
|
||||
'If My.Settings.vNIMailsenden = True Then
|
||||
' email.Send_EMail("Fehler bei SetfinalIndex - Datei: " & oDocument.aName.ToString & " - Fehler: " & ex.Message)
|
||||
'End If
|
||||
oDocument.Save()
|
||||
oDocument.unlock()
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "+++++ Allgemeine Funktionen die Informationen zurückliefern +++++"
|
||||
|
||||
Public Function Get_No_Documents(Profil As String, WD_Search As String)
|
||||
Try
|
||||
Dim wmsearch_exists As Boolean
|
||||
Try
|
||||
wmsearch_exists = System.IO.File.Exists(WD_Search)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
wmsearch_exists = clsWM.CheckFileExists(WD_Search)
|
||||
|
||||
End Try
|
||||
If wmsearch_exists = False Then
|
||||
|
||||
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:")
|
||||
'wenn die gesuchte File eine Suche ist: per MAil informierne und Indexierung abbrechen
|
||||
'If My.Settings.vNIMailsenden = True Then
|
||||
' email.Send_EMail("Fehler bei Nachindexierung: <br> >> Profil: " & Me.aktivesProfil.Profilname & "<br> >> die windream-Suche : " & Me.aktivesProfil.WindreamSuche & " konnte nicht gefunden werden!" & _
|
||||
' "<br> >> Mögliche Fehlerursache: Das W-Laufwerk ist nicht verfügbar!")
|
||||
'End If
|
||||
Return 0
|
||||
Else
|
||||
' windream-Suche für Profil starten
|
||||
Dim windreamSucheErgebnisse As WMObjects = Me.GetSearchDocuments(WD_Search)
|
||||
|
||||
If windreamSucheErgebnisse.Count > 0 Then
|
||||
' neue Anzahl von Dateien
|
||||
Return windreamSucheErgebnisse.Count
|
||||
Else
|
||||
' keine Dateien zum Importieren
|
||||
Return 0
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info(ex.Message)
|
||||
Return 0
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
Public Function GetSearchDocuments(ByVal wdfLocation As String)
|
||||
|
||||
If clsWM.CheckFileExists(wdfLocation) = True Then
|
||||
|
||||
Try
|
||||
Dim ProfileName = wdfLocation.Substring(wdfLocation.LastIndexOf("\") + 1)
|
||||
Dim ProfilePath = wdfLocation.Substring(0, wdfLocation.Length - ProfileName.Length)
|
||||
|
||||
Me.oController.CheckSearchProfile(wdfLocation.ToLower)
|
||||
Dim suchTyp = Me.oController.SearchProfileTargetProgID
|
||||
Dim ExSettings As Object
|
||||
Dim oSearch As Object
|
||||
ExSettings = Me.oController.SearchProfileExSettings
|
||||
If ExSettings = 0 Then ExSettings = 7
|
||||
|
||||
Dim srchQuick As WMOSRCHLib.WMQuickSearch = CreateObject("WMOSrch.WMQuickSearch")
|
||||
Dim srchIndex As WMOSRCHLib.WMIndexSearch = CreateObject("WMOSrch.WMIndexSearch")
|
||||
Dim srchObjectType As WMOSRCHLib.WMObjectTypeSearch = CreateObject("WMOSrch.WMObjectTypeSearch")
|
||||
|
||||
Select Case suchTyp.ToString.ToUpper
|
||||
Case "WMOSRCH.WMQUICKSEARCH"
|
||||
srchQuick.WMSession = CreateObject("Windream.WMSession", Me.GetCurrentServer)
|
||||
|
||||
Me.oConnect.LoginSession(srchQuick.WMSession)
|
||||
|
||||
srchQuick.ClearSearch()
|
||||
srchQuick.SearchProfilePath = ProfilePath
|
||||
srchQuick.LoadSearchProfile(ProfileName)
|
||||
|
||||
oSearch = srchQuick.GetSearch()
|
||||
|
||||
Case "WMOSRCH.WMINDEXSEARCH"
|
||||
srchIndex.WMSession = CreateObject("Windream.WMSession", Me.GetCurrentServer)
|
||||
|
||||
Me.oConnect.LoginSession(srchIndex.WMSession)
|
||||
|
||||
srchIndex.ClearSearch()
|
||||
srchIndex.SearchProfilePath = ProfilePath
|
||||
srchIndex.LoadSearchProfile(ProfileName)
|
||||
|
||||
oSearch = srchIndex.GetSearch()
|
||||
|
||||
Case "WMOSRCH.WMOBJECTTYPESEARCH"
|
||||
srchObjectType.WMSession = CreateObject("Windream.WMSession", Me.GetCurrentServer)
|
||||
|
||||
Me.oConnect.LoginSession(srchObjectType.WMSession)
|
||||
|
||||
srchObjectType.ClearSearch()
|
||||
srchObjectType.SearchProfilePath = ProfilePath
|
||||
srchObjectType.LoadSearchProfile(ProfileName)
|
||||
|
||||
oSearch = srchObjectType.GetSearch()
|
||||
|
||||
Case Else
|
||||
LOGGER.Info("KEIN GÜLTIGER WINDREAM-SUCHTYP")
|
||||
Return Nothing
|
||||
End Select
|
||||
Dim WMObjects As Object
|
||||
WMObjects = oSearch.Execute
|
||||
Return oSearch.execute
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
' bei einem Fehler einen Eintrag in der Logdatei machen
|
||||
LOGGER.Info("Fehler in GetSearchDocuments - " & ex.Message, True)
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
Return Nothing
|
||||
|
||||
End Function
|
||||
''' Liefert den Wert eines Indexes als String
|
||||
''' _indexname = Name des zu überprüfenden Indexfeldes
|
||||
Public Function GetValueforIndex(ByVal _fullfilepath As String, _indexname As String)
|
||||
Try
|
||||
Const WMEntityDocument = 1
|
||||
Dim IndexwertAusWindream As Object = Nothing
|
||||
Dim _dok As WINDREAMLib.WMObject
|
||||
_dok = Nothing
|
||||
_dok = oSession.GetWMObjectByPath(WMEntityDocument, _fullfilepath) 'WINDREAMLib.WMEntity.WMEntityDocument
|
||||
IndexwertAusWindream = _dok.GetVariableValue(_indexname)
|
||||
Return IndexwertAusWindream.ToString
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
'MsgBox(ex.Message)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
End Class
|
||||
@ -1,488 +0,0 @@
|
||||
Imports WINDREAMLib
|
||||
Imports WINDREAMLib.WMCOMEvent
|
||||
Imports WINDREAMLib.WMEntity
|
||||
Imports WINDREAMLib.WMObjectEditMode
|
||||
Imports WINDREAMLib.WMSearchOperator
|
||||
Imports WINDREAMLib.WMSearchRelation
|
||||
Imports WMOBRWSLib
|
||||
|
||||
Public Class ClassWindream_allgemein
|
||||
|
||||
#Region "+++++ Konstanten +++++"
|
||||
Const DEBUG = AUS
|
||||
Const AUS = 0
|
||||
Const WINDREAM = 1
|
||||
Const VARIABLEN = 2
|
||||
#End Region
|
||||
|
||||
#Region "+++++ Variablen +++++"
|
||||
Public oConnect ' der Typ darf nicht festgelegt werden (warum auch immer... geht sonst nicht)
|
||||
Public oSession 'As WINDREAMLib.WMSession ' der Typ darf nicht festgelegt werden (warum auch immer... geht sonst nicht)
|
||||
Public oBrowser As New WMOBRWSLib.ServerBrowser
|
||||
Public oDokumentTypen As WINDREAMLib.WMObjects
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "+++++ Allgemeine Methoden und Funktionen +++++"
|
||||
|
||||
''' <summary>
|
||||
''' Konstruktor für die windream-Klasse
|
||||
''' </summary>
|
||||
''' <remarks></remarks>
|
||||
Sub New()
|
||||
' wenn ein Fehler bei der Initialisierung auftrat
|
||||
'If Not Me.Init() Then
|
||||
' ' Nachricht ausgeben
|
||||
' MsgBox("Es trat ein Fehler bei der Initialisierung der Klasse windream auf. Bitte prüfen Sie ob der windream-Server aktiv ist und alle Dienste gestartet sind.", MsgBoxStyle.Exclamation, "Fehler bei Initialisierung")
|
||||
|
||||
' ' das Programm "abschießen"
|
||||
' Process.GetCurrentProcess.Kill()
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' Initialisiert die statische Klasse (Login, Session starten, usw.)
|
||||
''' </summary>
|
||||
''' <returns>Liefert True wenn das Anmelden erfolgreich war, sonst False</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function Create_Session() As Boolean
|
||||
Try
|
||||
Try
|
||||
' Session-Objekt instanziieren und mit dem im Client ausgewählten Server belegen
|
||||
Me.oSession = CreateObject("Windream.WMSession", Me.GetCurrentServer)
|
||||
LOGGER.Debug("windream-Server: '" & Me.GetCurrentServer & "'")
|
||||
' Connection-Objekt instanziieren
|
||||
Me.oConnect = CreateObject("Windream.WMConnect")
|
||||
'MsgBox("windrem init 'ed")
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Debug($"Error while creating WMConnect Object: {vbCrLf}{ex.Message}")
|
||||
Return False
|
||||
End Try
|
||||
|
||||
|
||||
' wenn windream nicht angemeldet ist
|
||||
If Not Me.IsLoggedIn Then
|
||||
|
||||
' Art der Anmeldung an windream festlegen
|
||||
' 0x0L (also 0) = Standard windream Benutzer
|
||||
' WM_MODULE_ID_DOCTYPEEDITOR_LIC = ermöglicht Zugriff auf die windream Management Funktionen (Z.B. zur Verwaltung der windream Dokumententypen, Auswahllisten, etc.)
|
||||
' WM_MODULE_ID_INDEXSERVICE = ermöglicht der Session die Indexierungs-Events vom windream DMS-Service zu empfangen
|
||||
Me.oConnect.ModuleID = 0
|
||||
|
||||
' setzt die minimal erwartete windream-Version
|
||||
Me.oConnect.MinReqVersion = "3"
|
||||
|
||||
' -- Impersonifizierung nur möglich mit registry-eintrag --
|
||||
' oConnect.UserName "\schulung\windream"
|
||||
' oConnect.Password "windream"
|
||||
|
||||
' Verbindung mit Session-Objekt (und dem ausgewählten Server) aufbauen
|
||||
Me.oConnect.LoginSession(Me.oSession)
|
||||
If Me.oSession.aLoggedin = False Then
|
||||
MsgBox("Es konnte keine Verbindung mit dem windream-Server hergestellt werden", MsgBoxStyle.Exclamation, "Verbindung konnte nicht hergestellt werden")
|
||||
Return False
|
||||
End If
|
||||
|
||||
If LOG_ERRORS_ONLY = False Then
|
||||
LOGGER.Info(" >> windream-Version: '" & oSession.GetSystemInfo("WindreamVersion") & "'")
|
||||
End If
|
||||
|
||||
' AUSGABE VON SYSTEMINFORMATIONEN
|
||||
' Gibt die Versionsart (Lizenztyp) also Small-Business-Edition (SBE), Small-Business-Extension (SBX)
|
||||
' oder Business-Edition (BE) aus
|
||||
'MsgBox("WindreamVersion: " & oSession.GetSystemInfo("WindreamVersion") & vbNewLine & "LicenceKey: " & oSession.GetSystemInfo("LicenceKey") & vbNewLine & _
|
||||
' vbNewLine & "LicenceName: " & oSession.GetSystemInfo("LicenceName"))
|
||||
|
||||
'Dim WMCtrl As AISCONTROLDATACOMLib.AISControlData
|
||||
'WMCtrl = New AISCONTROLDATACOMLib.AISControlData
|
||||
|
||||
'' liefert die Versionsnummer des Clients
|
||||
|
||||
'MsgBox(WMCtrl.WMWorkstationBuildNo)
|
||||
'MsgBox(WMCtrl.W
|
||||
'' liefert den Servernamen des angemeldeten windreams
|
||||
'MsgBox(WMCtrl.WMServerName)
|
||||
|
||||
Try
|
||||
Me.oSession.SwitchEvents(WMCOMEventWMSessionNeedIndex, False)
|
||||
' der Parameter WMEntityDocument definiert, dass nur Dokumenttypen und keine
|
||||
' Ordnertypen ausgelesen werden
|
||||
Me.oDokumentTypen = Me.oSession.GetWMObjectTypes(WINDREAMLib.WMEntity.WMEntityDocument)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
LOGGER.Debug($"windream login successful")
|
||||
Return True
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
If Err.Number = -2147220985 Then
|
||||
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")
|
||||
Else
|
||||
MsgBox("Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Login an windream")
|
||||
End If
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Function Start_WMCC_andCo()
|
||||
Try
|
||||
' 04.10.18: Überprüft, ob der Benutzer Mitglied der SERVER_USER Gruppe ist
|
||||
Dim sql = "SELECT T.GUID FROM TBDD_GROUPS_USER T INNER JOIN TBDD_GROUPS T1 on T1.GUID = T.GROUP_ID WHERE T1.NAME = 'SERVER_USER' AND T.USER_ID = " & USER_ID
|
||||
Dim userExistsInServerUserGroup = ClassDatabase.Execute_Scalar(sql, CONNECTION_STRING)
|
||||
|
||||
If WMSESSION_STARTSTOP_STARTUP = True Then
|
||||
'And userExistsInServerUserGroup Is Nothing
|
||||
LOGGER.Info(">> WINDREAM-Start on ApplicationStart is active!")
|
||||
|
||||
Dim owindreamControlCenter = CreateObject("Wmcc.ControlCenter")
|
||||
Dim owindreamIndexService = CreateObject("WMIndexServer.WMIdxSvControl")
|
||||
owindreamControlCenter.StartVFSService(1)
|
||||
System.Threading.Thread.Sleep(1000)
|
||||
owindreamIndexService.Start()
|
||||
System.Threading.Thread.Sleep(1500)
|
||||
End If
|
||||
Create_Session()
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Error while starting up WMCC and IndexService: " & ex.Message, True)
|
||||
End Try
|
||||
End Function
|
||||
Public Function Stop_WMCC_andCo()
|
||||
Try
|
||||
' 04.10.18: Überprüft, ob der Benutzer Mitglied der SERVER_USER Gruppe ist
|
||||
Dim sql = "SELECT T.GUID FROM TBDD_GROUPS_USER T INNER JOIN TBDD_GROUPS T1 on T1.GUID = T.GROUP_ID WHERE T1.NAME = 'SERVER_USER' AND T.USER_ID = " & USER_ID
|
||||
Dim userExistsInServerUserGroup = ClassDatabase.Execute_Scalar(sql, CONNECTION_STRING)
|
||||
|
||||
If WMSESSION_STARTSTOP_STARTUP = True Then 'And userExistsInServerUserGroup Is Nothing
|
||||
Dim owindreamControlCenter = CreateObject("Wmcc.ControlCenter")
|
||||
Dim owindreamIndexService = CreateObject("WMIndexServer.WMIdxSvControl")
|
||||
owindreamControlCenter.StartVFSService(0)
|
||||
owindreamIndexService.Shutdown()
|
||||
owindreamControlCenter.ExitCC(0)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Error while Stopping WMCC and IndexService: " & ex.Message, True)
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region "+++++ Funktionen die für den Objekttyp relevate Informationen zurückliefern +++++"
|
||||
|
||||
''' <summary>
|
||||
''' Liefert alle Objekttypen des aktuellen Servers als windream-Objekte.
|
||||
''' </summary>
|
||||
''' <returns>Alle Objekttypen als WMObjects-Objekt</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function GetObjecttypesAsObjects() As WMObjects
|
||||
Try
|
||||
|
||||
Return Me.oDokumentTypen
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox("Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Auslesen der Objekttypen")
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Liefert alle Objekttypen des aktuellen Servers als Array aus Strings.
|
||||
''' </summary>
|
||||
''' <returns>Array mit allen Objekttypen als Strings</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function GetObjecttypesAsStrings() As String()
|
||||
|
||||
Try
|
||||
Dim objektTypenStr(Me.oDokumentTypen.Count) As String
|
||||
|
||||
For i As Integer = 0 To Me.oDokumentTypen.Count
|
||||
objektTypenStr(i) = Me.oDokumentTypen.Item(i).aName
|
||||
Next
|
||||
|
||||
Return objektTypenStr
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox("Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Auslesen der Objekttypen als String")
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Function GetTypeOfIndex(ByVal indexname As String) As Integer
|
||||
Try
|
||||
Dim oAttribute = Me.oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityAttribute, indexname)
|
||||
Dim vType = oAttribute.getVariableValue("dwAttrType")
|
||||
Return vType
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
Public Function NormalizePath(Path As String)
|
||||
Dim oNormalizedPath As String
|
||||
If Path.StartsWith("\\windream") Then
|
||||
oNormalizedPath = Path.Replace("\\windream\objects\", "")
|
||||
ElseIf Path.StartsWith("\\") Then
|
||||
oNormalizedPath = Path.Substring(1)
|
||||
ElseIf Path.StartsWith("\") Then
|
||||
Return Path
|
||||
Else
|
||||
oNormalizedPath = "\" & Path
|
||||
End If
|
||||
|
||||
Return oNormalizedPath
|
||||
End Function
|
||||
|
||||
Public Function CheckFileExists(Path As String)
|
||||
Dim oNormalizedPath = NormalizePath(Path)
|
||||
|
||||
Try
|
||||
Dim oObjectId = 0
|
||||
Dim oObjectDbId = 0
|
||||
Dim WMObject As WINDREAMLib.WMObject '= CreateObject("WINDREAMLib.WMObject") 'New WINDREAMLib.WMObject
|
||||
If IsNothing(oSession) Then
|
||||
If Create_Session() = False Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
WMObject = oSession.GetWMObjectByPath(WINDREAMLib.WMEntity.WMEntityDocument, oNormalizedPath)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Liefert alle Indexe eines Objekttypen.
|
||||
''' </summary>
|
||||
''' <param name="name">Name des Objekttyps</param>
|
||||
''' <returns>Array mit allen Objekttyp zugeordneten Indexen als String</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function GetIndicesByObjecttype(ByVal Objecttype_name As String) As String()
|
||||
Try
|
||||
Dim oObjectType As WMObject
|
||||
Dim oIndexAttributes As WMObjectRelation
|
||||
Dim oIndexAttribute As WMObject
|
||||
Dim oIndex As WMObject
|
||||
Dim oRelProperties As WMObjectRelationClass
|
||||
|
||||
' den Objekttyp laden
|
||||
oObjectType = Me.oSession.GetWMObjectByName(WMEntityObjectType, Objecttype_name)
|
||||
|
||||
' Beziehung zu Indizes des Objekttyp auslesen
|
||||
oIndexAttributes = oObjectType.GetWMObjectRelationByName("TypeAttributes")
|
||||
|
||||
' Array für Indizes vorbereiten
|
||||
Dim aIndexNames(oIndexAttributes.Count - 1) As String
|
||||
|
||||
' alle Indizes durchlaufen
|
||||
For j As Integer = 0 To oIndexAttributes.Count - 1
|
||||
|
||||
' aktuellen Index auslesen
|
||||
oIndexAttribute = oIndexAttributes.Item(j)
|
||||
|
||||
' Eigenschaften des Index auslesen
|
||||
oRelProperties = oIndexAttribute.GetWMObjectRelationByName("Attribute")
|
||||
|
||||
' Index aus den Eigenschaften auslesen
|
||||
oIndex = oRelProperties.Item(0)
|
||||
|
||||
' Indexname speichern
|
||||
aIndexNames(j) = oIndex.aName
|
||||
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, "Fehler beim Auslesen der windream-Indexe")
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Liefert einen Objekttyp als WMObject an Hand dessen Name.
|
||||
''' </summary>
|
||||
''' <param name="objekttypName">Name des Objekttyps</param>
|
||||
''' <returns>Objekttyp als WMObject</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function GetObjecttypeByName(ByVal objekttypName As String) As WMObject
|
||||
Try
|
||||
' alle Objekttypen auslesen
|
||||
Dim oObjectTypes As WMObjects = Me.oSession.GetWMObjectTypes(WINDREAMLib.WMEntity.WMEntityDocument)
|
||||
|
||||
' alle Objekttypen durchlaufen und nach dem mit dem angegebenen Namen suchen
|
||||
For Each oObjectType As WMObject In oObjectTypes
|
||||
If oObjectType.aName = objekttypName Then
|
||||
Return oObjectType
|
||||
End If
|
||||
Next
|
||||
|
||||
Return Nothing
|
||||
|
||||
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")
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Überprüft ob der angegebene Index im Objekttyp existiert
|
||||
''' </summary>
|
||||
''' <param name="objekttyp">Name des zu durchsuchenden Objekttyps</param>
|
||||
''' <param name="indexname">Name des zu suchenden Indexes</param>
|
||||
''' <returns>Liefert True wenn der Index im Objekttyp existiert, sonst False</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function ExistIndexInObjekttyp(ByVal objekttyp As String, ByVal indexname As String) As Boolean
|
||||
Try
|
||||
Dim indexnamen() As String = Me.GetIndicesByObjecttype(objekttyp)
|
||||
|
||||
If indexnamen Is Nothing Then Return False
|
||||
|
||||
For Each index As String In indexnamen
|
||||
If index = indexname Then Return True
|
||||
Next
|
||||
|
||||
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")
|
||||
End Try
|
||||
|
||||
Return False
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region "+++++ Allgemeine Funktionen die Informationen zurückliefern +++++"
|
||||
|
||||
''' <summary>
|
||||
''' Liefert True wenn die windream-Session angemeldet ist und False für den Fall, dass die Session nicht eingeloggt ist.
|
||||
''' </summary>
|
||||
''' <returns>Anmeldestatus als Boolean</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function IsLoggedIn() As Boolean
|
||||
Try
|
||||
Return Me.oSession.aLoggedin
|
||||
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")
|
||||
End Try
|
||||
|
||||
Return False
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Liefert den Servernamen an dem windream aktuell angemeldet ist.
|
||||
''' </summary>
|
||||
''' <returns>Servername als String</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function GetCurrentServer() As String
|
||||
Try
|
||||
Return Me.oBrowser.GetCurrentServer 'ClassWindream.oBrowser.GetCurrentServer
|
||||
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")
|
||||
End Try
|
||||
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
'Public Function GetSharedCurrentServer() As String
|
||||
' Try
|
||||
' Return ClassWindream.oBrowser.GetCurrentServer
|
||||
' Catch ex As Exception
|
||||
' 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
|
||||
|
||||
' Return ""
|
||||
'End Function
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' Liefert das Windream-Laufwerk des windream-Servers, in Form '[Laufwerksbuchstabe]:'. (z.B. 'W:')
|
||||
''' </summary>
|
||||
''' <returns>Laufwerksbuchstabe mit Doppelpunkt als String</returns>
|
||||
''' <remarks></remarks>
|
||||
'Public Function GetWindreamDriveLetter() As String
|
||||
|
||||
' Try
|
||||
' Dim oControl As AISCONTROLDATACOMLib.AISControlData
|
||||
' Dim sDrive As String = ""
|
||||
|
||||
' oControl = New AISCONTROLDATACOMLib.AISControlData
|
||||
|
||||
' sDrive = oControl.GetStringValue(&H10040003)
|
||||
|
||||
' Return sDrive & ":"
|
||||
|
||||
' Catch ex As Exception
|
||||
' MsgBox("Fehlernachricht: " & ex.Message, MsgBoxStyle.Critical, "Fehler beim Auslesen des windream-Laufwerks")
|
||||
' End Try
|
||||
|
||||
' Return ""
|
||||
'End Function
|
||||
|
||||
''' <summary>
|
||||
''' Liefert den Typen eines Indexes als Integer.
|
||||
''' </summary>
|
||||
''' <param name="indexname">Name des zu überprüfenden Indexfeldes</param>
|
||||
''' <returns>Liefert eine Zahl, die einen Typen beschreibt</returns>
|
||||
''' <remarks></remarks>
|
||||
|
||||
Public Function GetValuesfromAuswahlliste(ByVal _auswahlliste As String) As Object
|
||||
Try
|
||||
'Dim oAttribute = Me.oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityAttribute, indexname)
|
||||
'Dim vType = oAttribute.getVariableValue("vItems")
|
||||
'Return vType
|
||||
Dim oChoiceList = oSession.GetWMObjectByName(WMEntityChoiceList, _auswahlliste)
|
||||
If Err.Number = 0 And TypeName(oChoiceList) <> "Nothing" Then
|
||||
Dim Values = oChoiceList
|
||||
Values = oChoiceList.GetVariableValue("vItems")
|
||||
Dim anz As Integer = 0
|
||||
'If LogErrorsOnly = False Then MsgBox("Try getting values for resullist: " & _auswahlliste)
|
||||
For Each CLItem In Values
|
||||
If oChoiceList.aName IsNot Nothing Then
|
||||
anz += 1
|
||||
End If
|
||||
Next
|
||||
Dim strListe(anz - 1)
|
||||
Dim zahl As Integer = 0
|
||||
For Each CLItem In Values
|
||||
'If LogErrorsOnly = False Then MsgBox("Item: " & CLItem)
|
||||
If oChoiceList.aName IsNot Nothing Then
|
||||
strListe(zahl) = CLItem
|
||||
zahl += 1
|
||||
End If
|
||||
Next
|
||||
Return strListe
|
||||
Else
|
||||
MsgBox("Auswahlliste: " & _auswahlliste & " nicht gefunden!", MsgBoxStyle.Critical, "Fehler:")
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler in GetValuesfromAuswahlliste:")
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
End Class
|
||||
@ -139,7 +139,8 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraVerticalGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DigitalData.Controls.DocumentViewer">
|
||||
<Reference Include="DigitalData.Controls.DocumentViewer, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\DDMonorepo\Controls.DocumentViewer\bin\Debug\DigitalData.Controls.DocumentViewer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Controls.LookupGrid, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
@ -158,26 +159,8 @@
|
||||
<Reference Include="FormsUtils">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\FormsUtils.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Independentsoft.Msg, Version=2.0.140.29929, Culture=neutral, PublicKeyToken=76be97fe952f1ec7, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\DDMonorepo\Controls.DocumentViewer\bin\Debug\Independentsoft.Msg.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Interop.WINDREAMLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
<HintPath>..\..\..\..\Interop.WINDREAMLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Interop.WMOBRWSLib">
|
||||
<HintPath>..\..\..\..\Interop.WMOBRWSLib.dll</HintPath>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="Interop.WMOSRCHLib">
|
||||
<HintPath>..\..\..\..\Interop.WMOSRCHLib.dll</HintPath>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="Interop.WMOTOOLLib">
|
||||
<HintPath>..\..\..\..\Interop.WMOTOOLLib.dll</HintPath>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
<Reference Include="Independentsoft.Msg.2.0.570.21482">
|
||||
<HintPath>..\..\..\DDMonorepo\Controls.DocumentViewer\bin\Debug\Independentsoft.Msg.2.0.570.21482.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
@ -266,8 +249,6 @@
|
||||
<Compile Include="ClassDatabase.vb" />
|
||||
<Compile Include="ClassEmail.vb" />
|
||||
<Compile Include="ClassEncryption.vb" />
|
||||
<Compile Include="ClassPMWindream.vb" />
|
||||
<Compile Include="ClassWindream_allgemein.vb" />
|
||||
<Compile Include="clsDragInfo.vb" />
|
||||
<Compile Include="DD_DMSLiteDataSet.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
Imports WINDREAMLib
|
||||
Imports DigitalData.Modules.Config
|
||||
Imports DigitalData.Modules.Config
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Module ModuleRuntimeVariables
|
||||
@ -30,7 +29,6 @@ Module ModuleRuntimeVariables
|
||||
Public CURRENT_CONN_ID As Integer
|
||||
|
||||
Public CURRENT_JUMP_DOC_GUID As Integer
|
||||
Public CURRENT_WMFILE As WMObject
|
||||
|
||||
Public CURRENT_DOC_PATH As String
|
||||
Public ERROR_STATE = ""
|
||||
@ -108,8 +106,6 @@ Module ModuleRuntimeVariables
|
||||
Public CURRENT_CONTROL_ID As Integer
|
||||
|
||||
Public errormessage As String
|
||||
|
||||
Public WINDREAM As ClassPMWindream
|
||||
Public FINALINDICES As ClassFinalIndex
|
||||
Public IDBData As ClassIDBData
|
||||
Public LOGCONFIG As LogConfig
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports WINDREAMLib
|
||||
|
||||
''' <summary>
|
||||
''' Defines common Functions for Checking for and replacing placeholders.
|
||||
''' This Class also includes a child class `Pattern` for passing around Patterns.
|
||||
@ -51,13 +49,13 @@ Public Class clsPatterns
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function ReplaceAllValues(input As String, panel As Panel, document As WMObject, prename As Object, surname As Object, shortname As Object, language As Object, email As Object, userId As Object, profileId As Object) As String
|
||||
Public Shared Function ReplaceAllValues(input As String, panel As Panel, WMdocument As Object, prename As Object, surname As Object, shortname As Object, language As Object, email As Object, userId As Object, profileId As Object) As String
|
||||
Try
|
||||
Dim result = input
|
||||
LOGGER.Debug($"inputString BEFORE replacing: [{result}]")
|
||||
result = ReplaceInternalValues(result)
|
||||
result = ReplaceControlValues(result, panel)
|
||||
If Not IsNothing(document) Then result = ReplaceWindreamIndicies(result, document)
|
||||
|
||||
If IDB_ACTIVE = True Then
|
||||
result = ReplaceIDBAttributes(result)
|
||||
End If
|
||||
@ -171,31 +169,6 @@ Public Class clsPatterns
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Shared Function ReplaceWindreamIndicies(input As String, document As WMObject) As String
|
||||
Try
|
||||
Dim result = input
|
||||
Dim oTryCounter As Integer = 0
|
||||
While ContainsPattern(result, PATTERN_WMI)
|
||||
|
||||
Dim indexName As String = GetNextPattern(result, PATTERN_WMI).Value
|
||||
Dim oWMValue = document.GetVariableValue(indexName)
|
||||
If IsNothing(oWMValue) And oTryCounter = MAX_TRY_COUNT Then
|
||||
LOGGER.Warn("Exit from ReplaceWindreamIndicies as oWMValue is still nothing and oTryCounter is 500!")
|
||||
Throw New Exception("Max tries in ReplaceWindreamIndicies exceeded.")
|
||||
|
||||
End If
|
||||
If oWMValue IsNot Nothing Then
|
||||
result = ReplacePattern(result, PATTERN_WMI, oWMValue)
|
||||
End If
|
||||
oTryCounter += 100
|
||||
End While
|
||||
LOGGER.Debug("sql after ReplaceWindreamIndicies: " & input)
|
||||
Return result
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Error in ReplaceWindreamIndicies:" & ex.Message)
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function ReplaceIDBAttributes(input As String) As String
|
||||
Try
|
||||
Dim result = input
|
||||
|
||||
@ -73,58 +73,9 @@ Public Class frmAdministration
|
||||
Me.cmbLOGIndex.Items.Add("")
|
||||
cmbLOGIndex.Enabled = True
|
||||
Label9.Enabled = True
|
||||
If IDB_ACTIVE = False Then
|
||||
PM_VEKTOR_INDEXComboBox.Enabled = True
|
||||
Label4.Enabled = True
|
||||
If cmbObjekttypen.Text = "DEFAULT" And IDB_ACTIVE = False Then
|
||||
MsgBox("The Objecttype is invalid!", MsgBoxStyle.Exclamation)
|
||||
Exit Sub
|
||||
End If
|
||||
Try
|
||||
Dim indexe = WINDREAM.GetIndicesByObjecttype(cmbObjekttypen.Text)
|
||||
If indexe IsNot Nothing Then
|
||||
For Each index As String In indexe
|
||||
Dim _vektorString As Boolean = False
|
||||
Select Case WINDREAM.GetTypeOfIndex(index)
|
||||
Case 4097
|
||||
_vektorString = True
|
||||
Case 36865
|
||||
_vektorString = True
|
||||
Case Else
|
||||
_vektorString = False
|
||||
End Select
|
||||
If _vektorString = True Then
|
||||
Me.PM_VEKTOR_INDEXComboBox.Items.Add(index)
|
||||
Me.cmbLOGIndex.Items.Add(index)
|
||||
End If
|
||||
'############## IDB ACTIVE #################
|
||||
|
||||
Next
|
||||
End If
|
||||
MyIndicies_Types = New List(Of Integer)
|
||||
MyIndicies = WINDREAM.GetIndicesByObjecttype(cmbObjekttypen.Text).ToList()
|
||||
For Each i In MyIndicies
|
||||
Dim type = WINDREAM.GetTypeOfIndex(i)
|
||||
MyIndicies_Types.Add(type)
|
||||
Next
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox("Error in GetIndices windream: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
|
||||
PM_VEKTOR_INDEXComboBox.SelectedIndex = -1
|
||||
cmbLOGIndex.SelectedIndex = -1
|
||||
End Try
|
||||
If Me.PM_VEKTOR_INDEXComboBox.Text <> "" Then
|
||||
PM_VEKTOR_INDEXComboBox.SelectedIndex = PM_VEKTOR_INDEXComboBox.FindStringExact(Me.PM_VEKTOR_INDEXComboBox.Text)
|
||||
Else
|
||||
PM_VEKTOR_INDEXComboBox.SelectedIndex = -1
|
||||
End If
|
||||
If Me.cmbLOGIndex.Text <> "" Then
|
||||
cmbLOGIndex.SelectedIndex = cmbLOGIndex.FindStringExact(Me.cmbLOGIndex.Text)
|
||||
Else
|
||||
cmbLOGIndex.SelectedIndex = -1
|
||||
End If
|
||||
Else '############## IDB ACTIVE #################
|
||||
|
||||
PM_VEKTOR_INDEXComboBox.Enabled = False
|
||||
PM_VEKTOR_INDEXComboBox.Enabled = False
|
||||
Label4.Enabled = False
|
||||
Try
|
||||
For Each oRow As DataRow In IDBData.DTVWIDB_BE_ATTRIBUTE.Rows
|
||||
@ -151,7 +102,6 @@ Public Class frmAdministration
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
@ -179,26 +129,11 @@ Public Class frmAdministration
|
||||
End Sub
|
||||
Private Sub ObjekttypenEintragen()
|
||||
Me.cmbObjekttypen.Items.Clear()
|
||||
If IDB_ACTIVE = False Then
|
||||
Try
|
||||
Dim oDokumentTypen As WINDREAMLib.WMObjects = WINDREAM.GetObjecttypesAsObjects()
|
||||
If oDokumentTypen Is Nothing Then Exit Sub
|
||||
For Each aType In oDokumentTypen
|
||||
Me.cmbObjekttypen.Items.Add(aType.aName)
|
||||
Next
|
||||
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")
|
||||
End Try
|
||||
Else
|
||||
Dim oSQL = "SELECT GUID, TITLE FROM TBIDB_BUSINESS_ENTITY"
|
||||
Dim oDT As DataTable = ClassDatabase.Return_Datatable_ConStr(oSQL, CONNECTION_STRING_IDB)
|
||||
For Each oROW As DataRow In oDT.Rows
|
||||
Me.cmbObjekttypen.Items.Add(oROW.Item(1))
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
Dim oSQL = "SELECT GUID, TITLE FROM TBIDB_BUSINESS_ENTITY"
|
||||
Dim oDT As DataTable = ClassDatabase.Return_Datatable_ConStr(oSQL, CONNECTION_STRING_IDB)
|
||||
For Each oROW As DataRow In oDT.Rows
|
||||
Me.cmbObjekttypen.Items.Add(oROW.Item(1))
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles btnWMSuche.Click
|
||||
@ -444,180 +379,6 @@ Public Class frmAdministration
|
||||
|
||||
End Select
|
||||
End Sub
|
||||
'Private Sub cmbIndexe_SelectedIndexChanged(sender As System.Object, e As System.EventArgs)
|
||||
' If cmbIndexe.SelectedIndex <> -1 Then
|
||||
' 'MsgBox(_windreamPM.GetTypeOfIndex(cmbIndexe.Text))
|
||||
' btnInsert_FinalIndex.Enabled = True
|
||||
' Me.btnStampDate.Visible = False
|
||||
' Me.btnStampDate.Visible = False
|
||||
' Dim type = _windreamPM.GetTypeOfIndex(cmbIndexe.Text)
|
||||
' Select Case type
|
||||
' Case 1 'String
|
||||
' Me.lblIndex.Text = "Definieren Sie den festen Wert: (Text)"
|
||||
' Me.lblIndex.Visible = True
|
||||
' Me.txtindexwert_final.Visible = True
|
||||
' Me.grbxSystemStamps.Visible = True
|
||||
' Me.btnStampDate.Visible = True
|
||||
' Me.btnStampDate.Visible = True
|
||||
' Me.txtindexwert_final.Text = ""
|
||||
' Me.chkbxfinalIndex.Visible = False
|
||||
' Case 2 'Integer
|
||||
' Me.lblIndex.Text = "Definieren Sie den festen Wert: (Zahl)"
|
||||
' Me.lblIndex.Visible = True
|
||||
' Me.txtindexwert_final.Visible = True
|
||||
' Me.grbxSystemStamps.Visible = True
|
||||
' Me.btnStampDate.Visible = True
|
||||
' Me.btnStampDate.Visible = True
|
||||
' Me.txtindexwert_final.Text = ""
|
||||
' Me.chkbxfinalIndex.Visible = False
|
||||
' Case 3 'Float
|
||||
' Me.lblIndex.Text = "Definieren Sie den festen Wert: (Decimal)"
|
||||
' Me.lblIndex.Visible = True
|
||||
' Me.txtindexwert_final.Visible = True
|
||||
' Me.grbxSystemStamps.Visible = False
|
||||
' Me.txtindexwert_final.Text = ""
|
||||
' Me.chkbxfinalIndex.Visible = False
|
||||
' Case 4 ' Boolean
|
||||
' Me.lblIndex.Text = "Wählen Sie den Boolean-Wert: (Ja/Nein)"
|
||||
' Me.lblIndex.Visible = True
|
||||
' Me.txtindexwert_final.Visible = False
|
||||
' Me.grbxSystemStamps.Visible = False
|
||||
' Me.chkbxfinalIndex.CheckState = CheckState.Checked
|
||||
' Me.chkbxfinalIndex.Visible = True
|
||||
' Case 5 'Date
|
||||
' Me.lblIndex.Text = "Definieren Sie den festen Wert: (Date)"
|
||||
' Me.lblIndex.Visible = True
|
||||
' Me.txtindexwert_final.Visible = True
|
||||
' Me.grbxSystemStamps.Visible = True
|
||||
' Me.txtindexwert_final.Text = ""
|
||||
' Me.chkbxfinalIndex.Visible = False
|
||||
' Case 4107 'Vektor Zahl
|
||||
' Me.lblIndex.Text = "Definieren Sie den festen Wert - Vektorfeld: (Zahl)"
|
||||
' Me.lblIndex.Visible = True
|
||||
' Me.txtindexwert_final.Visible = True
|
||||
' Me.grbxSystemStamps.Visible = False
|
||||
' Me.txtindexwert_final.Text = ""
|
||||
' Me.chkbxfinalIndex.Visible = False
|
||||
' Case 4097 'Vektor String
|
||||
' Me.lblIndex.Text = "Definieren Sie den festen Wert - Vektorfeld: (Text)"
|
||||
' Me.lblIndex.Visible = True
|
||||
' Me.txtindexwert_final.Visible = True
|
||||
' Me.grbxSystemStamps.Visible = True
|
||||
' Me.btnStampDate.Visible = True
|
||||
' Me.btnStampDate.Visible = True
|
||||
' Me.txtindexwert_final.Text = ""
|
||||
' Me.chkbxfinalIndex.Visible = False
|
||||
' Case 4100 'Vektor Bool
|
||||
' Me.lblIndex.Text = "Definieren Sie den festen Wert - Vektorfeld: (Boolean)"
|
||||
' Me.lblIndex.Visible = True
|
||||
' Me.txtindexwert_final.Visible = True
|
||||
' Me.grbxSystemStamps.Visible = False
|
||||
' Me.btnStampDate.Visible = False
|
||||
' Me.txtindexwert_final.Text = ""
|
||||
' Me.chkbxfinalIndex.Visible = False
|
||||
' Case 4101 'Vektor Date
|
||||
' Me.lblIndex.Text = "Definieren Sie den festen Wert - Vektorfeld: (Date)"
|
||||
' Me.lblIndex.Visible = True
|
||||
' Me.txtindexwert_final.Visible = True
|
||||
' Me.grbxSystemStamps.Visible = True
|
||||
' Me.btnStampDate.Visible = True
|
||||
' Me.txtindexwert_final.Text = ""
|
||||
' Me.chkbxfinalIndex.Visible = False
|
||||
' Case 4104
|
||||
' Me.lblIndex.Text = "Definieren Sie den festen Wert - Vektorfeld: (Currency)"
|
||||
' Me.lblIndex.Visible = True
|
||||
' Me.txtindexwert_final.Visible = True
|
||||
' Me.grbxSystemStamps.Visible = False
|
||||
' Me.txtindexwert_final.Text = ""
|
||||
' Me.chkbxfinalIndex.Visible = False
|
||||
' Case Else
|
||||
' btnInsert_FinalIndex.Enabled = False
|
||||
' End Select
|
||||
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
'Private Sub btnInsert_FinalIndex_Click(sender As System.Object, e As System.EventArgs)
|
||||
' Me.lblSaveFinalIndex.Visible = False
|
||||
' If CheckBoxPMVEKTOR.Checked = False Then
|
||||
' If cmbIndexe.SelectedIndex <> -1 Then
|
||||
' Dim indexwert As String = ""
|
||||
' If txtindexwert_final.Visible = True Then
|
||||
' indexwert = txtindexwert_final.Text
|
||||
' Else
|
||||
' If chkbxfinalIndex.CheckState = CheckState.Checked Then
|
||||
' indexwert = 1
|
||||
' Else
|
||||
' indexwert = 0
|
||||
' End If
|
||||
|
||||
' End If
|
||||
' Try
|
||||
' TBPM_PROFILE_FINAL_INDEXINGTableAdapter.CmdInsert(PROFILGUIDTextBox.Text, cmbIndexe.Text, indexwert, USER_USERNAME, 0, "")
|
||||
' Me.lblSaveFinalIndex.Text = "Der Index wurde erfolgreich angelegt - " & Now
|
||||
' Me.lblSaveFinalIndex.Visible = True
|
||||
|
||||
' Catch ex As Exception
|
||||
' MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei Anlage Final Index:")
|
||||
' End Try
|
||||
|
||||
' End If
|
||||
' Else
|
||||
' If txtBezeichner.Text <> "" Then
|
||||
' Dim indexwert As String = ""
|
||||
' If txtindexwert_final.Visible = True Then
|
||||
' indexwert = txtindexwert_final.Text
|
||||
' Else
|
||||
' If chkbxfinalIndex.CheckState = CheckState.Checked Then
|
||||
' indexwert = "True"
|
||||
' Else
|
||||
' indexwert = "False"
|
||||
' End If
|
||||
|
||||
' End If
|
||||
' Try
|
||||
' TBPM_PROFILE_FINAL_INDEXINGTableAdapter.CmdInsert(PROFILGUIDTextBox.Text, "[%VKT" & txtBezeichner.Text, indexwert, USER_USERNAME, 0, "")
|
||||
' Me.lblSaveFinalIndex.Text = "Der Index wurde erfolgreich angelegt - " & Now
|
||||
' Me.lblSaveFinalIndex.Visible = True
|
||||
' Catch ex As Exception
|
||||
' MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei Anlage Final Index in VEKTORFELD:")
|
||||
' End Try
|
||||
' End If
|
||||
' End If
|
||||
' Refresh_Final_indexe()
|
||||
' INSERT_ACTIVE = False
|
||||
' TabControlFinalIndices.Enabled = False
|
||||
|
||||
'End Sub
|
||||
'Private Sub ToolStripButton1_Click_1(sender As System.Object, e As System.EventArgs)
|
||||
' Refresh_Final_indexe()
|
||||
' INSERT_ACTIVE = False
|
||||
' TabControlFinalIndices.Enabled = False
|
||||
|
||||
' txtBezeichner.Text = String.Empty
|
||||
' txtindexwert_final.Text = String.Empty
|
||||
'End Sub
|
||||
|
||||
Private Sub tsbtnProfilkopieren_Click(sender As System.Object, e As System.EventArgs)
|
||||
|
||||
End Sub
|
||||
Private Function Execute_SQL(SQL As String)
|
||||
Try
|
||||
Dim SQLconnection As New SqlClient.SqlConnection(CONNECTION_STRING)
|
||||
Dim SQLcommand As New SqlCommand(SQL, SQLconnection)
|
||||
SQLconnection.Open()
|
||||
SQLcommand.ExecuteNonQuery()
|
||||
SQLcommand.Dispose()
|
||||
SQLconnection.Close()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox("Fehler in Execute_SQL: " & vbNewLine & ex.Message & vbNewLine & vbNewLine & " SQL: " & SQL)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Private Sub CancelFinalIndexInsert()
|
||||
INSERT_ACTIVE = False
|
||||
@ -638,12 +399,6 @@ Public Class frmAdministration
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ToolStripButton4_Click(sender As Object, e As EventArgs)
|
||||
Cursor = Cursors.WaitCursor
|
||||
frmUserKonfig_AddUsers.ShowDialog()
|
||||
Load_User()
|
||||
Cursor = Cursors.Default
|
||||
End Sub
|
||||
Private Sub ToolStripButton12_Click(sender As Object, e As EventArgs)
|
||||
Load_User()
|
||||
End Sub
|
||||
@ -666,24 +421,6 @@ Public Class frmAdministration
|
||||
Indexe_eintragen()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button3_Click_1(sender As Object, e As EventArgs)
|
||||
Dim indexe = WINDREAM.GetIndicesByObjecttype(cmbObjekttypen.Text)
|
||||
If indexe IsNot Nothing Then
|
||||
For Each index As String In indexe
|
||||
MsgBox(index & vbNewLine & WINDREAM.GetTypeOfIndex(index))
|
||||
Select Case WINDREAM.GetTypeOfIndex(index)
|
||||
Case 4107 'Vektor Zahl
|
||||
|
||||
Case 4097
|
||||
|
||||
Case Else
|
||||
|
||||
End Select
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Private Sub TabControlFinalIndices_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' If TabControlFinalIndices.SelectedIndex = 1 Then
|
||||
' Me.cmbIndexe2.Enabled = False
|
||||
|
||||
@ -36,21 +36,13 @@ Public Class frmFormDesigner
|
||||
' Setzt den typ des SQL-Befehls für frmSQL_DESIGNER
|
||||
CURRENT_DESIGN_TYPE = "INPUT_INDEX"
|
||||
|
||||
|
||||
' Profil Name in Fenstertitel setzen
|
||||
Text = $"Validation Designer - Profil: {ProfileName}"
|
||||
|
||||
' Try
|
||||
' Windream initialisieren
|
||||
If IDB_ACTIVE = False Then
|
||||
clsWindream.Create_Session()
|
||||
btnButton.Visible = False
|
||||
Else
|
||||
btnButton.Visible = True
|
||||
End If
|
||||
btnButton.Visible = True
|
||||
|
||||
|
||||
'Windream Abfragen, sollten einmal beim Start des Formulars geladen werden
|
||||
'Abfragen, sollten einmal beim Start des Formulars geladen werden
|
||||
Dim unsortedIndicies
|
||||
Dim sortedIndicies As List(Of String)
|
||||
If IDB_ACTIVE = False Then
|
||||
|
||||
@ -52,16 +52,7 @@ Public Class frmMain
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Error in Save FormLayout: " & ex.Message)
|
||||
End Try
|
||||
If IDB_ACTIVE = False Then
|
||||
Try
|
||||
If WINDREAM?.oSession?.aLoggedin = True Then
|
||||
WINDREAM.Stop_WMCC_andCo()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
Try
|
||||
ClassAllgemeineFunktionen.LoginOut("LOGOUT")
|
||||
@ -190,32 +181,9 @@ Public Class frmMain
|
||||
Check_Timer_Notification()
|
||||
formShown = True
|
||||
Restore_Form_Position()
|
||||
|
||||
If IDB_ACTIVE = False And ERROR_STATE = "" Then
|
||||
Try
|
||||
WINDREAM = New ClassPMWindream
|
||||
WINDREAM.Start_WMCC_andCo()
|
||||
If Not IsNothing(WINDREAM.oSession) Then
|
||||
If WINDREAM.oSession.aLoggedin = False Then
|
||||
MsgBox("You could not be logged in to windream. Please check the log.", MsgBoxStyle.Critical)
|
||||
End If
|
||||
Else
|
||||
MsgBox("Login on windream was not possible. Please check the log.", MsgBoxStyle.Critical)
|
||||
End If
|
||||
'_windreamPM = New ClassPMWindream
|
||||
'_windreamPM.Start_WMCC_andCo()
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox("Unexpected Error in windream-login - Step 5: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
||||
End Try
|
||||
Else
|
||||
Dim oSQL = $"SELECT SQL_COMMAND FROM TBDD_SQL_COMMANDS WHERE TITLE = 'PM_IDB_DOC_DATA'"
|
||||
IDB_DOC_DATA_SQL = ClassDatabase.Execute_Scalar(oSQL, CONNECTION_STRING)
|
||||
LOGGER.Debug($"Got the IDB_DOC_DATA_SQL..{IDB_DOC_DATA_SQL}")
|
||||
End If
|
||||
|
||||
|
||||
Dim oSQL = $"SELECT SQL_COMMAND FROM TBDD_SQL_COMMANDS WHERE TITLE = 'PM_IDB_DOC_DATA'"
|
||||
IDB_DOC_DATA_SQL = ClassDatabase.Execute_Scalar(oSQL, CONNECTION_STRING)
|
||||
LOGGER.Debug($"Got the IDB_DOC_DATA_SQL..{IDB_DOC_DATA_SQL}")
|
||||
LOGGER.Debug("MainForm initialized!")
|
||||
End If
|
||||
formopenClose = False
|
||||
@ -1265,24 +1233,7 @@ Public Class frmMain
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Private Function Init_windream()
|
||||
Try
|
||||
'_windream = New ClassWindream_allgemein
|
||||
'_windream.Create_Session()
|
||||
'_windreamPM = New ClassPMWindream()
|
||||
'_windreamPM.Create_Session()
|
||||
WINDREAM = New ClassPMWindream()
|
||||
WINDREAM.Create_Session()
|
||||
|
||||
LOGGER.Debug("windream initialized")
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox("Error Init_windream:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
||||
LOGGER.Info("Unexpected error in Init_windream: " & ex.Message, True)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Private Sub tsmiMarkedFilesFinish_Click(sender As Object, e As EventArgs) Handles tsmiMarkedFilesFinish.Click
|
||||
Try
|
||||
Dim oSelectedRows As Integer() = GridView_Docs.GetSelectedRows()
|
||||
@ -1309,13 +1260,7 @@ Public Class frmMain
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If IDB_ACTIVE = False Then
|
||||
SOURCE_INIT = Init_windream()
|
||||
|
||||
Else
|
||||
SOURCE_INIT = Init_IDB()
|
||||
End If
|
||||
|
||||
SOURCE_INIT = Init_IDB()
|
||||
|
||||
If SOURCE_INIT = True Then
|
||||
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
Imports WINDREAMLib
|
||||
Imports Oracle.ManagedDataAccess.Client
|
||||
Imports Oracle.ManagedDataAccess.Client
|
||||
Imports System.ComponentModel
|
||||
Imports DD_LIB_Standards
|
||||
Imports DigitalData.Controls.LookupGrid
|
||||
@ -23,29 +22,24 @@ Public Class frmMassValidator
|
||||
Private _dependingControl_in_action As Boolean = False
|
||||
|
||||
Private oErrorMessage As String
|
||||
Private _windream As New ClassWindream_allgemein
|
||||
'Private _windreamPM As New ClassPMWindream
|
||||
|
||||
|
||||
Private _allgFunk As New ClassAllgemeineFunktionen
|
||||
Dim viewer_string As String
|
||||
Dim pdfxchange As Boolean = False
|
||||
Dim sumatra As Boolean = False
|
||||
Dim WMObject As WMObject
|
||||
|
||||
Private Sub frmMassValidator_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
FORM_Shown = False
|
||||
Try
|
||||
' 05.10.18: Nutzung des Globalen Windream Objekts WINDREAM
|
||||
'_windream = New ClassWindream_allgemein
|
||||
'_windream.Create_Session()
|
||||
'_windreamPM = New ClassPMWindream()
|
||||
'_windreamPM.Create_Session()
|
||||
|
||||
|
||||
LOGGER.Debug("windream initialized frmMassValidator")
|
||||
LOGGER.Debug("initialized frmMassValidator")
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox("Error Init_windream:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
||||
LOGGER.Info(">> Fehler in Init_windream: " & ex.Message, True)
|
||||
MsgBox("Error Init:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
||||
LOGGER.Info(">> Fehler in Init: " & ex.Message, True)
|
||||
Exit Sub
|
||||
End Try
|
||||
|
||||
@ -258,7 +252,7 @@ Public Class frmMassValidator
|
||||
Else
|
||||
If CURR_CHOICE_LIST <> "" Then
|
||||
LOGGER.Debug("In add_ComboBox - AListe: " & CURR_CHOICE_LIST)
|
||||
Dim liste = WINDREAM.GetValuesfromAuswahlliste(CURR_CHOICE_LIST)
|
||||
Dim liste = "ToDo IDB LIST"
|
||||
If liste IsNot Nothing Then
|
||||
cmb.Items.Add("")
|
||||
For Each index As String In liste
|
||||
@ -266,7 +260,7 @@ Public Class frmMassValidator
|
||||
Next
|
||||
cmb.SelectedIndex = -1
|
||||
Else
|
||||
MsgBox("Resultliste windream is nothing!", MsgBoxStyle.Exclamation, CURR_CHOICE_LIST)
|
||||
MsgBox("ChiceList is nothing!", MsgBoxStyle.Exclamation, CURR_CHOICE_LIST)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@ -400,7 +394,7 @@ Public Class frmMassValidator
|
||||
End If
|
||||
If Not IsDBNull(filteredData.Rows(0).Item("CONNECTION_ID")) And Not IsDBNull(filteredData.Rows(0).Item("SQL_UEBERPRUEFUNG")) Then
|
||||
Dim oSqlCommand = IIf(IsDBNull(filteredData.Rows(0).Item("SQL_UEBERPRUEFUNG")), "", filteredData.Rows(0).Item("SQL_UEBERPRUEFUNG"))
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, pnldesigner, CURRENT_WMFILE, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, pnldesigner, Nothing, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
LOGGER.Debug(">>> sql after ReplaceAllValues: " & oSqlCommand)
|
||||
_dependingControl_in_action = True
|
||||
Dim oDTDEPENDING_RESULT As DataTable = ClassDatabase.Return_Datatable(oSqlCommand)
|
||||
@ -486,7 +480,7 @@ Public Class frmMassValidator
|
||||
frmError.ShowDialog()
|
||||
LOGGER.Info(">> Unexpected error in FillIndexValues TextBox(MI): " & ex.Message, True)
|
||||
LOGGER.Info(">> Controltype: " & controltype)
|
||||
LOGGER.Info(">> Indexname windream: " & indexname)
|
||||
LOGGER.Info(">> Indexname: " & indexname)
|
||||
Exit Sub
|
||||
End Try
|
||||
|
||||
@ -709,7 +703,7 @@ Public Class frmMassValidator
|
||||
frmError.ShowDialog()
|
||||
LOGGER.Info(">> Unexpected Error in FillIndexValues(MIs: " & ex.Message, True)
|
||||
LOGGER.Info(">> Controltype: " & controltype)
|
||||
LOGGER.Info(">> Indexname windream: " & indexname)
|
||||
LOGGER.Info(">> Indexname: " & indexname)
|
||||
|
||||
|
||||
End Try
|
||||
@ -722,18 +716,18 @@ Public Class frmMassValidator
|
||||
Dim tempIndexValue
|
||||
Dim idoccount As Integer = 1
|
||||
For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows
|
||||
Dim WMDOC As WMObject
|
||||
Dim WMDOC As Object = Nothing
|
||||
Try
|
||||
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH"))
|
||||
WMDOC = "ToDo Get IDB DOC Info"
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("error while creating WMObject in (textCheckIndex): " & ex.Message)
|
||||
Exit For
|
||||
End Try
|
||||
If Not IsNothing(WMDOC) Then
|
||||
CURRENT_WMFILE = WMDOC
|
||||
|
||||
If idxname.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then
|
||||
tempIndexValue = ReturnVektor_IndexValue(idxname, WMDOC)
|
||||
tempIndexValue = Nothing 'IDB
|
||||
Else
|
||||
Try
|
||||
tempIndexValue = WMDOC.GetVariableValue(idxname)
|
||||
@ -774,52 +768,7 @@ Public Class frmMassValidator
|
||||
Return "Unexp. error in GetWM_Value_Multiple_Docs"
|
||||
End Try
|
||||
End Function
|
||||
Private Function ReturnVektor_IndexValue(VKTBezeichner As String, WMFile As WMObject)
|
||||
Try
|
||||
Dim value
|
||||
Dim name = VKTBezeichner.Replace("[%VKT", "")
|
||||
Dim Sort_Arr() As String
|
||||
Dim i As Integer = 0
|
||||
'Jetzt im Vektorfeld des Profils nachsehen ob der WErt bereits vorhanden ist
|
||||
Dim wertWD = WMFile.GetVariableValue(PROFIL_VEKTORINDEX)
|
||||
If wertWD Is Nothing = False Then
|
||||
'Es wird gegen ein Vektorfeld nachindexiert
|
||||
If wertWD.GetType.ToString.Contains("System.Object") Then
|
||||
'es handelt sich um ein Vektorfeld - Zuweisen der Indexwerte des Vektorfeldes zu Array
|
||||
For Each obj As Object In wertWD
|
||||
If obj Is Nothing = False Then
|
||||
ReDim Preserve Sort_Arr(i)
|
||||
Sort_Arr(i) = obj.ToString()
|
||||
i += 1
|
||||
End If
|
||||
Next
|
||||
'Das Ergebnis-Array nun Rückwärts sortieren, um die letzte Änderung zu finden
|
||||
For Each _string As Object In Sort_Arr.Reverse()
|
||||
Dim DDPM_String As String = _string.ToString()
|
||||
'
|
||||
Dim VektorArray() = Split(DDPM_String, Delimiter)
|
||||
If VektorArray(1).ToString.ToLower = name.ToLower Then
|
||||
value = VektorArray(2)
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
End If
|
||||
If value Is Nothing Then value = ""
|
||||
Return value
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox("Unexpected Error in ReturnVektor_IndexValue(MV): " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
LOGGER.Info("Unexpected Error in ReturnVektor_IndexValue(MV): " & ex.Message)
|
||||
Return ""
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
Public Sub OnTextBoxFocus(sender As Object, e As EventArgs)
|
||||
Dim box As TextBox = sender
|
||||
@ -851,7 +800,7 @@ Public Class frmMassValidator
|
||||
Dim displayboxname = ROW.Item(Name).ToString
|
||||
If Not IsDBNull(ROW.Item(1)) And Not IsDBNull(ROW.Item(2)) Then
|
||||
Dim sql_Statement = ROW.Item(2)
|
||||
sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, pnldesigner, WMObject, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, pnldesigner, Nothing, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
|
||||
_dependingControl_in_action = True
|
||||
Depending_Control_Set_Result(displayboxname, sql_Statement, ROW.Item(1))
|
||||
@ -927,7 +876,7 @@ Public Class frmMassValidator
|
||||
If Not IsDBNull(ROW.Item("CONNECTION_ID")) And Not IsDBNull(ROW.Item("SQL_UEBERPRUEFUNG")) Then
|
||||
Dim sql_Statement = ROW.Item("SQL_UEBERPRUEFUNG")
|
||||
|
||||
sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, pnldesigner, WMObject, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, pnldesigner, Nothing, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
|
||||
|
||||
_dependingControl_in_action = True
|
||||
@ -1127,7 +1076,7 @@ Public Class frmMassValidator
|
||||
GetWMDocPathWindows(0)
|
||||
|
||||
If CreateWMObject() = True Then
|
||||
If ClassFinalizeDoc.Write_Final_Metadata(CURRENT_WMFILE) = True Then
|
||||
If ClassFinalizeDoc.WMWrite_Final_Metadata(Nothing) = True Then
|
||||
Dim sql = String.Format("UPDATE TBPM_PROFILE_FILES SET IN_WORK = 0, WORK_USER = '{0}', EDIT = 1 WHERE GUID = {1}", USER_USERNAME, CURRENT_DOC_GUID)
|
||||
If ClassDatabase.Execute_non_Query(sql) = True Then
|
||||
workedFiles += 1
|
||||
@ -1256,11 +1205,12 @@ Public Class frmMassValidator
|
||||
|
||||
'####### WENN MOVE2FOLDER KONFIGURIERT IST#######
|
||||
If MOVE2Folder <> "" Then
|
||||
Dim idxerr_message = _allgFunk.Move2Folder(docrow.Item("FULL_PATH").ToString, MOVE2Folder, CURRENT_ProfilGUID, _windream)
|
||||
If idxerr_message <> "" Then
|
||||
MsgBox("Error in Move2Folder - Check the log And inform Your sysadmin", MsgBoxStyle.Critical)
|
||||
' "ToDo IDB"
|
||||
'Dim idxerr_message = _allgFunk.Move2Folder(docrow.Item("FULL_PATH").ToString, MOVE2Folder, CURRENT_ProfilGUID, _windream)
|
||||
'If idxerr_message <> "" Then
|
||||
' MsgBox("Error in Move2Folder - Check the log And inform Your sysadmin", MsgBoxStyle.Critical)
|
||||
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
|
||||
End If
|
||||
@ -1322,7 +1272,7 @@ Public Class frmMassValidator
|
||||
|
||||
End Function
|
||||
Private Function CreateWMObject() As String
|
||||
CURRENT_WMFILE = Nothing
|
||||
|
||||
LOGGER.Debug($"in GetWMDocFileString...'")
|
||||
Dim oWMRELPATH As String = BASEDATA_DT_CONFIG.Rows.Item(0).Item("WM_REL_PATH")
|
||||
If oWMRELPATH.EndsWith("\") = False Then
|
||||
@ -1331,9 +1281,9 @@ Public Class frmMassValidator
|
||||
Dim oWMOwnPath = WMDocPathWindows.Replace(oWMRELPATH, "")
|
||||
LOGGER.Debug($"oWMOwnPath: {oWMOwnPath}")
|
||||
Try
|
||||
Dim oNormalizedPath = WINDREAM.NormalizePath(oWMOwnPath)
|
||||
Dim oNormalizedPath = "ToDo IDB Normalize"
|
||||
LOGGER.Debug($"oNormalizedPath: {oNormalizedPath}")
|
||||
CURRENT_WMFILE = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, oNormalizedPath)
|
||||
|
||||
WMDocFileString = oNormalizedPath
|
||||
LOGGER.Debug("WMDocFileString: " & WMDocFileString)
|
||||
Return True
|
||||
@ -1700,7 +1650,7 @@ Public Class frmMassValidator
|
||||
If docrow.Item("DOC_ID") = 0 Then
|
||||
Continue For
|
||||
End If
|
||||
Dim WMDOC As WMObject
|
||||
|
||||
Dim oRelPath = docrow.Item("FULL_PATH").ToString
|
||||
Try
|
||||
If oRelPath.StartsWith("W") Then
|
||||
@ -1713,7 +1663,6 @@ Public Class frmMassValidator
|
||||
End If
|
||||
End If
|
||||
|
||||
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, oRelPath)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("error while creating WMObject in (IndexMultipleFiles): " & oRelPath)
|
||||
@ -1746,10 +1695,11 @@ Public Class frmMassValidator
|
||||
arrValue(0) = idxvalue(0).ToString
|
||||
End If
|
||||
'Jetzt das eigentliche Indexieren der Datei
|
||||
If WINDREAM.RunIndexing(WMDOC, arrIndex, arrValue) = False Then
|
||||
_allfine = False
|
||||
Exit For
|
||||
End If
|
||||
'"ToDo Set Variable"
|
||||
'If WINDREAM.RunIndexing(WMDOC, arrIndex, arrValue) = False Then
|
||||
' _allfine = False
|
||||
' Exit For
|
||||
'End If
|
||||
|
||||
End If
|
||||
Next
|
||||
@ -1765,9 +1715,9 @@ Public Class frmMassValidator
|
||||
Dim _allfine As Boolean = True
|
||||
Dim missing As Boolean = False
|
||||
For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows
|
||||
Dim WMDOC As WMObject
|
||||
Dim WMDOC As Object '"To Do IDB"
|
||||
Try
|
||||
WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH"))
|
||||
WMDOC = "ToDo IDB"
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message)
|
||||
@ -1807,51 +1757,16 @@ Public Class frmMassValidator
|
||||
|
||||
If myInputArr.Length > 0 Then
|
||||
'Jetzt die Datei indexieren
|
||||
If IndexSinglefile(WMDOC, NameVKTIndex, myInputArr) = False Then
|
||||
missing = True
|
||||
End If
|
||||
'IDB ToDO
|
||||
'If IndexSinglefile(WMDOC, NameVKTIndex, myInputArr) = False Then
|
||||
' missing = True
|
||||
'End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Return missing
|
||||
End Function
|
||||
Private Function IndexSinglefile(_dok As WINDREAMLib.WMObject, idxxname As String, idxvalue As Object)
|
||||
Dim File_indexiert As Boolean = False
|
||||
Try
|
||||
'Die Arrays vorbereiten
|
||||
Dim arrIndex() As String = Nothing
|
||||
Dim arrValue() As String = Nothing
|
||||
arrIndex = Nothing
|
||||
arrValue = Nothing
|
||||
'Den Indexnamen übergeben
|
||||
ReDim Preserve arrIndex(0)
|
||||
arrIndex(0) = idxxname
|
||||
'Das Array der Idnexwerte überprüfen
|
||||
If idxvalue Is Nothing = False Then
|
||||
If idxvalue.Length() > 1 Then
|
||||
LOGGER.Debug("Indexing Index '" & idxxname & "' with Arrayvalue")
|
||||
Dim anzahl As Integer = 0
|
||||
For Each indexvalue As String In idxvalue
|
||||
ReDim Preserve arrValue(anzahl)
|
||||
arrValue(anzahl) = indexvalue
|
||||
anzahl += 1
|
||||
Next
|
||||
Else
|
||||
LOGGER.Debug("Indexing Index '" & idxxname & "' with value '" & idxvalue(0) & "'")
|
||||
ReDim Preserve arrValue(0)
|
||||
arrValue(0) = idxvalue(0).ToString
|
||||
End If
|
||||
'Jetzt das eigentliche Indexieren der Datei
|
||||
File_indexiert = WINDREAM.RunIndexing(_dok, arrIndex, arrValue)
|
||||
Return File_indexiert
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Unexpected Error in IndexSinglefile: " & ex.Message.ToString, True)
|
||||
Return Err()
|
||||
End Try
|
||||
End Function
|
||||
Function Return_PM_VEKTOR(input As String, VKTBezeichner As String)
|
||||
Dim PM_String As String
|
||||
Try
|
||||
|
||||
@ -58,29 +58,12 @@ Public Class frmSQL_DESIGNER
|
||||
btnAddControl.Visible = True
|
||||
|
||||
cmbIndexe.Items.Clear()
|
||||
If IDB_ACTIVE = False Then
|
||||
Dim oIndicies = WINDREAM.GetIndicesByObjecttype(CURRENT_OBJECTTYPE)
|
||||
If oIndicies IsNot Nothing Then
|
||||
For Each index As String In oIndicies
|
||||
cmbIndexe.Items.Add(index)
|
||||
Next
|
||||
cmbIndexe.SelectedIndex = -1
|
||||
End If
|
||||
'cmbIndexe.Enabled = True
|
||||
'lbIndexe.Enabled = True
|
||||
'btnAddIndex.Enabled = True
|
||||
Else
|
||||
Dim oAttributes = IDBData.GetIndicesByBE(CURRENT_OBJECTTYPE)
|
||||
If oAttributes IsNot Nothing Then
|
||||
For Each oAttribute As String In oAttributes
|
||||
cmbIndexe.Items.Add(oAttribute)
|
||||
Next
|
||||
cmbIndexe.SelectedIndex = -1
|
||||
End If
|
||||
|
||||
'cmbIndexe.Enabled = False
|
||||
'lbIndexe.Enabled = False
|
||||
'btnAddIndex.Enabled = False
|
||||
Dim oAttributes = IDBData.GetIndicesByBE(CURRENT_OBJECTTYPE)
|
||||
If oAttributes IsNot Nothing Then
|
||||
For Each oAttribute As String In oAttributes
|
||||
cmbIndexe.Items.Add(oAttribute)
|
||||
Next
|
||||
cmbIndexe.SelectedIndex = -1
|
||||
End If
|
||||
|
||||
Else
|
||||
@ -90,7 +73,6 @@ Public Class frmSQL_DESIGNER
|
||||
cmbIndexe.Visible = False
|
||||
lbIndexe.Visible = False
|
||||
btnAddIndex.Visible = False
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -414,7 +414,7 @@ Public Class frmValidatorSearch
|
||||
If IsNothing(_DTSQLSearches) Then Exit Sub
|
||||
Dim oConID = _DTSQLSearches.Rows(XtraTabControlSQL.SelectedTabPageIndex).Item("CONN_ID")
|
||||
Dim oCommand = _DTSQLSearches.Rows(XtraTabControlSQL.SelectedTabPageIndex).Item("SQL_COMMAND")
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, CURRENT_WMFILE, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, Nothing, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
Dim oTabIndex = _DTSQLSearches.Rows(XtraTabControlSQL.SelectedTabPageIndex).Item("TAB_INDEX")
|
||||
Dim oTabCaption = _DTSQLSearches.Rows(XtraTabControlSQL.SelectedTabPageIndex).Item("TAB_TITLE")
|
||||
RefreshTabSQL(oConID, oCommand, oTabIndex, oTabCaption)
|
||||
@ -423,7 +423,7 @@ Public Class frmValidatorSearch
|
||||
If IsNothing(_DTDocSearches) Then Exit Sub
|
||||
Dim oConID = _DTDocSearches.Rows(XtraTabControlDocs.SelectedTabPageIndex).Item("CONN_ID")
|
||||
Dim oCommand = _DTDocSearches.Rows(XtraTabControlDocs.SelectedTabPageIndex).Item("SQL_COMMAND")
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, CURRENT_WMFILE, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, Nothing, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
Dim oTabIndex = _DTDocSearches.Rows(XtraTabControlDocs.SelectedTabPageIndex).Item("TAB_INDEX")
|
||||
Dim oTabCaption = _DTDocSearches.Rows(XtraTabControlDocs.SelectedTabPageIndex).Item("TAB_TITLE")
|
||||
RefreshTabDoc(oConID, oCommand, oTabIndex, oTabCaption)
|
||||
@ -610,7 +610,7 @@ Public Class frmValidatorSearch
|
||||
_DTSQLSearches = BASEDATA_DT_PROFILE_SEARCHES_SQL
|
||||
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("CONN_ID")
|
||||
Dim oCommand = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("SQL_COMMAND")
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, CURRENT_WMFILE, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, Nothing, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
XtraTabControlSQL.SelectedTabPageIndex = 0
|
||||
Refresh_Load_GridSQL(oConID, oCommand, 0, BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(0).Item("TAB_TITLE"))
|
||||
End If
|
||||
@ -618,7 +618,7 @@ Public Class frmValidatorSearch
|
||||
_DTDocSearches = BASEDATA_DT_PROFILE_SEARCHES_DOC
|
||||
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("CONN_ID")
|
||||
Dim oCommand = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("SQL_COMMAND")
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, CURRENT_WMFILE, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, Nothing, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
XtraTabControlDocs.SelectedTabPageIndex = 0
|
||||
RefreshTabDoc(oConID, oCommand, 0, BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(0).Item("TAB_TITLE"))
|
||||
End If
|
||||
@ -635,7 +635,7 @@ Public Class frmValidatorSearch
|
||||
Dim oTabIndex = XtraTabControlDocs.SelectedTabPageIndex
|
||||
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(oTabIndex).Item("CONN_ID")
|
||||
Dim oCommand = BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(oTabIndex).Item("SQL_COMMAND")
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, CURRENT_WMFILE, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, Nothing, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
RefreshTabDoc(oConID, oCommand, oTabIndex, BASEDATA_DT_PROFILE_SEARCHES_DOC.Rows(oTabIndex).Item("TAB_TITLE"))
|
||||
End Sub
|
||||
|
||||
@ -667,7 +667,7 @@ Public Class frmValidatorSearch
|
||||
Dim oTabIndex = XtraTabControlSQL.SelectedTabPageIndex
|
||||
Dim oConID = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(oTabIndex).Item("CONN_ID")
|
||||
Dim oCommand = BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(oTabIndex).Item("SQL_COMMAND")
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, CURRENT_WMFILE, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
oCommand = clsPatterns.ReplaceAllValues(oCommand, _frmValidator.pnldesigner, Nothing, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
RefreshTabSQL(oConID, oCommand, oTabIndex, BASEDATA_DT_PROFILE_SEARCHES_SQL.Rows(oTabIndex).Item("TAB_TITLE"))
|
||||
End Sub
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user