MS Initial without WM
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user