This commit is contained in:
SchreiberM
2016-10-25 14:32:55 +02:00
parent 11ec67a434
commit 7e9ca7611c
5 changed files with 1461 additions and 1005 deletions

View File

@@ -1,5 +1,6 @@
Imports System.IO Imports System.IO
Imports System.Globalization Imports System.Globalization
Imports WINDREAMLib
Public Class ClassImport_Windream Public Class ClassImport_Windream
Public Shared Function Import_File(QuellDatei_Path As String, DOCTYPE_ID As Integer) Public Shared Function Import_File(QuellDatei_Path As String, DOCTYPE_ID As Integer)
@@ -123,6 +124,10 @@ Public Class ClassImport_Windream
End Function End Function
Public Shared Function Name_Generieren(DocTypeID As Integer) Public Shared Function Name_Generieren(DocTypeID As Integer)
If ClassWindream.Create_Session = False Then
Return False
End If
Try Try
Dim FILE_DELIMITER, VERSION_DELIMITER, _WDOBJECTTYPE, _NewFileString As String Dim FILE_DELIMITER, VERSION_DELIMITER, _WDOBJECTTYPE, _NewFileString As String
Dim sql As String = "select VERSION_DELIMITER, FILE_DELIMITER FROM TBDD_MODULES where UPPER(NAME) = UPPER('Global-Indexer')" Dim sql As String = "select VERSION_DELIMITER, FILE_DELIMITER FROM TBDD_MODULES where UPPER(NAME) = UPPER('Global-Indexer')"
@@ -131,7 +136,6 @@ Public Class ClassImport_Windream
VERSION_DELIMITER = DT1.Rows(0).Item("VERSION_DELIMITER") VERSION_DELIMITER = DT1.Rows(0).Item("VERSION_DELIMITER")
Dim err As Boolean = False Dim err As Boolean = False
Dim folder_Created As Boolean = False
Dim Zielordner As String Dim Zielordner As String
Dim extension As String = Path.GetExtension(CURRENT_FILENAME) Dim extension As String = Path.GetExtension(CURRENT_FILENAME)
Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBDD_DOKUMENTART WHERE GUID = " & DocTypeID) Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBDD_DOKUMENTART WHERE GUID = " & DocTypeID)
@@ -139,41 +143,60 @@ Public Class ClassImport_Windream
'sql_history_Index_Values = "" 'sql_history_Index_Values = ""
Dim AnzahlIndexe As Integer = 1 Dim AnzahlIndexe As Integer = 1
_WDOBJECTTYPE = DT.Rows(0).Item("OBJEKTTYP") _WDOBJECTTYPE = DT.Rows(0).Item("OBJEKTTYP")
If folder_Created = False Then
' Den Zielordner erstellen
Zielordner = DT.Rows(0).Item("ZIEL_PFAD")
sql = "SELECT FOLDER_FOR_INDEX FROM TBDD_DOKUMENTART WHERE GUID = " & DocTypeID ' Den Zielordner erstellen
Dim Folder_for_index = ClassDatabase.Execute_Scalar(sql) Zielordner = DT.Rows(0).Item("ZIEL_PFAD")
If Not IsDBNull(Folder_for_index) Then
If Folder_for_index <> String.Empty Then sql = "SELECT FOLDER_FOR_INDEX FROM TBDD_DOKUMENTART WHERE GUID = " & DocTypeID
If CREATE_FOLDER_INDEX(Folder_for_index, DocTypeID) = True And CURRENT_VARIABLE_FOLDER <> "" Then Dim Folder_for_index = ClassDatabase.Execute_Scalar(sql)
Zielordner = Zielordner & "\" & CURRENT_VARIABLE_FOLDER If Not IsDBNull(Folder_for_index) Then
Else If Folder_for_index <> String.Empty Then
MsgBox("Unexpected Error in Creating Variable Folder - Check logfile!", MsgBoxStyle.Critical) If CREATE_FOLDER_INDEX(Folder_for_index, DocTypeID) = True And CURRENT_VARIABLE_FOLDER <> "" Then
Return False Zielordner = Zielordner & "\" & CURRENT_VARIABLE_FOLDER
End If Else
MsgBox("Unexpected Error in Creating Variable Folder - Check logfile!", MsgBoxStyle.Critical)
Return False
End If End If
End If End If
'Unterordner ja oder nein
If CURRENT_CHECK_SUBFOLDER = True And CURRENT_SUBFOLDER <> "" Then
Zielordner = Zielordner & "\" & CURRENT_SUBFOLDER
End If
If Directory.Exists(Zielordner) = False Then
'Try to create the directory.
Try
Directory.CreateDirectory(Zielordner)
Catch ex As Exception
ClassLogger.Add(" - Unexpected Error in Creating Target Folder: " & vbNewLine & ex.Message)
MsgBox("Unexpected Error in Creating Target Folder: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
Return False
End Try
End If
folder_Created = True
End If End If
'Unterordner ja oder nein
If CURRENT_CHECK_SUBFOLDER = True And CURRENT_SUBFOLDER <> "" Then
Zielordner = Zielordner & "\" & CURRENT_SUBFOLDER
End If
Try
Select Case ClassWindream.WD_PATH_EXISTS(Zielordner.Substring(2))
Case False
Dim split() As String = Zielordner.Split("\")
Dim Path_Combined As String = ""
For Each s As String In split
Path_Combined &= s & "\"
If Path_Combined <> "W:\" Then
Try
Select Case ClassWindream.WD_PATH_EXISTS(Path_Combined.Substring(2))
Case False
ClassWindream.oSession.GetNewWMObjectFS(2, Path_Combined.Substring(2), 0) 'WMEntityFolder,WMObjectEditModeNoEdit)
Case -10
Return False
End Select
Catch ex As Exception
If Not ex.Message.Contains("Filename exists!") Then
ClassLogger.Add(String.Format(">> Could not create folder-part ({0}): " & ex.Message, Path_Combined.Substring(2)), True)
Return False
End If
End Try
End If
Next
Case -10
Return False
End Select
Catch ex As Exception
If Not ex.Message.Contains("Filename exists!") Then
ClassLogger.Add(String.Format(">> Could not create folder ({0}): " & ex.Message, Zielordner.Substring(2)), False)
Return False
End If
End Try
'#### '####
' Regulären Ausdruck zum Auslesen der Indexe definieren ' Regulären Ausdruck zum Auslesen der Indexe definieren
Dim preg As String = "\[%{1}[a-zA-Z0-9\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}" Dim preg As String = "\[%{1}[a-zA-Z0-9\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}"
@@ -409,34 +432,68 @@ Public Class ClassImport_Windream
Dim _neuername As String = DATEINAME.Replace(VERSION_DELIMITER, "") Dim _neuername As String = DATEINAME.Replace(VERSION_DELIMITER, "")
'Dim MoveFilename As String = DATEINAME.Replace(element.Value, "") 'Dim MoveFilename As String = DATEINAME.Replace(element.Value, "")
_NewFileString = _neuername _NewFileString = _neuername
'Überprüfen ob File existiert Const WMCOMEventWMSessionNeedIndex = 1
If File.Exists(_neuername & extension) = False Then 'windream Objekte erstellen ohne Indexierungs-Event
If LogErrorsOnly = False Then ClassLogger.Add(" >> File is not existing", False) ClassWindream.oSession.SwitchEvents(WMCOMEventWMSessionNeedIndex, False)
'Überprüfen ob File existiert
Dim FILE_EXISTS_IN_WD As Boolean
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch auf die Datei in W: zuzugreifen und zu sperren...", False)
FILE_EXISTS_IN_WD = ClassWindream.oSession.WMObjectExists(WINDREAMLib.WMEntity.WMEntityDocument, _NewFileString.Substring(2) & extension, 0, 0)
Dim WMObject
If FILE_EXISTS_IN_WD = False Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> Datei ist NICHT vorhanden, kann also einfach neu angelegt werden", False)
'==================================================================
' create an object
'==================================================================
Try
WMObject = ClassWindream.oSession.GetNewWMObjectFS(WINDREAMLib.WMEntity.WMEntityDocument, _NewFileString.Substring(2) & extension, 31)
Catch ex As Exception
ClassLogger.Add("Could not create the windremObject(File) '" & _NewFileString.Substring(2) & extension & "': " & ex.Message, True)
Return False
End Try
Else Else
Dim msg As String ' wenn auf die Datei zugeriffen werden konnte ist sie bereits vorhanden -> Datum anhängen
msg = "Achtung: die Datei existiert bereits!" & vbNewLine & _neuername & extension & vbNewLine & "Wollen Sie die vorhandene Datei ersetzen?" If LogErrorsOnly = False Then ClassLogger.Add(" >> Es konnte zugegriffen werden -> DATEI IST BEREITS VORHANDEN", False)
If USER_LANGUAGE <> "de-DE" Then
msg = "Attention: there is already a file with this name!" & vbNewLine & _neuername & extension & vbNewLine & "Would You like to replace this file with the actual one?" Do While FILE_EXISTS_IN_WD = True
End If If LogErrorsOnly = False Then ClassLogger.Add(" >> Attention File '" & _neuername & extension & "' is existing!", False)
Dim result As MsgBoxResult _neuername = Stammname & VERSION_DELIMITER & version
result = MessageBox.Show(msg, "Confirmation needed:", MessageBoxButtons.YesNo, MessageBoxIcon.Question) _NewFileString = _neuername
If result = MsgBoxResult.Yes Then FILE_EXISTS_IN_WD = ClassWindream.oSession.WMObjectExists(WINDREAMLib.WMEntity.WMEntityDocument, _NewFileString.Substring(2) & extension, 0, 0)
Try version = version + 1
File.Delete(_neuername & extension) Loop
Catch ex As Exception Try
MsgBox("Unexpected Error in Replace file: " & ex.Message, MsgBoxStyle.Critical) WMObject = ClassWindream.oSession.GetNewWMObjectFS(WINDREAMLib.WMEntity.WMEntityDocument, _NewFileString.Substring(2) & extension, 31)
err = True Catch ex As Exception
End Try ClassLogger.Add("Could not create the windremObject(File) COPY '" & _NewFileString.Substring(2) & extension & "': " & ex.Message, True)
Else Return False
Do While File.Exists(_neuername & extension) End Try
If LogErrorsOnly = False Then ClassLogger.Add(" >> Attention File '" & _neuername & extension & "' is existing!", False) If LogErrorsOnly = False Then ClassLogger.Add(" >> WMObject created after versioning", False)
version = version + 1
_neuername = Stammname & VERSION_DELIMITER & version
_NewFileString = _neuername
Loop
End If
End If End If
ClassWindream.STREAM_OBJECT = Nothing
ClassWindream.STREAM_OBJECT = WMObject
'If File.Exists(_neuername & extension) = False Then
' If LogErrorsOnly = False Then ClassLogger.Add(" >> File is not existing", False)
'Else
' Dim msg As String
' msg = "Achtung: die Datei existiert bereits!" & vbNewLine & _neuername & extension & vbNewLine & "Wollen Sie die vorhandene Datei ersetzen?"
' If USER_LANGUAGE <> "de-DE" Then
' msg = "Attention: there is already a file with this name!" & vbNewLine & _neuername & extension & vbNewLine & "Would You like to replace this file with the actual one?"
' End If
' Dim result As MsgBoxResult
' result = MessageBox.Show(msg, "Confirmation needed:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
' If result = MsgBoxResult.Yes Then
' Try
' File.Delete(_neuername & extension)
' Catch ex As Exception
' MsgBox("Unexpected Error in Replace file: " & ex.Message, MsgBoxStyle.Critical)
' err = True
' End Try
' Else
' End If
'End If
Catch ex As Exception Catch ex As Exception
ClassLogger.Add(" - Error in Versioning file - Error: " & vbNewLine & ex.Message) ClassLogger.Add(" - Error in Versioning file - Error: " & vbNewLine & ex.Message)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in Versioning file:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in Versioning file:")

View File

@@ -34,6 +34,18 @@ Public Class ClassWindream
Const WMObjectVariableValueTypeVector = &H1000 Const WMObjectVariableValueTypeVector = &H1000
Const WMObjectVariableValueTypeFulltext = &H2000 Const WMObjectVariableValueTypeFulltext = &H2000
Const WMObjectVariableValueTypeDefaultValue = &H4000 Const WMObjectVariableValueTypeDefaultValue = &H4000
Const REL_Document_AccessRight = "AccessRight"
Const COL_AccessRight_AccessRightID = "dwAccessRightID"
Const COL_AccessRight_AccessRight = "dwAccessRight"
Const REL_AccessRight_UserOrGroup = "AccessRightUserOrGroup"
Const WMAccessRightUndefined = 0
Const WMAccessRightRead = 1
Const WMAccessRightWrite = 2
Const WMAccessRightAdmin = 4
Const WMAccessRightAllRights = 7
#End Region #End Region
#Region "+++++ Variablen +++++" #Region "+++++ Variablen +++++"
@@ -45,8 +57,10 @@ Public Class ClassWindream
Private Shared oController As New WMOSearchController Private Shared oController As New WMOSearchController
Public Shared _WDObjekttyp As String Public Shared _WDObjekttyp As String
Private Shared aktWMObject As WINDREAMLib.WMObject Private Shared aktWMObject As WINDREAMLib.WMObject
Public Shared STREAM_OBJECT As WINDREAMLib.WMObject
Public Shared WD_SERVER Public Shared WD_SERVER
Public Shared CURRENT_WMObject As WMObject Public Shared CURRENT_WMObject As WMObject
Private Shared dwAccessRight
#End Region #End Region
@@ -590,102 +604,130 @@ Public Class ClassWindream
End Try End Try
End Function End Function
Public Shared Function Stream_File(ByVal filenameQuelle As String, ByVal zielpfad As String, Optional ImportAll As Boolean = False) Public Shared Function Create_Session()
Try Try
aktWMObject = Nothing Dim Session
If My.Computer.FileSystem.DirectoryExists(zielpfad) = False Then Dim dmsServer As String
My.Computer.FileSystem.CreateDirectory(zielpfad) Dim wmbrwsr
ClassLogger.Add(">> Zielverzeichnis neu erzeugt!", False) Dim Connect
End If
Const STREAM_BinaryObject = "BinaryObject"
If LogErrorsOnly = False Then ClassLogger.Add(" >> Stream_File wurde gestartet", False) If LogErrorsOnly = False Then ClassLogger.Add(" >> Stream_File wurde gestartet", False)
Dim endgültigerDateiname As String = "" wmbrwsr = CreateObject("WMOBrws.ServerBrowser")
' Objekt für Datei und Zielverzeichnis anlegen '==================================================================
' Dim Quelldatei_Name As String = Path.GetFileName(filenameQuelle) ' get the current DMS-server to log in
'==================================================================
If LogErrorsOnly = False Then ClassLogger.Add(" >> Quelldatei gelesen", False) dmsServer = wmbrwsr.GetCurrentServer
If LogErrorsOnly = False Then ClassLogger.Add(" >> Connect definieren: CreateObject('Windream.WMConnect')", False)
'######## Try
Dim Zielverzeichnis As String = zielpfad
endgültigerDateiname = CURRENT_NEWFILENAME.Substring(2)
If My.Computer.FileSystem.DirectoryExists(Zielverzeichnis) Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> targetPath exisitiert", False)
' Überprüfen ob der zu Kopieren notwendige Speicherplatz auf Ziellaufwerk vorhanden ist
Dim dvr As New DriveInfo(vWLaufwerk & ":")
Dim freeSpace = dvr.TotalFreeSpace
Dim info As New FileInfo(filenameQuelle)
' Get length of the file.
Dim length As Long = info.Length
If freeSpace < length Then
MsgBox(" Auf dem Zielverzeichnis ist nicht genug Speicherplatz zum Übertragen frei.", MsgBoxStyle.Exclamation, "Nicht genug Speicherplatz")
Return -10
End If
If LogErrorsOnly = False Then ClassLogger.Add(" >> Datei kopieren von " & filenameQuelle & " nach " & endgültigerDateiname & ".", False)
Dim Connect
Dim Session
Dim WMObject
Dim aFileIO
Dim aWMStream
Dim wmbrwsr
Dim dmsServer As String
If LogErrorsOnly = False Then ClassLogger.Add(" >> Connect definieren: CreateObject('Windream.WMConnect')", False)
Connect = CreateObject("Windream.WMConnect") Connect = CreateObject("Windream.WMConnect")
aFileIO = New WMOTOOLLib.WMFileIO Catch ex As Exception
'If My.Settings.DLL_WMOTOOL = "" Then ClassLogger.Add("Error in Create windreamConnect: " & ex.Message, True)
' aFileIO = New WMOTOOLLib.WMFileIO Return False
' If LogErrorsOnly = False Then ClassLogger.Add(" >> Direkter Verweis auf New WMOTOOLLib.WMFileIO", False) End Try
'Else
' aFileIO = CreateObject(My.Settings.DLL_WMOTOOL) 'WMOTool.WMFileIO oder WMOTOOLLib.WMFileIO
' If LogErrorsOnly = False Then ClassLogger.Add(" >> Verwendeter Verweis aus Anwendungsstring: '" & My.Settings.DLL_WMOTOOL & "'", False)
'End If
wmbrwsr = CreateObject("WMOBrws.ServerBrowser") '==================================================================
'================================================================== ' create a session
' get the current DMS-server to log in '==================================================================
'================================================================== 'Prüfen ob sich personifiziert angemeldet werden muss?
dmsServer = wmbrwsr.GetCurrentServer Try
'==================================================================
' create a session
'==================================================================
'Prüfen ob sich personifiziert angemeldet werden muss?
If FAU_AD_USER <> "" Then If FAU_AD_USER <> "" Then
Session = GetWMSessionAsUser(FAU_AD_DOMAIN, FAU_AD_SERVER, FAU_AD_USER, FAU_AD_USER_PW) Session = GetWMSessionAsUser(FAU_AD_DOMAIN, FAU_AD_SERVER, FAU_AD_USER, FAU_AD_USER_PW)
Else Else
Session = CreateObject("Windream.WMSession", dmsServer) Session = CreateObject("Windream.WMSession", dmsServer)
End If End If
'================================================================== Catch ex As Exception
' login session ClassLogger.Add("Error in Create windream Session: " & ex.Message, True)
'================================================================== Return False
Try End Try
Connect.LoginSession(Session)
Dim LoggedIn = Session.aLoggedin
If LoggedIn Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> Login ok. You are logged in as '" & Connect.UserName & "' on Server '" & dmsServer, False)
'MsgBox("Login ok. You are logged in as '" + Connect.UserName + "' on Server '" + dmsServer + "'")
Else
ClassLogger.Add(">> Login on dms-Server failed", False)
' MsgBox("Login failed. ")
End If
Catch ex As Exception
ClassLogger.Add(">> Persionalized session - User is already logged in!'" & Err.Description & "'")
End Try
Const WMCOMEventWMSessionNeedIndex = 1
'windream Objekte erstellen ohne Indexierungs-Event '==================================================================
Session.SwitchEvents(WMCOMEventWMSessionNeedIndex, False) ' login session
oSession = Session '==================================================================
'================================================================== Try
' check if files exist Connect.LoginSession(Session)
'================================================================== Dim LoggedIn = Session.aLoggedin
If LoggedIn Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> Login ok. You are logged in as '" & Connect.UserName & "' on Server '" & dmsServer, False)
oSession = Session
Return True
'MsgBox("Login ok. You are logged in as '" + Connect.UserName + "' on Server '" + dmsServer + "'")
Else
ClassLogger.Add(">> Login on dms-Server failed", False)
Return False
' MsgBox("Login failed. ")
End If
Catch ex As Exception
ClassLogger.Add(">> Persionalized session - User is already logged in!'" & Err.Description & "'")
If Not IsNothing(oSession) Then
Return True
End If
End Try
Catch ex As Exception
ClassLogger.Add("Unexpected Error in Create Session: " & ex.Message, True)
Return False
End Try
End Function
Public Shared Function Stream_File(ByVal filenameQuelle As String, ByVal zielpfad As String, Optional ImportAll As Boolean = False)
Try
aktWMObject = Nothing
If LogErrorsOnly = False Then ClassLogger.Add(" >> Stream_File wurde gestartet", False)
If IsNothing(oSession) Then
If Create_Session() = False Then
Return False
End If
End If
Dim sdsd = WMEntityFolder
Const STREAM_BinaryObject = "BinaryObject"
Dim endgültigerDateiname As String = ""
' Objekt für Datei und Zielverzeichnis anlegen
' Dim Quelldatei_Name As String = Path.GetFileName(filenameQuelle)
'########
Dim Zielverzeichnis As String = zielpfad
endgültigerDateiname = CURRENT_NEWFILENAME.Substring(2)
'' Überprüfen ob der zu Kopieren notwendige Speicherplatz auf Ziellaufwerk vorhanden ist
'Dim dvr As New DriveInfo(vWLaufwerk & ":")
'Dim freeSpace = dvr.TotalFreeSpace
'Dim info As New FileInfo(filenameQuelle)
'' Get length of the file.
Dim length As Long '= info.Length
'If freeSpace < length Then
' MsgBox(" Auf dem Zielverzeichnis ist nicht genug Speicherplatz zum Übertragen frei.", MsgBoxStyle.Exclamation, "Nicht genug Speicherplatz")
' Return -10
'End If
If LogErrorsOnly = False Then ClassLogger.Add(" >> Datei kopieren von " & filenameQuelle & " nach " & endgültigerDateiname & ".", False)
Dim WMObject
Dim aFileIO
Dim aWMStream
aFileIO = New WMOTOOLLib.WMFileIO
'If My.Settings.DLL_WMOTOOL = "" Then
' aFileIO = New WMOTOOLLib.WMFileIO
' If LogErrorsOnly = False Then ClassLogger.Add(" >> Direkter Verweis auf New WMOTOOLLib.WMFileIO", False)
'Else
' aFileIO = CreateObject(My.Settings.DLL_WMOTOOL) 'WMOTool.WMFileIO oder WMOTOOLLib.WMFileIO
' If LogErrorsOnly = False Then ClassLogger.Add(" >> Verwendeter Verweis aus Anwendungsstring: '" & My.Settings.DLL_WMOTOOL & "'", False)
'End If
'==================================================================
' check if files exist
'==================================================================
If Not IsNothing(STREAM_OBJECT) Then
WMObject = STREAM_OBJECT
Else
If LogErrorsOnly = False Then ClassLogger.Add(" >> ÜBERPRÜFTER DATEINAME => " & endgültigerDateiname, False) If LogErrorsOnly = False Then ClassLogger.Add(" >> ÜBERPRÜFTER DATEINAME => " & endgültigerDateiname, False)
Dim wdFilexists As Boolean Dim wdFilexists As Boolean
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch auf die Datei in W: zuzugreifen und zu sperren...", False) If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch auf die Datei in W: zuzugreifen und zu sperren...", False)
wdFilexists = Session.WMObjectExists(WMEntityDocument, endgültigerDateiname, 0, 0) wdFilexists = oSession.WMObjectExists(WMEntityDocument, endgültigerDateiname, 0, 0)
If wdFilexists = False Then If wdFilexists = False Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> Datei ist NICHT vorhanden, kann also einfach neu angelegt werden", False) If LogErrorsOnly = False Then ClassLogger.Add(" >> Datei ist NICHT vorhanden, kann also einfach neu angelegt werden", False)
@@ -693,7 +735,7 @@ Public Class ClassWindream
'================================================================== '==================================================================
' create an object ' create an object
'================================================================== '==================================================================
WMObject = Session.GetNewWMObjectFS(WMEntityDocument, endgültigerDateiname, WMObjectEditModeObject) WMObject = oSession.GetNewWMObjectFS(WMEntityDocument, endgültigerDateiname, WMObjectEditModeObject)
If Err.Number > 0 Then If Err.Number > 0 Then
ClassLogger.Add(" FEHLER: WMObject konnte nicht erzeugt werden - Error: '" & Err.Description & "'") ClassLogger.Add(" FEHLER: WMObject konnte nicht erzeugt werden - Error: '" & Err.Description & "'")
'MsgBox(Err.Description) 'MsgBox(Err.Description)
@@ -704,142 +746,140 @@ Public Class ClassWindream
If LogErrorsOnly = False Then ClassLogger.Add(" >> Es konnte zugegriffen werden -> DATEI IST BEREITS VORHANDEN", False) If LogErrorsOnly = False Then ClassLogger.Add(" >> Es konnte zugegriffen werden -> DATEI IST BEREITS VORHANDEN", False)
Err.Clear() Err.Clear()
WMObject = Session.GetNewWMObjectFS(WMEntityDocument, endgültigerDateiname, WMObjectEditModeObject) WMObject = oSession.GetNewWMObjectFS(WMEntityDocument, endgültigerDateiname, WMObjectEditModeObject)
If Err.Number > 0 Then If Err.Number > 0 Then
ClassLogger.Add(" FEHLER: Neues WMObject (Kopie) konnte nicht erzeugt werden - Error: '" & Err.Description & "'") ClassLogger.Add(" FEHLER: Neues WMObject (Kopie) konnte nicht erzeugt werden - Error: '" & Err.Description & "'")
'MsgBox(Err.Description) 'MsgBox(Err.Description)
End If End If
If LogErrorsOnly = False Then ClassLogger.Add(" >> WMObject zugewiesen", False) If LogErrorsOnly = False Then ClassLogger.Add(" >> WMObject zugewiesen", False)
End If End If
If LogErrorsOnly = False Then ClassLogger.Add(" >> ENDGÜLTIGER DATEINAME => " & endgültigerDateiname, False) End If
If WMObject IsNot Nothing Then
' lock object for file system access (to change the file itself) If LogErrorsOnly = False Then ClassLogger.Add(" >> ENDGÜLTIGER DATEINAME => " & endgültigerDateiname, False)
WMObject.lock() If WMObject IsNot Nothing Then
' set fileIO the local source file ' lock object for file system access (to change the file itself)
aFileIO.bstrOriginalFileName = filenameQuelle WMObject.lock()
If Err.Number > 0 Then ' set fileIO the local source file
'MsgBox(Err.Number.ToString) aFileIO.bstrOriginalFileName = filenameQuelle
ClassLogger.Add(" FEHLER: fileIO konnte nicht gesetzt werden - Datei wird wieder gelöscht - Error: '" & Err.Description & "'") If Err.Number > 0 Then
ClassLogger.Add(" HINWEIS: Überprüfen Sie den Verweis auf die Bibliotheken 'WMOTool.WMFileIO' UND 'WMOTOOLLib.WMFileIO' und ändern diese in den Anwendungseinstellungen (DLL_WMOTOOL)'", False) 'MsgBox(Err.Number.ToString)
WMObject.Unlock() ClassLogger.Add(" FEHLER: fileIO konnte nicht gesetzt werden - Datei wird wieder gelöscht - Error: '" & Err.Description & "'")
System.IO.File.Delete(vWLaufwerk & ":\" & endgültigerDateiname) ClassLogger.Add(" HINWEIS: Überprüfen Sie den Verweis auf die Bibliotheken 'WMOTool.WMFileIO' UND 'WMOTOOLLib.WMFileIO' und ändern diese in den Anwendungseinstellungen (DLL_WMOTOOL)'", False)
Return False WMObject.Unlock()
' MsgBox(Err.Description) System.IO.File.Delete(vWLaufwerk & ":\" & endgültigerDateiname)
End If
' open the windream object's file stream for writing
aWMStream = WMObject.OpenStream(STREAM_BinaryObject, WMObjectStreamOpenModeReadWrite)
If Err.Number > 0 Then
ClassLogger.Add(" FEHLER bei OpenStream - Datei wird wieder gelöscht - Error: '" & Err.Description & "'")
WMObject.Unlock()
System.IO.File.Delete(vWLaufwerk & ":\" & endgültigerDateiname)
Return False
'MsgBox(Err.Description)
End If
If LogErrorsOnly = False Then ClassLogger.Add(" >> oWMStream erzeugt", False)
' give fileIO helper object the windream stream
aFileIO.aWMStream = aWMStream
If Err.Number > 0 Then
ClassLogger.Add(" FEHLER bei Zuweisen aWMStream zu aFileIO - Datei wird wieder gelöscht - Error: '" & Err.Description & "'")
WMObject.Unlock()
System.IO.File.Delete(vWLaufwerk & ":\" & endgültigerDateiname)
Return False
'MsgBox(Err.Description)
End If
' let fileIO object import the original file into windream
aFileIO.ImportOriginal(True)
If Err.Number > 0 Then
ClassLogger.Add(" FEHLER bei FileIO.ImportOriginal(True) - Datei wird wieder gelöscht - Error: '" & Err.Description & "'")
WMObject.Unlock()
System.IO.File.Delete(vWLaufwerk & ":\" & endgültigerDateiname)
Return False
' MsgBox(Err.Description)
End If
If LogErrorsOnly = False Then ClassLogger.Add(" >> Inhalt der Datei konnte übertragen werden", False)
' close the windream file stream
aWMStream.Close()
If Err.Number > 0 Then
ClassLogger.Add(" FEHLER bei aWMStream.Close() - Datei wird wieder gelöscht - Error: '" & Err.Description & "'")
WMObject.Unlock()
System.IO.File.Delete(vWLaufwerk & ":\" & endgültigerDateiname)
Return False
'MsgBox(Err.Description)
End If
' save new windream object
WMObject.save()
If Err.Number > 0 Then
ClassLogger.Add(" FEHLER bei WMObject.save - Datei wird wieder gelöscht - Error: '" & Err.Description & "'")
WMObject.Unlock()
System.IO.File.Delete(vWLaufwerk & ":\" & endgültigerDateiname)
Return Err.Number
'MsgBox(Err.Description)
End If
If LogErrorsOnly = False Then ClassLogger.Add(" >> Datei konnte gespeichert werden", False)
' unlock the windream object
WMObject.unlock()
If Err.Number > 0 Then
ClassLogger.Add(" FEHLER bei WMObject.unlock - Datei wird wieder gelöscht - Error: '" & Err.Description & "'")
WMObject.Unlock()
System.IO.File.Delete(vWLaufwerk & ":\" & endgültigerDateiname)
Return False
'MsgBox(Err.Description)
End If
'DATEI GRÖSSE ERMITTELN - MANCHMAL KOMMT ES VOR DAS DATEIGRÖße 0 ist
Dim info2 As New FileInfo(vWLaufwerk & ":\" & endgültigerDateiname)
Dim length1 As Long = info2.Length
If length1 > 0 And Err.Number = 0 Then
If endgültigerDateiname.StartsWith("\") Then
If endgültigerDateiname.StartsWith("\\") Then
endgültigerDateiname = endgültigerDateiname.Replace("\\", "\")
Else
endgültigerDateiname = endgültigerDateiname
End If
Else
endgültigerDateiname = "\" & endgültigerDateiname
End If
CURRENT_FILEIN_WD = vWLaufwerk & ":" & endgültigerDateiname
CURRENT_FILEIN_WD = CURRENT_FILEIN_WD.Replace("\\", "\")
ClassLogger.Add(">> File '" & CURRENT_FILEIN_WD & "' was imported.", False)
aktWMObject = WMObject
Return True
Else
If length = 0 Then
If ImportAll = False Then
System.IO.File.Delete(vWLaufwerk & ":\" & endgültigerDateiname)
ClassLogger.Add(" Error in Stream File - FileLength = 0, File " & CURRENT_FILEIN_WD & " was deleted")
Return False
Else
If endgültigerDateiname.StartsWith("\") Then
If endgültigerDateiname.StartsWith("\\") Then
endgültigerDateiname = endgültigerDateiname.Replace("\\", "\")
Else
endgültigerDateiname = endgültigerDateiname
End If
Else
endgültigerDateiname = "\" & endgültigerDateiname
End If
ClassLogger.Add(">> ATTENTION in Stream File - FileLength = 0, File " & CURRENT_FILEIN_WD & " will be imported")
CURRENT_FILEIN_WD = vWLaufwerk & ":" & endgültigerDateiname
CURRENT_FILEIN_WD = CURRENT_FILEIN_WD.Replace("\\", "\")
'###
ClassLogger.Add(">> File '" & CURRENT_FILEIN_WD & "' was imported.", False)
aktWMObject = WMObject
Return True
End If
Else
ClassLogger.Add("Error in Stream File - Error <> 0")
Return False
End If
End If
Else
Return False Return False
' MsgBox(Err.Description)
End If
' open the windream object's file stream for writing
aWMStream = WMObject.OpenStream(STREAM_BinaryObject, WMObjectStreamOpenModeReadWrite)
If Err.Number > 0 Then
ClassLogger.Add(" FEHLER bei OpenStream - Datei wird wieder gelöscht - Error: '" & Err.Description & "'")
WMObject.Unlock()
System.IO.File.Delete(vWLaufwerk & ":\" & endgültigerDateiname)
Return False
'MsgBox(Err.Description)
End If
If LogErrorsOnly = False Then ClassLogger.Add(" >> oWMStream erzeugt", False)
' give fileIO helper object the windream stream
aFileIO.aWMStream = aWMStream
If Err.Number > 0 Then
ClassLogger.Add(" FEHLER bei Zuweisen aWMStream zu aFileIO - Datei wird wieder gelöscht - Error: '" & Err.Description & "'")
WMObject.Unlock()
System.IO.File.Delete(vWLaufwerk & ":\" & endgültigerDateiname)
Return False
'MsgBox(Err.Description)
End If
' let fileIO object import the original file into windream
aFileIO.ImportOriginal(True)
If Err.Number > 0 Then
ClassLogger.Add(" FEHLER bei FileIO.ImportOriginal(True) - Datei wird wieder gelöscht - Error: '" & Err.Description & "'")
WMObject.Unlock()
System.IO.File.Delete(vWLaufwerk & ":\" & endgültigerDateiname)
Return False
' MsgBox(Err.Description)
End If
If LogErrorsOnly = False Then ClassLogger.Add(" >> Inhalt der Datei konnte übertragen werden", False)
' close the windream file stream
aWMStream.Close()
If Err.Number > 0 Then
ClassLogger.Add(" FEHLER bei aWMStream.Close() - Datei wird wieder gelöscht - Error: '" & Err.Description & "'")
WMObject.Unlock()
System.IO.File.Delete(vWLaufwerk & ":\" & endgültigerDateiname)
Return False
'MsgBox(Err.Description)
End If
' save new windream object
WMObject.save()
If Err.Number > 0 Then
ClassLogger.Add(" FEHLER bei WMObject.save - Datei wird wieder gelöscht - Error: '" & Err.Description & "'")
WMObject.Unlock()
System.IO.File.Delete(vWLaufwerk & ":\" & endgültigerDateiname)
Return Err.Number
'MsgBox(Err.Description)
End If
If LogErrorsOnly = False Then ClassLogger.Add(" >> Datei konnte gespeichert werden", False)
' unlock the windream object
WMObject.unlock()
If Err.Number > 0 Then
ClassLogger.Add(" FEHLER bei WMObject.unlock - Datei wird wieder gelöscht - Error: '" & Err.Description & "'")
WMObject.Unlock()
System.IO.File.Delete(vWLaufwerk & ":\" & endgültigerDateiname)
Return False
'MsgBox(Err.Description)
End If
'DATEI GRÖSSE ERMITTELN - MANCHMAL KOMMT ES VOR DAS DATEIGRÖße 0 ist
Dim info2 As New FileInfo(vWLaufwerk & ":\" & endgültigerDateiname)
Dim length1 As Long = info2.Length
If length1 > 0 And Err.Number = 0 Then
If endgültigerDateiname.StartsWith("\") Then
If endgültigerDateiname.StartsWith("\\") Then
endgültigerDateiname = endgültigerDateiname.Replace("\\", "\")
Else
endgültigerDateiname = endgültigerDateiname
End If
Else
endgültigerDateiname = "\" & endgültigerDateiname
End If
CURRENT_FILEIN_WD = vWLaufwerk & ":" & endgültigerDateiname
CURRENT_FILEIN_WD = CURRENT_FILEIN_WD.Replace("\\", "\")
ClassLogger.Add(">> File '" & CURRENT_FILEIN_WD & "' was imported.", False)
aktWMObject = WMObject
Return True
Else
If length = 0 Then
If ImportAll = False Then
System.IO.File.Delete(vWLaufwerk & ":\" & endgültigerDateiname)
ClassLogger.Add(" Error in Stream File - FileLength = 0, File " & CURRENT_FILEIN_WD & " was deleted")
Return False
Else
If endgültigerDateiname.StartsWith("\") Then
If endgültigerDateiname.StartsWith("\\") Then
endgültigerDateiname = endgültigerDateiname.Replace("\\", "\")
Else
endgültigerDateiname = endgültigerDateiname
End If
Else
endgültigerDateiname = "\" & endgültigerDateiname
End If
ClassLogger.Add(">> ATTENTION in Stream File - FileLength = 0, File " & CURRENT_FILEIN_WD & " will be imported")
CURRENT_FILEIN_WD = vWLaufwerk & ":" & endgültigerDateiname
CURRENT_FILEIN_WD = CURRENT_FILEIN_WD.Replace("\\", "\")
'###
ClassLogger.Add(">> File '" & CURRENT_FILEIN_WD & "' was imported.", False)
aktWMObject = WMObject
Return True
End If
Else
ClassLogger.Add("Error in Stream File - Error <> 0")
Return False
End If
End If End If
Else Else
If LogErrorsOnly = False Then ClassLogger.Add(" >> targetPath exisitiert NICHT", False)
Return False Return False
End If End If
Catch ex As Exception Catch ex As Exception
@@ -848,6 +888,15 @@ Public Class ClassWindream
End Try End Try
End Function
Public Shared Function WD_PATH_EXISTS(substring_path As String)
Try
Dim folder_exists = oSession.WMObjectExists(WMEntityFolder, substring_path, 0, 0)
Return folder_exists
Catch ex As Exception
ClassLogger.Add(String.Format("Unexpected error in WD_PATH_EXISTS ({0}): {1} ", substring_path, ex.Message), True)
Return -10
End Try
End Function End Function
Public Shared Function Delete_WDFile(ByVal WD_File As String) Public Shared Function Delete_WDFile(ByVal WD_File As String)
Try Try
@@ -2092,4 +2141,42 @@ Public Class ClassWindream
End Try End Try
End Function End Function
Public Shared Function Get_File_Rights(filepath As String)
Try
If IsNothing(oSession) Then
If Init() = False Then
MsgBox("Error in Init windream - check the log for further information!", MsgBoxStyle.Exclamation)
Return Nothing
End If
End If
Dim oWMObject As WINDREAMLib.WMObject
oWMObject = oSession.GetWMObjectByPath(WMEntityDocumentAndMap, filepath.Substring(2))
Dim AccessRightsObject
AccessRightsObject = oWMObject.GetWMObjectRelationByName(REL_Document_AccessRight)
Dim _msg As String
For Each aRightRelation In AccessRightsObject
dwAccessRight = aRightRelation.GetVariableValue(COL_AccessRight_AccessRight) 'COL_AccessRight_AccessRight)
Dim UserGroupRelation = aRightRelation.GetWMObjectRelationByName(REL_AccessRight_UserOrGroup)
Dim UserOrGroup = UserGroupRelation.item(0).aName
If UserOrGroup.ToString.ToLower.Contains(Environment.UserName.ToLower) Then
If dwAccessRight And WMAccessRightRead Then
_msg = "R"
End If
If dwAccessRight And WMAccessRightWrite Then
_msg = _msg & "W"
End If
If dwAccessRight And WMAccessRightAdmin Then
_msg = _msg & "A"
End If
End If
Next
Return _msg
Catch ex As Exception
ClassLogger.Add("Unexpected Error in Get_File_Rights: " & ex.Message)
Return Nothing
End Try
End Function
End Class End Class

View File

@@ -24,9 +24,9 @@ Partial Class frmConstructor_Main
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container() Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConstructor_Main)) Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConstructor_Main))
Dim GridLevelNode1 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode() Dim GridLevelNode4 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
Dim GridLevelNode2 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode() Dim GridLevelNode5 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
Dim GridLevelNode3 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode() Dim GridLevelNode6 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
Me.SplitContainerMain = New DevExpress.XtraEditors.SplitContainerControl() Me.SplitContainerMain = New DevExpress.XtraEditors.SplitContainerControl()
Me.SplitContainerTop = New DevExpress.XtraEditors.SplitContainerControl() Me.SplitContainerTop = New DevExpress.XtraEditors.SplitContainerControl()
Me.TreeViewMain = New System.Windows.Forms.TreeView() Me.TreeViewMain = New System.Windows.Forms.TreeView()
@@ -69,25 +69,26 @@ Partial Class frmConstructor_Main
Me.TabWindream = New DevExpress.XtraTab.XtraTabPage() Me.TabWindream = New DevExpress.XtraTab.XtraTabPage()
Me.GridControlDocSearch = New DevExpress.XtraGrid.GridControl() Me.GridControlDocSearch = New DevExpress.XtraGrid.GridControl()
Me.ContextMenuStripResultFiles = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ContextMenuStripResultFiles = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.DateiÖffnenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.docCM_Open = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripSeparator7 = New System.Windows.Forms.ToolStripSeparator() Me.ToolStripSeparator7 = New System.Windows.Forms.ToolStripSeparator()
Me.CopyToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.docCM_Copy = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripSeparator10 = New System.Windows.Forms.ToolStripSeparator() Me.ToolStripSeparator10 = New System.Windows.Forms.ToolStripSeparator()
Me.UmbenennenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.docCM_Rename = New System.Windows.Forms.ToolStripMenuItem()
Me.tsTextBoxRenameFile = New System.Windows.Forms.ToolStripTextBox() Me.tsTextBoxRenameFile = New System.Windows.Forms.ToolStripTextBox()
Me.TSMIDisplayname = New System.Windows.Forms.ToolStripMenuItem() Me.docCM_RenameDisplay = New System.Windows.Forms.ToolStripMenuItem()
Me.tstbDisplayname = New System.Windows.Forms.ToolStripTextBox() Me.tstbDisplayname = New System.Windows.Forms.ToolStripTextBox()
Me.TSMI_inWork = New System.Windows.Forms.ToolStripMenuItem() Me.docCM_InWork = New System.Windows.Forms.ToolStripMenuItem()
Me.TSMI_linkRecord = New System.Windows.Forms.ToolStripMenuItem() Me.docCM_linkRecord = New System.Windows.Forms.ToolStripMenuItem()
Me.tsmiRights = New System.Windows.Forms.ToolStripMenuItem() Me.docCM_CheckRights = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripSeparator8 = New System.Windows.Forms.ToolStripSeparator() Me.ToolStripSeparator8 = New System.Windows.Forms.ToolStripSeparator()
Me.ToolStripMI_DeleteFile = New System.Windows.Forms.ToolStripMenuItem() Me.docCM_DeleteFile = New System.Windows.Forms.ToolStripMenuItem()
Me.TsMI_DocRemoveLink = New System.Windows.Forms.ToolStripMenuItem() Me.docCM_RemoveLink = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripSeparator9 = New System.Windows.Forms.ToolStripSeparator() Me.ToolStripSeparator9 = New System.Windows.Forms.ToolStripSeparator()
Me.PropertiesToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.docCM_ResetView = New System.Windows.Forms.ToolStripMenuItem()
Me.docCM_showGridSearch = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripSeparator16 = New System.Windows.Forms.ToolStripSeparator() Me.ToolStripSeparator16 = New System.Windows.Forms.ToolStripSeparator()
Me.AnsichtZurücksetzenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.docCM_PropertiesFile = New System.Windows.Forms.ToolStripMenuItem()
Me.SucheAnzeigenToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem() Me.docCM_GetRights = New System.Windows.Forms.ToolStripMenuItem()
Me.GridViewDoc_Search = New DevExpress.XtraGrid.Views.Grid.GridView() Me.GridViewDoc_Search = New DevExpress.XtraGrid.Views.Grid.GridView()
Me.ToolStripDokumente = New System.Windows.Forms.ToolStrip() Me.ToolStripDokumente = New System.Windows.Forms.ToolStrip()
Me.tslblWindreamView = New System.Windows.Forms.ToolStripLabel() Me.tslblWindreamView = New System.Windows.Forms.ToolStripLabel()
@@ -311,12 +312,12 @@ Partial Class frmConstructor_Main
Me.GridControlMain.AllowDrop = True Me.GridControlMain.AllowDrop = True
Me.GridControlMain.ContextMenuStrip = Me.ContextMenuGrid Me.GridControlMain.ContextMenuStrip = Me.ContextMenuGrid
resources.ApplyResources(Me.GridControlMain, "GridControlMain") resources.ApplyResources(Me.GridControlMain, "GridControlMain")
GridLevelNode1.LevelTemplate = Me.grvwGrid GridLevelNode4.LevelTemplate = Me.grvwGrid
GridLevelNode1.RelationName = "Level1" GridLevelNode4.RelationName = "Level1"
GridLevelNode2.LevelTemplate = Me.grvwCarousel GridLevelNode5.LevelTemplate = Me.grvwCarousel
GridLevelNode2.RelationName = "Level2" GridLevelNode5.RelationName = "Level2"
GridLevelNode3.RelationName = "Level3" GridLevelNode6.RelationName = "Level3"
Me.GridControlMain.LevelTree.Nodes.AddRange(New DevExpress.XtraGrid.GridLevelNode() {GridLevelNode1, GridLevelNode2, GridLevelNode3}) Me.GridControlMain.LevelTree.Nodes.AddRange(New DevExpress.XtraGrid.GridLevelNode() {GridLevelNode4, GridLevelNode5, GridLevelNode6})
Me.GridControlMain.MainView = Me.grvwTiles Me.GridControlMain.MainView = Me.grvwTiles
Me.GridControlMain.Name = "GridControlMain" Me.GridControlMain.Name = "GridControlMain"
Me.GridControlMain.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.grvwGrid, Me.grvwCarousel, Me.grvwTiles}) Me.GridControlMain.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.grvwGrid, Me.grvwCarousel, Me.grvwTiles})
@@ -517,36 +518,36 @@ Partial Class frmConstructor_Main
' '
'ContextMenuStripResultFiles 'ContextMenuStripResultFiles
' '
Me.ContextMenuStripResultFiles.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DateiÖffnenToolStripMenuItem, Me.ToolStripSeparator7, Me.CopyToolStripMenuItem, Me.ToolStripSeparator10, Me.UmbenennenToolStripMenuItem, Me.TSMIDisplayname, Me.TSMI_inWork, Me.TSMI_linkRecord, Me.tsmiRights, Me.ToolStripSeparator8, Me.ToolStripMI_DeleteFile, Me.TsMI_DocRemoveLink, Me.ToolStripSeparator9, Me.PropertiesToolStripMenuItem, Me.ToolStripSeparator16, Me.AnsichtZurücksetzenToolStripMenuItem, Me.SucheAnzeigenToolStripMenuItem1}) Me.ContextMenuStripResultFiles.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.docCM_Open, Me.ToolStripSeparator7, Me.docCM_Copy, Me.ToolStripSeparator10, Me.docCM_Rename, Me.docCM_RenameDisplay, Me.docCM_InWork, Me.docCM_linkRecord, Me.docCM_CheckRights, Me.ToolStripSeparator8, Me.docCM_DeleteFile, Me.docCM_RemoveLink, Me.ToolStripSeparator9, Me.docCM_ResetView, Me.docCM_showGridSearch, Me.docCM_GetRights, Me.ToolStripSeparator16, Me.docCM_PropertiesFile})
Me.ContextMenuStripResultFiles.Name = "ContextMenuStripResultFiles" Me.ContextMenuStripResultFiles.Name = "ContextMenuStripResultFiles"
resources.ApplyResources(Me.ContextMenuStripResultFiles, "ContextMenuStripResultFiles") resources.ApplyResources(Me.ContextMenuStripResultFiles, "ContextMenuStripResultFiles")
' '
'DateiÖffnenToolStripMenuItem 'docCM_Open
' '
Me.DateiÖffnenToolStripMenuItem.Name = "DateiÖffnenToolStripMenuItem" Me.docCM_Open.Name = "docCM_Open"
resources.ApplyResources(Me.DateiÖffnenToolStripMenuItem, "DateiÖffnenToolStripMenuItem") resources.ApplyResources(Me.docCM_Open, "docCM_Open")
' '
'ToolStripSeparator7 'ToolStripSeparator7
' '
Me.ToolStripSeparator7.Name = "ToolStripSeparator7" Me.ToolStripSeparator7.Name = "ToolStripSeparator7"
resources.ApplyResources(Me.ToolStripSeparator7, "ToolStripSeparator7") resources.ApplyResources(Me.ToolStripSeparator7, "ToolStripSeparator7")
' '
'CopyToolStripMenuItem 'docCM_Copy
' '
Me.CopyToolStripMenuItem.Image = Global.DD_Record_Organiser.My.Resources.Resources.Copy_6524 Me.docCM_Copy.Image = Global.DD_Record_Organiser.My.Resources.Resources.Copy_6524
Me.CopyToolStripMenuItem.Name = "CopyToolStripMenuItem" Me.docCM_Copy.Name = "docCM_Copy"
resources.ApplyResources(Me.CopyToolStripMenuItem, "CopyToolStripMenuItem") resources.ApplyResources(Me.docCM_Copy, "docCM_Copy")
' '
'ToolStripSeparator10 'ToolStripSeparator10
' '
Me.ToolStripSeparator10.Name = "ToolStripSeparator10" Me.ToolStripSeparator10.Name = "ToolStripSeparator10"
resources.ApplyResources(Me.ToolStripSeparator10, "ToolStripSeparator10") resources.ApplyResources(Me.ToolStripSeparator10, "ToolStripSeparator10")
' '
'UmbenennenToolStripMenuItem 'docCM_Rename
' '
Me.UmbenennenToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsTextBoxRenameFile}) Me.docCM_Rename.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsTextBoxRenameFile})
Me.UmbenennenToolStripMenuItem.Name = "UmbenennenToolStripMenuItem" Me.docCM_Rename.Name = "docCM_Rename"
resources.ApplyResources(Me.UmbenennenToolStripMenuItem, "UmbenennenToolStripMenuItem") resources.ApplyResources(Me.docCM_Rename, "docCM_Rename")
' '
'tsTextBoxRenameFile 'tsTextBoxRenameFile
' '
@@ -555,11 +556,11 @@ Partial Class frmConstructor_Main
Me.tsTextBoxRenameFile.Name = "tsTextBoxRenameFile" Me.tsTextBoxRenameFile.Name = "tsTextBoxRenameFile"
resources.ApplyResources(Me.tsTextBoxRenameFile, "tsTextBoxRenameFile") resources.ApplyResources(Me.tsTextBoxRenameFile, "tsTextBoxRenameFile")
' '
'TSMIDisplayname 'docCM_RenameDisplay
' '
Me.TSMIDisplayname.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tstbDisplayname}) Me.docCM_RenameDisplay.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tstbDisplayname})
Me.TSMIDisplayname.Name = "TSMIDisplayname" Me.docCM_RenameDisplay.Name = "docCM_RenameDisplay"
resources.ApplyResources(Me.TSMIDisplayname, "TSMIDisplayname") resources.ApplyResources(Me.docCM_RenameDisplay, "docCM_RenameDisplay")
' '
'tstbDisplayname 'tstbDisplayname
' '
@@ -568,66 +569,71 @@ Partial Class frmConstructor_Main
Me.tstbDisplayname.Name = "tstbDisplayname" Me.tstbDisplayname.Name = "tstbDisplayname"
resources.ApplyResources(Me.tstbDisplayname, "tstbDisplayname") resources.ApplyResources(Me.tstbDisplayname, "tstbDisplayname")
' '
'TSMI_inWork 'docCM_InWork
' '
Me.TSMI_inWork.Image = Global.DD_Record_Organiser.My.Resources.Resources.FileSystemEditor_5852 Me.docCM_InWork.Image = Global.DD_Record_Organiser.My.Resources.Resources.FileSystemEditor_5852
Me.TSMI_inWork.Name = "TSMI_inWork" Me.docCM_InWork.Name = "docCM_InWork"
resources.ApplyResources(Me.TSMI_inWork, "TSMI_inWork") resources.ApplyResources(Me.docCM_InWork, "docCM_InWork")
' '
'TSMI_linkRecord 'docCM_linkRecord
' '
Me.TSMI_linkRecord.Image = Global.DD_Record_Organiser.My.Resources.Resources.Link Me.docCM_linkRecord.Image = Global.DD_Record_Organiser.My.Resources.Resources.Link
Me.TSMI_linkRecord.Name = "TSMI_linkRecord" Me.docCM_linkRecord.Name = "docCM_linkRecord"
resources.ApplyResources(Me.TSMI_linkRecord, "TSMI_linkRecord") resources.ApplyResources(Me.docCM_linkRecord, "docCM_linkRecord")
' '
'tsmiRights 'docCM_CheckRights
' '
Me.tsmiRights.Image = Global.DD_Record_Organiser.My.Resources.Resources.RightFileOnly Me.docCM_CheckRights.Image = Global.DD_Record_Organiser.My.Resources.Resources.RightFileOnly
Me.tsmiRights.Name = "tsmiRights" Me.docCM_CheckRights.Name = "docCM_CheckRights"
resources.ApplyResources(Me.tsmiRights, "tsmiRights") resources.ApplyResources(Me.docCM_CheckRights, "docCM_CheckRights")
' '
'ToolStripSeparator8 'ToolStripSeparator8
' '
Me.ToolStripSeparator8.Name = "ToolStripSeparator8" Me.ToolStripSeparator8.Name = "ToolStripSeparator8"
resources.ApplyResources(Me.ToolStripSeparator8, "ToolStripSeparator8") resources.ApplyResources(Me.ToolStripSeparator8, "ToolStripSeparator8")
' '
'ToolStripMI_DeleteFile 'docCM_DeleteFile
' '
Me.ToolStripMI_DeleteFile.Image = Global.DD_Record_Organiser.My.Resources.Resources.delete Me.docCM_DeleteFile.Image = Global.DD_Record_Organiser.My.Resources.Resources.delete
Me.ToolStripMI_DeleteFile.Name = "ToolStripMI_DeleteFile" Me.docCM_DeleteFile.Name = "docCM_DeleteFile"
resources.ApplyResources(Me.ToolStripMI_DeleteFile, "ToolStripMI_DeleteFile") resources.ApplyResources(Me.docCM_DeleteFile, "docCM_DeleteFile")
' '
'TsMI_DocRemoveLink 'docCM_RemoveLink
' '
Me.TsMI_DocRemoveLink.Image = Global.DD_Record_Organiser.My.Resources.Resources.RemoveLink_9938 Me.docCM_RemoveLink.Image = Global.DD_Record_Organiser.My.Resources.Resources.RemoveLink_9938
Me.TsMI_DocRemoveLink.Name = "TsMI_DocRemoveLink" Me.docCM_RemoveLink.Name = "docCM_RemoveLink"
resources.ApplyResources(Me.TsMI_DocRemoveLink, "TsMI_DocRemoveLink") resources.ApplyResources(Me.docCM_RemoveLink, "docCM_RemoveLink")
' '
'ToolStripSeparator9 'ToolStripSeparator9
' '
Me.ToolStripSeparator9.Name = "ToolStripSeparator9" Me.ToolStripSeparator9.Name = "ToolStripSeparator9"
resources.ApplyResources(Me.ToolStripSeparator9, "ToolStripSeparator9") resources.ApplyResources(Me.ToolStripSeparator9, "ToolStripSeparator9")
' '
'PropertiesToolStripMenuItem 'docCM_ResetView
' '
Me.PropertiesToolStripMenuItem.Image = Global.DD_Record_Organiser.My.Resources.Resources.PropertyGridEditorPart_6041 Me.docCM_ResetView.Name = "docCM_ResetView"
Me.PropertiesToolStripMenuItem.Name = "PropertiesToolStripMenuItem" resources.ApplyResources(Me.docCM_ResetView, "docCM_ResetView")
resources.ApplyResources(Me.PropertiesToolStripMenuItem, "PropertiesToolStripMenuItem") '
'docCM_showGridSearch
'
Me.docCM_showGridSearch.Name = "docCM_showGridSearch"
resources.ApplyResources(Me.docCM_showGridSearch, "docCM_showGridSearch")
' '
'ToolStripSeparator16 'ToolStripSeparator16
' '
Me.ToolStripSeparator16.Name = "ToolStripSeparator16" Me.ToolStripSeparator16.Name = "ToolStripSeparator16"
resources.ApplyResources(Me.ToolStripSeparator16, "ToolStripSeparator16") resources.ApplyResources(Me.ToolStripSeparator16, "ToolStripSeparator16")
' '
'AnsichtZurücksetzenToolStripMenuItem 'docCM_PropertiesFile
' '
Me.AnsichtZurücksetzenToolStripMenuItem.Name = "AnsichtZurücksetzenToolStripMenuItem" Me.docCM_PropertiesFile.Image = Global.DD_Record_Organiser.My.Resources.Resources.PropertyGridEditorPart_6041
resources.ApplyResources(Me.AnsichtZurücksetzenToolStripMenuItem, "AnsichtZurücksetzenToolStripMenuItem") Me.docCM_PropertiesFile.Name = "docCM_PropertiesFile"
resources.ApplyResources(Me.docCM_PropertiesFile, "docCM_PropertiesFile")
' '
'SucheAnzeigenToolStripMenuItem1 'docCM_GetRights
' '
Me.SucheAnzeigenToolStripMenuItem1.Name = "SucheAnzeigenToolStripMenuItem1" Me.docCM_GetRights.Name = "docCM_GetRights"
resources.ApplyResources(Me.SucheAnzeigenToolStripMenuItem1, "SucheAnzeigenToolStripMenuItem1") resources.ApplyResources(Me.docCM_GetRights, "docCM_GetRights")
' '
'GridViewDoc_Search 'GridViewDoc_Search
' '
@@ -1393,13 +1399,13 @@ Partial Class frmConstructor_Main
Friend WithEvents ToolStripSeparator6 As System.Windows.Forms.ToolStripSeparator Friend WithEvents ToolStripSeparator6 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents tsmi_RecordDelete As System.Windows.Forms.ToolStripMenuItem Friend WithEvents tsmi_RecordDelete As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ContextMenuStripResultFiles As System.Windows.Forms.ContextMenuStrip Friend WithEvents ContextMenuStripResultFiles As System.Windows.Forms.ContextMenuStrip
Friend WithEvents DateiÖffnenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents docCM_Open As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripSeparator7 As System.Windows.Forms.ToolStripSeparator Friend WithEvents ToolStripSeparator7 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents CopyToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents docCM_Copy As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripSeparator8 As System.Windows.Forms.ToolStripSeparator Friend WithEvents ToolStripSeparator8 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents TsMI_DocRemoveLink As System.Windows.Forms.ToolStripMenuItem Friend WithEvents docCM_RemoveLink As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripSeparator9 As System.Windows.Forms.ToolStripSeparator Friend WithEvents ToolStripSeparator9 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents PropertiesToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents docCM_PropertiesFile As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents tslblFileslocked As System.Windows.Forms.ToolStripLabel Friend WithEvents tslblFileslocked As System.Windows.Forms.ToolStripLabel
Friend WithEvents tsButtonCancel As System.Windows.Forms.ToolStripButton Friend WithEvents tsButtonCancel As System.Windows.Forms.ToolStripButton
Friend WithEvents tsbtnRedo As System.Windows.Forms.ToolStripButton Friend WithEvents tsbtnRedo As System.Windows.Forms.ToolStripButton
@@ -1407,21 +1413,21 @@ Partial Class frmConstructor_Main
Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents MassenänderungToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents MassenänderungToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripSeparator10 As System.Windows.Forms.ToolStripSeparator Friend WithEvents ToolStripSeparator10 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents UmbenennenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents docCM_Rename As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents tsTextBoxRenameFile As System.Windows.Forms.ToolStripTextBox Friend WithEvents tsTextBoxRenameFile As System.Windows.Forms.ToolStripTextBox
Friend WithEvents TSMI_linkRecord As System.Windows.Forms.ToolStripMenuItem Friend WithEvents docCM_linkRecord As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents SplitContainer1 As DevExpress.XtraEditors.SplitContainerControl Friend WithEvents SplitContainer1 As DevExpress.XtraEditors.SplitContainerControl
Friend WithEvents ToolStripSeparator11 As System.Windows.Forms.ToolStripSeparator Friend WithEvents ToolStripSeparator11 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents DetailAnsichtDatensatzToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents DetailAnsichtDatensatzToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents EntitätssucheStartenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents EntitätssucheStartenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents TSMI_inWork As System.Windows.Forms.ToolStripMenuItem Friend WithEvents docCM_InWork As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents AnsichtZurücksetzenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents docCM_ResetView As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents TSMIDisplayname As System.Windows.Forms.ToolStripMenuItem Friend WithEvents docCM_RenameDisplay As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents tstbDisplayname As System.Windows.Forms.ToolStripTextBox Friend WithEvents tstbDisplayname As System.Windows.Forms.ToolStripTextBox
Friend WithEvents tsmiRights As System.Windows.Forms.ToolStripMenuItem Friend WithEvents docCM_CheckRights As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents progressLoadEntity As System.Windows.Forms.ToolStripProgressBar Friend WithEvents progressLoadEntity As System.Windows.Forms.ToolStripProgressBar
Friend WithEvents labelLoadEntity As System.Windows.Forms.ToolStripStatusLabel Friend WithEvents labelLoadEntity As System.Windows.Forms.ToolStripStatusLabel
Friend WithEvents ToolStripMI_DeleteFile As System.Windows.Forms.ToolStripMenuItem Friend WithEvents docCM_DeleteFile As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents tsstlblDocID As System.Windows.Forms.ToolStripStatusLabel Friend WithEvents tsstlblDocID As System.Windows.Forms.ToolStripStatusLabel
Friend WithEvents AuswertungAnzeigenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents AuswertungAnzeigenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripSeparator14 As System.Windows.Forms.ToolStripSeparator Friend WithEvents ToolStripSeparator14 As System.Windows.Forms.ToolStripSeparator
@@ -1429,10 +1435,11 @@ Partial Class frmConstructor_Main
Friend WithEvents ToolStripSeparator13 As System.Windows.Forms.ToolStripSeparator Friend WithEvents ToolStripSeparator13 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents ToolStripSeparator12 As System.Windows.Forms.ToolStripSeparator Friend WithEvents ToolStripSeparator12 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents ToolStripSeparator16 As System.Windows.Forms.ToolStripSeparator Friend WithEvents ToolStripSeparator16 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents SucheAnzeigenToolStripMenuItem1 As System.Windows.Forms.ToolStripMenuItem Friend WithEvents docCM_showGridSearch As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripSeparator17 As System.Windows.Forms.ToolStripSeparator Friend WithEvents ToolStripSeparator17 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents ToolStripLabel1 As System.Windows.Forms.ToolStripLabel Friend WithEvents ToolStripLabel1 As System.Windows.Forms.ToolStripLabel
Friend WithEvents tsTextboxFulltext As System.Windows.Forms.ToolStripTextBox Friend WithEvents tsTextboxFulltext As System.Windows.Forms.ToolStripTextBox
Friend WithEvents tsbtnEntitySearch As System.Windows.Forms.ToolStripButton Friend WithEvents tsbtnEntitySearch As System.Windows.Forms.ToolStripButton
Friend WithEvents ToolStripSeparator18 As System.Windows.Forms.ToolStripSeparator Friend WithEvents ToolStripSeparator18 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents docCM_GetRights As System.Windows.Forms.ToolStripMenuItem
End Class End Class

File diff suppressed because it is too large Load Diff

View File

@@ -999,13 +999,13 @@ Public Class frmConstructor_Main
RIGHT_WINDREAM_FORBIDDEN = False RIGHT_WINDREAM_FORBIDDEN = False
tsmi_RecordDelete.Enabled = True tsmi_RecordDelete.Enabled = True
MassenänderungToolStripMenuItem.Enabled = True MassenänderungToolStripMenuItem.Enabled = True
TsMI_DocRemoveLink.Enabled = True docCM_RemoveLink.Enabled = True
UmbenennenToolStripMenuItem.Enabled = True docCM_Rename.Enabled = True
TSMI_linkRecord.Enabled = True docCM_linkRecord.Enabled = True
TSMI_inWork.Enabled = True docCM_InWork.Enabled = True
CopyToolStripMenuItem.Enabled = True docCM_Copy.Enabled = True
RecordKopierenToolStripMenuItem.Enabled = True RecordKopierenToolStripMenuItem.Enabled = True
PropertiesToolStripMenuItem.Enabled = True docCM_PropertiesFile.Enabled = True
tslblLocked.Visible = False tslblLocked.Visible = False
tslblFileslocked.Visible = False tslblFileslocked.Visible = False
TabFollowUp.PageEnabled = True TabFollowUp.PageEnabled = True
@@ -1013,8 +1013,8 @@ Public Class frmConstructor_Main
TabWindream.PageEnabled = True TabWindream.PageEnabled = True
WindreamsucheNeuLadenToolStripMenuItem.Enabled = True WindreamsucheNeuLadenToolStripMenuItem.Enabled = True
EntitätssucheStartenToolStripMenuItem.Enabled = True EntitätssucheStartenToolStripMenuItem.Enabled = True
DateiÖffnenToolStripMenuItem.Enabled = True docCM_Open.Enabled = True
TSMI_inWork.Enabled = True docCM_InWork.Enabled = True
VerknüpfungenAnzeigenToolStripMenuItem.Enabled = True VerknüpfungenAnzeigenToolStripMenuItem.Enabled = True
Dim tempsql Dim tempsql
@@ -1058,12 +1058,12 @@ Public Class frmConstructor_Main
tsButtonDelete.Enabled = False tsButtonDelete.Enabled = False
tsmi_RecordDelete.Enabled = False tsmi_RecordDelete.Enabled = False
MassenänderungToolStripMenuItem.Enabled = False MassenänderungToolStripMenuItem.Enabled = False
UmbenennenToolStripMenuItem.Enabled = False docCM_Rename.Enabled = False
TSMI_linkRecord.Enabled = False docCM_linkRecord.Enabled = False
TSMI_inWork.Enabled = False docCM_InWork.Enabled = False
PropertiesToolStripMenuItem.Enabled = False docCM_PropertiesFile.Enabled = False
CopyToolStripMenuItem.Enabled = False docCM_Copy.Enabled = False
TsMI_DocRemoveLink.Enabled = False docCM_RemoveLink.Enabled = False
tslblLocked.Visible = True tslblLocked.Visible = True
RecordKopierenToolStripMenuItem.Enabled = False RecordKopierenToolStripMenuItem.Enabled = False
TabFollowUp.PageEnabled = False TabFollowUp.PageEnabled = False
@@ -1115,8 +1115,8 @@ Public Class frmConstructor_Main
'TabWindream.PageEnabled = False 'TabWindream.PageEnabled = False
WindreamsucheNeuLadenToolStripMenuItem.Enabled = False WindreamsucheNeuLadenToolStripMenuItem.Enabled = False
EntitätssucheStartenToolStripMenuItem.Enabled = False EntitätssucheStartenToolStripMenuItem.Enabled = False
DateiÖffnenToolStripMenuItem.Enabled = False docCM_Open.Enabled = False
TSMI_inWork.Enabled = False docCM_InWork.Enabled = False
End If End If
Catch ex As Exception Catch ex As Exception
@@ -3560,7 +3560,7 @@ Public Class frmConstructor_Main
End Try End Try
End Sub End Sub
Private Sub WD_DELETE_DOCS() Private Sub WD_DELETE_DOCS()
Dim sw As New Stopwatch Dim sw As New Stopwatch
sw.Start() sw.Start()
@@ -4911,7 +4911,7 @@ Public Class frmConstructor_Main
Catch ex As Exception Catch ex As Exception
ClassLogger.Add(">> Unexpected Error in grvwGrid_MouseDown: " & ex.Message, False) ClassLogger.Add(">> Unexpected Error in grvwGrid_MouseDown: " & ex.Message, False)
End Try End Try
End Sub End Sub
Private Sub grvwGrid_MouseMove(sender As Object, e As MouseEventArgs) Handles grvwGrid.MouseMove, grvwTiles.MouseMove, grvwCarousel.MouseMove Private Sub grvwGrid_MouseMove(sender As Object, e As MouseEventArgs) Handles grvwGrid.MouseMove, grvwTiles.MouseMove, grvwCarousel.MouseMove
Dim view As BaseView = CType(sender, BaseView) Dim view As BaseView = CType(sender, BaseView)
@@ -5100,7 +5100,7 @@ Public Class frmConstructor_Main
Delete_Record() Delete_Record()
End Sub End Sub
Private Sub KopierenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CopyToolStripMenuItem.Click Private Sub KopierenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles docCM_Copy.Click
If ClassWindreamDocGrid.SELECTED_DOC_PATH <> "" Then If ClassWindreamDocGrid.SELECTED_DOC_PATH <> "" Then
Try Try
Dim selectedfile(0) As String Dim selectedfile(0) As String
@@ -5139,7 +5139,7 @@ Public Class frmConstructor_Main
End If End If
End Sub End Sub
Private Sub LöschenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles TsMI_DocRemoveLink.Click Private Sub LöschenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles docCM_RemoveLink.Click
If RECORD_ID = 0 Then If RECORD_ID = 0 Then
MsgBox("Please select a record!", MsgBoxStyle.Exclamation) MsgBox("Please select a record!", MsgBoxStyle.Exclamation)
Exit Sub Exit Sub
@@ -5185,7 +5185,7 @@ Public Class frmConstructor_Main
End If End If
End Sub End Sub
Private Sub EigenschaftenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PropertiesToolStripMenuItem.Click Private Sub EigenschaftenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles docCM_PropertiesFile.Click
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
MsgBox("Could not read File Parameters(4)!", MsgBoxStyle.Exclamation) MsgBox("Could not read File Parameters(4)!", MsgBoxStyle.Exclamation)
Exit Sub Exit Sub
@@ -5209,7 +5209,7 @@ Public Class frmConstructor_Main
End Sub End Sub
Private Sub DateiÖffnenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DateiÖffnenToolStripMenuItem.Click Private Sub DateiÖffnenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles docCM_Open.Click
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
MsgBox("Could not read File Parameters(4)!", MsgBoxStyle.Exclamation) MsgBox("Could not read File Parameters(4)!", MsgBoxStyle.Exclamation)
Exit Sub Exit Sub
@@ -5511,11 +5511,11 @@ Public Class frmConstructor_Main
End Try End Try
End If End If
End Sub End Sub
Private Sub UmbenennenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles UmbenennenToolStripMenuItem.Click Private Sub UmbenennenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles docCM_Rename.Click
Display_Filename() Display_Filename()
End Sub End Sub
Private Sub UmbenennenToolStripMenuItem_MouseHover(sender As Object, e As EventArgs) Handles UmbenennenToolStripMenuItem.MouseHover Private Sub UmbenennenToolStripMenuItem_MouseHover(sender As Object, e As EventArgs) Handles docCM_Rename.MouseHover
Display_Filename() Display_Filename()
End Sub End Sub
Sub Display_Filename() Sub Display_Filename()
@@ -5544,7 +5544,7 @@ Public Class frmConstructor_Main
End Try End Try
End Sub End Sub
Private Sub DateiMitDatensatzVerknüpfenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles TSMI_linkRecord.Click Private Sub DateiMitDatensatzVerknüpfenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles docCM_linkRecord.Click
Try Try
ClassWindreamDocGrid.GetDocItems(GridViewDoc_Search) ClassWindreamDocGrid.GetDocItems(GridViewDoc_Search)
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
@@ -5640,24 +5640,56 @@ Public Class frmConstructor_Main
End If End If
End Sub End Sub
Sub ContextMenu_Read()
docCM_Open.Enabled = True
docCM_Copy.Enabled = False
docCM_Rename.Enabled = False
docCM_RenameDisplay.Enabled = False
docCM_InWork.Enabled = False
docCM_linkRecord.Enabled = False
docCM_CheckRights.Enabled = False
docCM_DeleteFile.Enabled = False
docCM_RemoveLink.Enabled = False
End Sub
Sub ContextMenu_Write()
docCM_Open.Enabled = True
docCM_Copy.Enabled = True
docCM_Rename.Enabled = True
docCM_RenameDisplay.Enabled = True
docCM_InWork.Enabled = True
docCM_linkRecord.Enabled = True
docCM_CheckRights.Enabled = True
docCM_DeleteFile.Enabled = True
docCM_RemoveLink.Enabled = True
End Sub
Private Sub ContextMenuStripResultFiles_Opening(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles ContextMenuStripResultFiles.Opening Private Sub ContextMenuStripResultFiles_Opening(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles ContextMenuStripResultFiles.Opening
File_in_Work() File_in_Work()
Dim Result = ClassWindream.Get_File_Rights(ClassWindreamDocGrid.SELECTED_DOC_PATH)
If Not IsNothing(Result) Then
Select Case Result.ToString
Case "R"
ContextMenu_Read()
Case "RW"
ContextMenu_Write()
Case "RWA"
ContextMenu_Write()
End Select
End If
If ClassWindreamDocGrid.DT_RESULTFILES.Rows.Count = 1 Then If ClassWindreamDocGrid.DT_RESULTFILES.Rows.Count = 1 Then
If ClassWindreamDocGrid.DT_RESULTFILES.Rows(0).Item("DISPLAYNAME") <> "" Then If ClassWindreamDocGrid.DT_RESULTFILES.Rows(0).Item("DISPLAYNAME") <> "" Then
TSMIDisplayname.Visible = True docCM_RenameDisplay.Visible = True
Set_Displayname() Set_Displayname()
Else Else
TSMIDisplayname.Visible = False docCM_RenameDisplay.Visible = False
End If End If
Else Else
TSMIDisplayname.Visible = False docCM_RenameDisplay.Visible = False
End If End If
End Sub End Sub
Sub File_in_Work() Sub File_in_Work()
TSMI_inWork.Enabled = True docCM_InWork.Enabled = True
Try Try
Dim expression As String Dim expression As String
expression = "DocID = " & ClassWindreamDocGrid.SELECTED_DOC_ID expression = "DocID = " & ClassWindreamDocGrid.SELECTED_DOC_ID
@@ -5694,13 +5726,13 @@ Public Class frmConstructor_Main
displ = "Lock file for working" displ = "Lock file for working"
End If End If
End If End If
TSMI_inWork.Text = displ docCM_InWork.Text = displ
Catch ex As Exception Catch ex As Exception
ClassLogger.Add(">> Unexpected Error in File-Work Info: " & ex.Message, False) ClassLogger.Add(">> Unexpected Error in File-Work Info: " & ex.Message, False)
TSMI_inWork.Enabled = False docCM_InWork.Enabled = False
End Try End Try
End Sub End Sub
Private Sub TSMI_inWork_Click(sender As Object, e As EventArgs) Handles TSMI_inWork.Click Private Sub TSMI_inWork_Click(sender As Object, e As EventArgs) Handles docCM_InWork.Click
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
MsgBox("Could not read File Parameters (3)!", MsgBoxStyle.Exclamation) MsgBox("Could not read File Parameters (3)!", MsgBoxStyle.Exclamation)
Exit Sub Exit Sub
@@ -5725,7 +5757,7 @@ Public Class frmConstructor_Main
RUN_WDSEARCH_GRID("RECORD") RUN_WDSEARCH_GRID("RECORD")
End If End If
End Sub End Sub
Private Sub AnsichtZurücksetzenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AnsichtZurücksetzenToolStripMenuItem.Click Private Sub AnsichtZurücksetzenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles docCM_ResetView.Click
' TODO: Ansicht zurücksetzen ' TODO: Ansicht zurücksetzen
Try Try
Dim XMLPath = Get_DocGrid_Layout_Filename() Dim XMLPath = Get_DocGrid_Layout_Filename()
@@ -5745,10 +5777,10 @@ Public Class frmConstructor_Main
Me.Cursor = Cursors.Default Me.Cursor = Cursors.Default
End Sub End Sub
Private Sub TSMIDisplayname_Click(sender As Object, e As EventArgs) Handles TSMIDisplayname.Click Private Sub TSMIDisplayname_Click(sender As Object, e As EventArgs) Handles docCM_RenameDisplay.Click
Set_Displayname() Set_Displayname()
End Sub End Sub
Private Sub TSMIDisplayname_MouseHover(sender As Object, e As EventArgs) Handles TSMIDisplayname.MouseHover Private Sub TSMIDisplayname_MouseHover(sender As Object, e As EventArgs) Handles docCM_RenameDisplay.MouseHover
Set_Displayname() Set_Displayname()
End Sub End Sub
Sub Set_Displayname() Sub Set_Displayname()
@@ -5784,7 +5816,7 @@ Public Class frmConstructor_Main
End If End If
End Sub End Sub
Private Sub TestToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles tsmiRights.Click Private Sub TestToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles docCM_CheckRights.Click
Dim msg = "Die Rechte wurden erfolgreich überprüft und aktualisiert!" Dim msg = "Die Rechte wurden erfolgreich überprüft und aktualisiert!"
CURRENT_RECORD_ID = RECORD_ID CURRENT_RECORD_ID = RECORD_ID
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
@@ -5838,7 +5870,7 @@ Public Class frmConstructor_Main
End Sub End Sub
Private Sub ToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles ToolStripMI_DeleteFile.Click Private Sub ToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles docCM_DeleteFile.Click
If RECORD_ID = 0 And SEARCH_TYPE <> "ENTITY" Then If RECORD_ID = 0 And SEARCH_TYPE <> "ENTITY" Then
MsgBox("Please select a record!", MsgBoxStyle.Exclamation) MsgBox("Please select a record!", MsgBoxStyle.Exclamation)
Exit Sub Exit Sub
@@ -5896,14 +5928,14 @@ Public Class frmConstructor_Main
MsgBox("Unexpected Error in Delete file:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) MsgBox("Unexpected Error in Delete file:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try End Try
End If End If
Next Next
If SEARCH_TYPE = "ENTITY" Then If SEARCH_TYPE = "ENTITY" Then
CURRENT_DT_DOC_ENTITY_SEARCH = Nothing CURRENT_DT_DOC_ENTITY_SEARCH = Nothing
End If End If
RUN_WDSEARCH_GRID(SEARCH_TYPE) RUN_WDSEARCH_GRID(SEARCH_TYPE)
End If End If
End Sub End Sub
@@ -5992,7 +6024,7 @@ Public Class frmConstructor_Main
frm.Show() frm.Show()
End Sub End Sub
Private Sub SucheAnzeigenToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles SucheAnzeigenToolStripMenuItem1.Click Private Sub SucheAnzeigenToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles docCM_showGridSearch.Click
GridViewDoc_Search.ShowFindPanel() GridViewDoc_Search.ShowFindPanel()
End Sub End Sub
@@ -6022,4 +6054,19 @@ Public Class frmConstructor_Main
Private Sub tsbtnEntitySearch_Click(sender As Object, e As EventArgs) Handles tsbtnEntitySearch.Click Private Sub tsbtnEntitySearch_Click(sender As Object, e As EventArgs) Handles tsbtnEntitySearch.Click
RUN_WDSEARCH_GRID("ENTITY") RUN_WDSEARCH_GRID("ENTITY")
End Sub End Sub
Private Sub DateirechteFürUserToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles docCM_GetRights.Click
Dim result = ClassWindream.Get_File_Rights(ClassWindreamDocGrid.SELECTED_DOC_PATH)
If Not IsNothing(result) Then
Dim msg = "Das aktuelle Recht für Sie ist: " & vbNewLine & vbNewLine
If USER_LANGUAGE <> "de-DE" Then
msg = "Your current right is: " & vbNewLine & vbNewLine & vbNewLine
End If
msg = msg & result.ToString
msg = msg & vbNewLine & vbNewLine & "R:" & vbTab & "Read" & vbNewLine & "W:" & vbTab & "Write" & vbNewLine & "A:" & vbTab & "Admin"
MsgBox(msg, MsgBoxStyle.Information)
Else
MsgBox("Could not read the rights for selected file! Check the log for further infomation!", MsgBoxStyle.Exclamation)
End If
End Sub
End Class End Class