From ba758515a565b6f650cdb0f3420f2237601702e9 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 4 Oct 2018 15:16:40 +0200 Subject: [PATCH 1/7] jj: fix session errors --- app/DD_PM_WINDREAM/frmMain.vb | 9 ++++++--- app/DD_PM_WINDREAM/frmMassValidator.vb | 21 ++++++++++++--------- app/DD_PM_WINDREAM/frmValidator.vb | 15 +++++++++------ 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/app/DD_PM_WINDREAM/frmMain.vb b/app/DD_PM_WINDREAM/frmMain.vb index 461861c..9921531 100644 --- a/app/DD_PM_WINDREAM/frmMain.vb +++ b/app/DD_PM_WINDREAM/frmMain.vb @@ -22,7 +22,7 @@ Public Class frmMain Private GridCursorLocation As Point Private GRID_LOAD_TYPE As String = "OVERVIEW" Private GRID_INV_COL_REMOVED As Boolean = False - Private _windream As New ClassWindream_allgemein + 'Private _windream As New ClassWindream_allgemein Private Sub frmMain_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing Try @@ -927,8 +927,11 @@ Public Class frmMain End Sub Private Function Init_windream() Try - _windream = New ClassWindream_allgemein - _windream.Create_Session() + '_windream = New ClassWindream_allgemein + '_windream.Create_Session() + _windreamPM = New ClassPMWindream() + _windreamPM.Create_Session() + If LogErrorsOnly = False Then ClassLogger.Add(" >> windream initialized", False) Return True Catch ex As Exception diff --git a/app/DD_PM_WINDREAM/frmMassValidator.vb b/app/DD_PM_WINDREAM/frmMassValidator.vb index 4a01014..2e43b98 100644 --- a/app/DD_PM_WINDREAM/frmMassValidator.vb +++ b/app/DD_PM_WINDREAM/frmMassValidator.vb @@ -18,7 +18,7 @@ Public Class frmMassValidator Private _dependingControl_in_action As Boolean = False Private errmessage As String - Private _windream As New ClassWindream_allgemein + 'Private _windream As New ClassWindream_allgemein Private _windreamPM As New ClassPMWindream Private _allgFunk As New ClassAllgemeineFunktionen Dim viewer_string As String @@ -28,8 +28,11 @@ Public Class frmMassValidator Private Sub frmMassValidator_Load(sender As Object, e As EventArgs) Handles Me.Load FORM_Shown = False Try - _windream = New ClassWindream_allgemein - _windream.Create_Session() + '_windream = New ClassWindream_allgemein + '_windream.Create_Session() + _windreamPM = New ClassPMWindream() + _windreamPM.Create_Session() + If LogErrorsOnly = False Then ClassLogger.Add("windream initialized frmMassValidator", False) Catch ex As Exception @@ -240,8 +243,8 @@ Public Class frmMassValidator Else If CURR_CHOICE_LIST <> "" Then If LogErrorsOnly = False Then ClassLogger.Add(" >> In add_ComboBox - AListe: " & CURR_CHOICE_LIST, False) - Dim liste = _windream.GetValuesfromAuswahlliste(CURR_CHOICE_LIST) - If liste IsNot Nothing Then + Dim liste = _windreamPM.GetValuesfromAuswahlliste(CURR_CHOICE_LIST) + If liste IsNot Nothing Then cmb.Items.Add("") For Each index As String In liste cmb.Items.Add(index) @@ -581,7 +584,7 @@ Public Class frmMassValidator For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows Dim WMDOC As WMObject Try - WMDOC = _windream.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2)) + WMDOC = _windreamPM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2)) Catch ex As Exception ClassLogger.Add("error while creating WMObject in (textCheckIndex): " & ex.Message) Exit For @@ -917,7 +920,7 @@ Public Class frmMassValidator CURRENT_DOC_GUID = docrow.Item("DOC_GUID") Dim WMDOC As WMObject Try - WMDOC = _windream.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2)) + WMDOC = _windreamPM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2)) Catch ex As Exception ClassLogger.Add("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message) Exit For @@ -1380,7 +1383,7 @@ Public Class frmMassValidator For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows Dim WMDOC As WMObject Try - WMDOC = _windream.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2)) + WMDOC = _windreamPM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2)) Catch ex As Exception ClassLogger.Add("error while creating WMObject in (IndexMultipleFiles): " & ex.Message) _allfine = False @@ -1432,7 +1435,7 @@ Public Class frmMassValidator For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows Dim WMDOC As WMObject Try - WMDOC = _windream.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2)) + WMDOC = _windreamPM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2)) Catch ex As Exception ClassLogger.Add("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message) _allfine = False diff --git a/app/DD_PM_WINDREAM/frmValidator.vb b/app/DD_PM_WINDREAM/frmValidator.vb index b7f3fe6..19f7c09 100644 --- a/app/DD_PM_WINDREAM/frmValidator.vb +++ b/app/DD_PM_WINDREAM/frmValidator.vb @@ -26,7 +26,7 @@ Public Class frmValidator Dim finalProfile As Boolean Dim Move2Folder As String Private _windreamPM As New ClassPMWindream - Private _windream As New ClassWindream_allgemein + 'Private _windream As New ClassWindream_allgemein Private allgFunk As New ClassAllgemeineFunktionen Dim aktivesDokument As WMObject 'speichert die DocumentDaten @@ -264,8 +264,11 @@ Public Class frmValidator End Sub Private Function Init_windream() Try - _windream = New ClassWindream_allgemein - _windream.Create_Session() + _windreamPM = New ClassPMWindream() + _windreamPM.Create_Session() + + '_windream = New ClassWindream_allgemein + '_windream.Create_Session() If LogErrorsOnly = False Then ClassLogger.Add(" >> Windream initiiert", False) Return True Catch ex As Exception @@ -697,7 +700,7 @@ Public Class frmValidator Dim AListe As String = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetChoiceListName(ControlID) If LogErrorsOnly = False Then ClassLogger.Add(" >> In add_ComboBox - AListe: " & AListe, False) If AListe Is Nothing = False Then - Dim liste = _windream.GetValuesfromAuswahlliste(AListe) + Dim liste = _windreamPM.GetValuesfromAuswahlliste(AListe) If liste IsNot Nothing Then cmb.Items.Add("") For Each index As String In liste @@ -1331,7 +1334,7 @@ Public Class frmValidator ClassLogger.Add(">> Validierung für Dokument '" & Document_Path & "' gestartet", False) Try - aktivesDokument = _windream.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, Document_Path.Substring(2)) + aktivesDokument = _windreamPM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, Document_Path.Substring(2)) Catch ex As Exception allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Fehler bei Erzeugen windream-Objekt - DocGUID: " & CURRENT_DOC_GUID & " - ERROR: " & ex.Message, Environment.UserName) ClassLogger.Add("Fehler bei Erzeugen windream-Objekt in (LoadNextDokument): " & ex.Message) @@ -1340,7 +1343,7 @@ Public Class frmValidator 'Nochmaliger Versuch windream zu initialiseren If Init_windream() = True Then Try - aktivesDokument = _windream.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, Document_Path.Substring(2)) + aktivesDokument = _windreamPM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, Document_Path.Substring(2)) Catch ex1 As Exception ClassLogger.Add("Fehler bei 2. Versuch windream-Objekt: " & ex1.Message) errmessage = "1-Es besteht ein Problem beim Anmelden an windream - Bitte wenden Sie sich an Digital Data!" From 9ad40a1a154f9621649eadc033a4a149b0cbc6e8 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 4 Oct 2018 15:55:55 +0200 Subject: [PATCH 2/7] jj: check if user is member of SERVER_USER before killing session --- app/DD_PM_WINDREAM/ClassWindream_allgemein.vb | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb b/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb index 9879307..0eca36f 100644 --- a/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb +++ b/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb @@ -148,13 +148,19 @@ Public Class ClassWindream_allgemein End Function Public Function Stop_WMCC_andCo() Try - If WMSESSION_STARTSTOP_STARTUP = True Then + ' 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, MyConnectionString) + + If WMSESSION_STARTSTOP_STARTUP = True And userExistsInServerUserGroup Then Dim owindreamControlCenter = CreateObject("Wmcc.ControlCenter") Dim owindreamIndexService = CreateObject("WMIndexServer.WMIdxSvControl") - owindreamControlCenter.StartVFSService(0) - owindreamIndexService.Shutdown() - owindreamControlCenter.ExitCC(0) - End If + owindreamControlCenter.StartVFSService(0) + owindreamIndexService.Shutdown() + owindreamControlCenter.ExitCC(0) + End If Catch ex As Exception ClassLogger.Add("Error while Stopping WMCC and IndexService: " & ex.Message, True) End Try From c1f78a79806b33b5744214dd86b2a96b96a359a8 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 4 Oct 2018 15:56:39 +0200 Subject: [PATCH 3/7] jj: Version 1.9.5.1 --- app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb b/app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb index 8e3adf7..4b0533c 100644 --- a/app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb +++ b/app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - + From 6e64665d9a9ce60dd6d75b212f0a0d8e8c4fc580 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 4 Oct 2018 16:45:41 +0200 Subject: [PATCH 4/7] jj: expand groups before column settings --- app/DD_PM_WINDREAM/frmMain.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/DD_PM_WINDREAM/frmMain.vb b/app/DD_PM_WINDREAM/frmMain.vb index 9921531..0dede4c 100644 --- a/app/DD_PM_WINDREAM/frmMain.vb +++ b/app/DD_PM_WINDREAM/frmMain.vb @@ -1128,6 +1128,9 @@ Public Class frmMain RestoreLayout() Try + GridView_Docs.OptionsBehavior.AutoExpandAllGroups = True + GridView_Docs.OptionsView.ShowGroupedColumns = False + GridView_Docs.Columns.Item("PROFILE_GROUP_TEXT").GroupIndex = 0 GridView_Docs.Columns.Item("PROFILE_GROUP_TEXT").Visible = False GridView_Docs.Columns.Item("PROFILE_GROUP_COLOR").Visible = False @@ -1147,9 +1150,6 @@ Public Class frmMain GridView_Docs.Columns.Item("ICON").Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Left GridView_Docs.Columns("Last edited").DisplayFormat.FormatType = FormatType.DateTime GridView_Docs.Columns("Last edited").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss" - - GridView_Docs.OptionsBehavior.AutoExpandAllGroups = True - GridView_Docs.OptionsView.ShowGroupedColumns = False Catch ex As Exception ClassLogger.Add("Unexpected Error in Formatting Grid: " & ex.Message) End Try From 819c3407451056cab6a26498e02526878de90f2a Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 4 Oct 2018 17:05:37 +0200 Subject: [PATCH 5/7] jj: fix typo --- app/DD_PM_WINDREAM/ClassWindream_allgemein.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb b/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb index 0eca36f..b91bd0e 100644 --- a/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb +++ b/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb @@ -154,7 +154,7 @@ Public Class ClassWindream_allgemein WHERE T1.NAME = 'SERVER_USER' AND T.USER_ID = " & USER_ID Dim userExistsInServerUserGroup = ClassDatabase.Execute_Scalar(sql, MyConnectionString) - If WMSESSION_STARTSTOP_STARTUP = True And userExistsInServerUserGroup Then + If WMSESSION_STARTSTOP_STARTUP = True And userExistsInServerUserGroup Is Nothing Then Dim owindreamControlCenter = CreateObject("Wmcc.ControlCenter") Dim owindreamIndexService = CreateObject("WMIndexServer.WMIdxSvControl") owindreamControlCenter.StartVFSService(0) From 9ed2d35d17df7e5476bdeb654b9d843c4ea2bc55 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 5 Oct 2018 11:15:30 +0200 Subject: [PATCH 6/7] jj: Revert ChoiceList Method, Add WMCC Start Check, Only use a single instance of ClassPMWindream in Application --- app/DD_PM_WINDREAM/ClassFinalizeDoc.vb | 4 +- app/DD_PM_WINDREAM/ClassPMWindream.vb | 54 +++++++++---------- app/DD_PM_WINDREAM/ClassWindream_allgemein.vb | 8 ++- app/DD_PM_WINDREAM/ModuleRuntimeVariables.vb | 2 + app/DD_PM_WINDREAM/frmAdministration.vb | 22 ++++---- app/DD_PM_WINDREAM/frmMain.vb | 24 ++++++--- app/DD_PM_WINDREAM/frmMassValidator.vb | 22 ++++---- app/DD_PM_WINDREAM/frmSQL_DESIGNER.vb | 8 +-- app/DD_PM_WINDREAM/frmValidator.vb | 21 +++++--- 9 files changed, 94 insertions(+), 71 deletions(-) diff --git a/app/DD_PM_WINDREAM/ClassFinalizeDoc.vb b/app/DD_PM_WINDREAM/ClassFinalizeDoc.vb index ba6288e..daed32b 100644 --- a/app/DD_PM_WINDREAM/ClassFinalizeDoc.vb +++ b/app/DD_PM_WINDREAM/ClassFinalizeDoc.vb @@ -129,9 +129,9 @@ ReDim Preserve arrValue(0) arrValue(0) = idxvalue(0).ToString End If - Dim _windreamPM As New ClassPMWindream + 'Dim _windreamPM As New ClassPMWindream 'Jetzt das eigentliche Indexieren der Datei - File_indexiert = _windreamPM.RunIndexing(CURRENT_WMFILE, arrIndex, arrValue) + File_indexiert = WINDREAM.RunIndexing(CURRENT_WMFILE, arrIndex, arrValue) Return File_indexiert End If diff --git a/app/DD_PM_WINDREAM/ClassPMWindream.vb b/app/DD_PM_WINDREAM/ClassPMWindream.vb index 6896043..45c6458 100644 --- a/app/DD_PM_WINDREAM/ClassPMWindream.vb +++ b/app/DD_PM_WINDREAM/ClassPMWindream.vb @@ -62,33 +62,33 @@ Public Class ClassPMWindream 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 + '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 MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler in GetValuesfromAuswahlliste:") diff --git a/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb b/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb index b91bd0e..159c927 100644 --- a/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb +++ b/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb @@ -131,7 +131,13 @@ Public Class ClassWindream_allgemein End Function Public Function Start_WMCC_andCo() Try - If WMSESSION_STARTSTOP_STARTUP = True Then + ' 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, MyConnectionString) + + If WMSESSION_STARTSTOP_STARTUP = True And userExistsInServerUserGroup Is Nothing Then ClassLogger.Add(">> WINDREAM-Start on ApplicationStart is active!", False) Dim owindreamControlCenter = CreateObject("Wmcc.ControlCenter") diff --git a/app/DD_PM_WINDREAM/ModuleRuntimeVariables.vb b/app/DD_PM_WINDREAM/ModuleRuntimeVariables.vb index 3e610c7..078a23f 100644 --- a/app/DD_PM_WINDREAM/ModuleRuntimeVariables.vb +++ b/app/DD_PM_WINDREAM/ModuleRuntimeVariables.vb @@ -63,4 +63,6 @@ Module ModuleRuntimeVariables Public CURRENT_CONTROL_ID As Integer Public errormessage As String + + Public WINDREAM As ClassPMWindream End Module diff --git a/app/DD_PM_WINDREAM/frmAdministration.vb b/app/DD_PM_WINDREAM/frmAdministration.vb index e518b7f..3894841 100644 --- a/app/DD_PM_WINDREAM/frmAdministration.vb +++ b/app/DD_PM_WINDREAM/frmAdministration.vb @@ -6,7 +6,7 @@ Imports DevExpress.XtraGrid Imports DevExpress.XtraGrid.Views.Grid Public Class frmAdministration - Private _windreamPM As ClassPMWindream + 'Private _windreamPM As ClassPMWindream Private email As New ClassEmail Public profile_guid As Integer = 0 Dim formloaded As Boolean @@ -58,9 +58,9 @@ Public Class frmAdministration Try ' Windream instanziieren - _windreamPM = New ClassPMWindream() + '_windreamPM = New ClassPMWindream() 'Windream initialisieren (Connection, Session, ... aufbauen) - _windreamPM.Create_Session() + '_windreamPM.Create_Session() Catch ex As Exception MsgBox("Fehler bei Initialisieren von windream: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:") End Try @@ -69,11 +69,11 @@ Public Class frmAdministration Try If cmbObjekttypen.Text <> String.Empty Then - Windream_Indicies = _windreamPM.GetIndicesByObjecttype(cmbObjekttypen.Text).ToList() + Windream_Indicies = WINDREAM.GetIndicesByObjecttype(cmbObjekttypen.Text).ToList() Windream_Indicies_Types = New List(Of Integer) For Each i In Windream_Indicies - Dim type = _windreamPM.GetTypeOfIndex(i) + Dim type = WINDREAM.GetTypeOfIndex(i) Windream_Indicies_Types.Add(type) Next End If @@ -86,13 +86,13 @@ Public Class frmAdministration Try Me.PM_VEKTOR_INDEXComboBox.Items.Clear() Me.cmbLOGIndex.Items.Clear() - Dim indexe = _windreamPM.GetIndicesByObjecttype(cmbObjekttypen.Text) + Dim indexe = WINDREAM.GetIndicesByObjecttype(cmbObjekttypen.Text) Me.PM_VEKTOR_INDEXComboBox.Items.Add("") Me.cmbLOGIndex.Items.Add("") If indexe IsNot Nothing Then For Each index As String In indexe Dim _vektorString As Boolean = False - Select Case _windreamPM.GetTypeOfIndex(index) + Select Case WINDREAM.GetTypeOfIndex(index) Case 4097 _vektorString = True Case 36865 @@ -151,7 +151,7 @@ Public Class frmAdministration Private Sub ObjekttypenEintragen() Me.cmbObjekttypen.Items.Clear() Try - Dim oDokumentTypen As WINDREAMLib.WMObjects = Me._windreamPM.GetObjecttypesAsObjects() + 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) @@ -748,11 +748,11 @@ Public Class frmAdministration End Sub Private Sub Button3_Click_1(sender As Object, e As EventArgs) - Dim indexe = _windreamPM.GetIndicesByObjecttype(cmbObjekttypen.Text) + Dim indexe = WINDREAM.GetIndicesByObjecttype(cmbObjekttypen.Text) If indexe IsNot Nothing Then For Each index As String In indexe - MsgBox(index & vbNewLine & _windreamPM.GetTypeOfIndex(index)) - Select Case _windreamPM.GetTypeOfIndex(index) + MsgBox(index & vbNewLine & WINDREAM.GetTypeOfIndex(index)) + Select Case WINDREAM.GetTypeOfIndex(index) Case 4107 'Vektor Zahl Case 4097 diff --git a/app/DD_PM_WINDREAM/frmMain.vb b/app/DD_PM_WINDREAM/frmMain.vb index 0dede4c..b963ab5 100644 --- a/app/DD_PM_WINDREAM/frmMain.vb +++ b/app/DD_PM_WINDREAM/frmMain.vb @@ -9,7 +9,7 @@ Imports DevExpress.XtraGrid.Columns Imports DevExpress.XtraCharts Public Class frmMain - Private _windreamPM As ClassPMWindream + 'Private _windreamPM As ClassPMWindream Private UserLoggedin As Integer = 0 Private PROFILE_COUNT As Integer = 0 Private CURR_DT_VWPM_PROFILE_ACTIVE As DataTable @@ -34,9 +34,12 @@ Public Class frmMain Catch ex As Exception ClassLogger.Add("Error in Save FormLayout: " & ex.Message) End Try - If _windreamPM.oSession.aLoggedin = True Then - _windreamPM.Stop_WMCC_andCo() + If WINDREAM.oSession.aLoggedin = True Then + WINDREAM.Stop_WMCC_andCo() End If + 'If _windreamPM.oSession.aLoggedin = True Then + ' _windreamPM.Stop_WMCC_andCo() + 'End If Try ClassAllgemeineFunktionen.LoginOut("LOGOUT") @@ -138,9 +141,12 @@ Public Class frmMain Check_Timer_Notification() Restore_Form_Position() Try - _windreamPM = New ClassPMWindream - _windreamPM.Start_WMCC_andCo() - If _windreamPM.oSession.aLoggedin = False Then + WINDREAM = New ClassPMWindream + WINDREAM.Start_WMCC_andCo() + + '_windreamPM = New ClassPMWindream + '_windreamPM.Start_WMCC_andCo() + If WINDREAM.oSession.aLoggedin = False Then MsgBox("Login on windream was not possible. Please check the log." & vbNewLine & "Application will close now!", MsgBoxStyle.Critical) Me.Close() End If @@ -929,8 +935,10 @@ Public Class frmMain Try '_windream = New ClassWindream_allgemein '_windream.Create_Session() - _windreamPM = New ClassPMWindream() - _windreamPM.Create_Session() + '_windreamPM = New ClassPMWindream() + '_windreamPM.Create_Session() + WINDREAM = New ClassPMWindream() + WINDREAM.Create_Session() If LogErrorsOnly = False Then ClassLogger.Add(" >> windream initialized", False) Return True diff --git a/app/DD_PM_WINDREAM/frmMassValidator.vb b/app/DD_PM_WINDREAM/frmMassValidator.vb index 2e43b98..d87d28b 100644 --- a/app/DD_PM_WINDREAM/frmMassValidator.vb +++ b/app/DD_PM_WINDREAM/frmMassValidator.vb @@ -19,7 +19,7 @@ Public Class frmMassValidator Private errmessage As String 'Private _windream As New ClassWindream_allgemein - Private _windreamPM As New ClassPMWindream + 'Private _windreamPM As New ClassPMWindream Private _allgFunk As New ClassAllgemeineFunktionen Dim viewer_string As String Dim pdfxchange As Boolean = False @@ -28,10 +28,12 @@ Public Class frmMassValidator 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() + '_windreamPM = New ClassPMWindream() + '_windreamPM.Create_Session() + If LogErrorsOnly = False Then ClassLogger.Add("windream initialized frmMassValidator", False) @@ -243,7 +245,7 @@ Public Class frmMassValidator Else If CURR_CHOICE_LIST <> "" Then If LogErrorsOnly = False Then ClassLogger.Add(" >> In add_ComboBox - AListe: " & CURR_CHOICE_LIST, False) - Dim liste = _windreamPM.GetValuesfromAuswahlliste(CURR_CHOICE_LIST) + Dim liste = WINDREAM.GetValuesfromAuswahlliste(CURR_CHOICE_LIST) If liste IsNot Nothing Then cmb.Items.Add("") For Each index As String In liste @@ -584,7 +586,7 @@ Public Class frmMassValidator For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows Dim WMDOC As WMObject Try - WMDOC = _windreamPM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2)) + WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2)) Catch ex As Exception ClassLogger.Add("error while creating WMObject in (textCheckIndex): " & ex.Message) Exit For @@ -920,7 +922,7 @@ Public Class frmMassValidator CURRENT_DOC_GUID = docrow.Item("DOC_GUID") Dim WMDOC As WMObject Try - WMDOC = _windreamPM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2)) + WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2)) Catch ex As Exception ClassLogger.Add("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message) Exit For @@ -1383,7 +1385,7 @@ Public Class frmMassValidator For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows Dim WMDOC As WMObject Try - WMDOC = _windreamPM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2)) + WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2)) Catch ex As Exception ClassLogger.Add("error while creating WMObject in (IndexMultipleFiles): " & ex.Message) _allfine = False @@ -1415,7 +1417,7 @@ Public Class frmMassValidator arrValue(0) = idxvalue(0).ToString End If 'Jetzt das eigentliche Indexieren der Datei - If Me._windreamPM.RunIndexing(WMDOC, arrIndex, arrValue) = False Then + If WINDREAM.RunIndexing(WMDOC, arrIndex, arrValue) = False Then _allfine = False Exit For End If @@ -1435,7 +1437,7 @@ Public Class frmMassValidator For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows Dim WMDOC As WMObject Try - WMDOC = _windreamPM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2)) + WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH").ToString.Substring(2)) Catch ex As Exception ClassLogger.Add("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message) _allfine = False @@ -1509,7 +1511,7 @@ Public Class frmMassValidator arrValue(0) = idxvalue(0).ToString End If 'Jetzt das eigentliche Indexieren der Datei - File_indexiert = Me._windreamPM.RunIndexing(_dok, arrIndex, arrValue) + File_indexiert = WINDREAM.RunIndexing(_dok, arrIndex, arrValue) Return File_indexiert End If diff --git a/app/DD_PM_WINDREAM/frmSQL_DESIGNER.vb b/app/DD_PM_WINDREAM/frmSQL_DESIGNER.vb index aee6993..d60c3ee 100644 --- a/app/DD_PM_WINDREAM/frmSQL_DESIGNER.vb +++ b/app/DD_PM_WINDREAM/frmSQL_DESIGNER.vb @@ -3,7 +3,7 @@ Imports Oracle.ManagedDataAccess.Client Imports DD_LIB_Standards Public Class frmSQL_DESIGNER - Private _windreamPM As ClassPMWindream + 'Private _windreamPM As ClassPMWindream Dim CurrentPosition As Integer = 0 Dim CurrentPlaceholders As New Placeholders() @@ -54,14 +54,14 @@ Public Class frmSQL_DESIGNER Try ' Windream instanziieren - _windreamPM = New ClassPMWindream() + '_windreamPM = New ClassPMWindream() 'Windream initialisieren (Connection, Session, ... aufbauen) - _windreamPM.Create_Session() + '_windreamPM.Create_Session() Catch ex As Exception MsgBox("Fehler bei Initialisieren von windream: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:") End Try cmbIndexe.Items.Clear() - Dim indexe = _windreamPM.GetIndicesByObjecttype(CURRENT_OBJECTTYPE) + Dim indexe = WINDREAM.GetIndicesByObjecttype(CURRENT_OBJECTTYPE) If indexe IsNot Nothing Then For Each index As String In indexe Me.cmbIndexe.Items.Add(index) diff --git a/app/DD_PM_WINDREAM/frmValidator.vb b/app/DD_PM_WINDREAM/frmValidator.vb index 19f7c09..89477cd 100644 --- a/app/DD_PM_WINDREAM/frmValidator.vb +++ b/app/DD_PM_WINDREAM/frmValidator.vb @@ -25,7 +25,7 @@ Public Class frmValidator Dim WD_Search As String Dim finalProfile As Boolean Dim Move2Folder As String - Private _windreamPM As New ClassPMWindream + 'Private _windreamPM As New ClassPMWindream 'Private _windream As New ClassWindream_allgemein Private allgFunk As New ClassAllgemeineFunktionen Dim aktivesDokument As WMObject @@ -264,9 +264,10 @@ Public Class frmValidator End Sub Private Function Init_windream() Try - _windreamPM = New ClassPMWindream() - _windreamPM.Create_Session() - + WINDREAM = New ClassPMWindream() + WINDREAM.Create_Session() + '_windreamPM = New ClassPMWindream() + '_windreamPM.Create_Session() '_windream = New ClassWindream_allgemein '_windream.Create_Session() If LogErrorsOnly = False Then ClassLogger.Add(" >> Windream initiiert", False) @@ -700,7 +701,8 @@ Public Class frmValidator Dim AListe As String = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetChoiceListName(ControlID) If LogErrorsOnly = False Then ClassLogger.Add(" >> In add_ComboBox - AListe: " & AListe, False) If AListe Is Nothing = False Then - Dim liste = _windreamPM.GetValuesfromAuswahlliste(AListe) + 'Dim liste = _windreamPM.GetValuesfromAuswahlliste(AListe) + Dim liste = WINDREAM.GetValuesfromAuswahlliste(AListe) If liste IsNot Nothing Then cmb.Items.Add("") For Each index As String In liste @@ -1334,7 +1336,8 @@ Public Class frmValidator ClassLogger.Add(">> Validierung für Dokument '" & Document_Path & "' gestartet", False) Try - aktivesDokument = _windreamPM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, Document_Path.Substring(2)) + 'aktivesDokument = _windreamPM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, Document_Path.Substring(2)) + aktivesDokument = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, Document_Path.Substring(2)) Catch ex As Exception allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Fehler bei Erzeugen windream-Objekt - DocGUID: " & CURRENT_DOC_GUID & " - ERROR: " & ex.Message, Environment.UserName) ClassLogger.Add("Fehler bei Erzeugen windream-Objekt in (LoadNextDokument): " & ex.Message) @@ -1343,7 +1346,8 @@ Public Class frmValidator 'Nochmaliger Versuch windream zu initialiseren If Init_windream() = True Then Try - aktivesDokument = _windreamPM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, Document_Path.Substring(2)) + 'aktivesDokument = _windreamPM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, Document_Path.Substring(2)) + aktivesDokument = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, Document_Path.Substring(2)) Catch ex1 As Exception ClassLogger.Add("Fehler bei 2. Versuch windream-Objekt: " & ex1.Message) errmessage = "1-Es besteht ein Problem beim Anmelden an windream - Bitte wenden Sie sich an Digital Data!" @@ -2815,7 +2819,8 @@ Public Class frmValidator arrValue(0) = idxvalue(0).ToString End If 'Jetzt das eigentliche Indexieren der Datei - File_indexiert = Me._windreamPM.RunIndexing(_dok, arrIndex, arrValue) + 'File_indexiert = Me._windreamPM.RunIndexing(_dok, arrIndex, arrValue) + File_indexiert = WINDREAM.RunIndexing(_dok, arrIndex, arrValue) If File_indexiert = False Then allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Fehler beim Indexieren der Datei: " & _dok.aName & " - ERROR: " & idxerr_message, Environment.UserName) End If From 3532742880efb3bc1aadea2e93addba7afbe98aa Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 5 Oct 2018 11:16:08 +0200 Subject: [PATCH 7/7] jj: Version 1.9.5.2 --- app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb b/app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb index 4b0533c..da6f68f 100644 --- a/app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb +++ b/app/DD_PM_WINDREAM/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - +