Vor Profilauswahl prüfen, ob Session vorhanden - frmIndex
This commit is contained in:
parent
199904b695
commit
574fd88b99
@ -11,6 +11,7 @@ Imports Limilabs.Mail
|
|||||||
Imports DevExpress.XtraEditors
|
Imports DevExpress.XtraEditors
|
||||||
Imports DigitalData.GUIs.Common
|
Imports DigitalData.GUIs.Common
|
||||||
Imports DigitalData.Modules.Base
|
Imports DigitalData.Modules.Base
|
||||||
|
Imports DigitalData.Modules.Windream
|
||||||
'Imports DevExpress.DataAccess.Native.Json
|
'Imports DevExpress.DataAccess.Native.Json
|
||||||
'Imports GdPicture.Internal.MSOfficeBinary.translator.Spreadsheet.XlsFileFormat.Records
|
'Imports GdPicture.Internal.MSOfficeBinary.translator.Spreadsheet.XlsFileFormat.Records
|
||||||
|
|
||||||
@ -1847,57 +1848,69 @@ Public Class frmIndex
|
|||||||
|
|
||||||
Private Sub ComboBoxEdit1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboboxDoctype.EditValueChanged
|
Private Sub ComboBoxEdit1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboboxDoctype.EditValueChanged
|
||||||
If ComboboxDoctype.EditValue IsNot Nothing And FormLoaded = True Then
|
If ComboboxDoctype.EditValue IsNot Nothing And FormLoaded = True Then
|
||||||
Dim oSelectedItem As DocType = ComboboxDoctype.EditValue
|
|
||||||
|
|
||||||
CURRENT_DOKART_ID = oSelectedItem.Guid
|
WINDREAM = New Windream(LOGCONFIG, False, WMDrive, WINDREAM_BASEPATH, True, "", "", "", "")
|
||||||
CURRENT_LASTDOKART = oSelectedItem.Name
|
If Not IsNothing(WINDREAM) Then
|
||||||
|
If WINDREAM.SessionLoggedin Then
|
||||||
|
|
||||||
'lblhinweis.Visible = False
|
Dim oSelectedItem As DocType = ComboboxDoctype.EditValue
|
||||||
ClearNotice()
|
|
||||||
|
|
||||||
'lblerror.Visible = False
|
CURRENT_DOKART_ID = oSelectedItem.Guid
|
||||||
ClearError()
|
CURRENT_LASTDOKART = oSelectedItem.Name
|
||||||
|
|
||||||
pnlIndex.Controls.Clear()
|
'lblhinweis.Visible = False
|
||||||
Dim sql As String = "Select WINDREAM_DIRECT, ZIEL_PFAD, DUPLICATE_HANDLING from TBDD_DOKUMENTART WHERE GUID = " & oSelectedItem.Guid
|
ClearNotice()
|
||||||
Dim oDoctypes As DataTable = DATABASE_ECM.GetDatatable(sql)
|
|
||||||
|
|
||||||
Dim oDocType As DataRow = oDoctypes.Rows.Item(0)
|
'lblerror.Visible = False
|
||||||
WMDirect = oDocType.Item("WINDREAM_DIRECT")
|
ClearError()
|
||||||
Dim oDestination As String = oDocType.Item("ZIEL_PFAD")
|
|
||||||
Dim oNewDestination As String
|
pnlIndex.Controls.Clear()
|
||||||
If WMDirect Then
|
Dim sql As String = "Select WINDREAM_DIRECT, ZIEL_PFAD, DUPLICATE_HANDLING from TBDD_DOKUMENTART WHERE GUID = " & oSelectedItem.Guid
|
||||||
Dim oNormalized As String = WINDREAM.GetNormalizedPath(oDestination, False)
|
Dim oDoctypes As DataTable = DATABASE_ECM.GetDatatable(sql)
|
||||||
oNewDestination = Path.Combine(WINDREAM.ClientBasePath, oNormalized)
|
|
||||||
Else
|
Dim oDocType As DataRow = oDoctypes.Rows.Item(0)
|
||||||
oNewDestination = oDestination
|
WMDirect = oDocType.Item("WINDREAM_DIRECT")
|
||||||
End If
|
Dim oDestination As String = oDocType.Item("ZIEL_PFAD")
|
||||||
|
Dim oNewDestination As String
|
||||||
|
If WMDirect Then
|
||||||
|
Dim oNormalized As String = WINDREAM.GetNormalizedPath(oDestination, False)
|
||||||
|
oNewDestination = Path.Combine(WINDREAM.ClientBasePath, oNormalized)
|
||||||
|
Else
|
||||||
|
oNewDestination = oDestination
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
LOGGER.Debug("Path from Database is [{0}]", oDestination)
|
LOGGER.Debug("Path from Database is [{0}]", oDestination)
|
||||||
LOGGER.Debug("Checking for path [{0}]", oNewDestination)
|
LOGGER.Debug("Checking for path [{0}]", oNewDestination)
|
||||||
Dim oPathExists As Boolean
|
Dim oPathExists As Boolean
|
||||||
If WMDirect Then
|
If WMDirect Then
|
||||||
oPathExists = WINDREAM.TestFolderExists(oNewDestination)
|
oPathExists = WINDREAM.TestFolderExists(oNewDestination)
|
||||||
Else
|
Else
|
||||||
oPathExists = Directory.Exists(oNewDestination)
|
oPathExists = Directory.Exists(oNewDestination)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If oPathExists = False Then
|
If oPathExists = False Then
|
||||||
Dim oMessage As String
|
Dim oMessage As String
|
||||||
|
|
||||||
|
If USER_LANGUAGE = "de-DE" Then
|
||||||
|
oMessage = $"Der Pfad für das ausgewählte Profil ist nicht erreichbar:{vbNewLine}[{oNewDestination}].{vbNewLine}{vbNewLine}Bitte wählen Sie ein anderes Profil."
|
||||||
|
Else
|
||||||
|
oMessage = $"Profile Path is not available:{vbNewLine}[{oNewDestination}].{vbNewLine}{vbNewLine}Please select another profile."
|
||||||
|
End If
|
||||||
|
|
||||||
|
MsgBox(oMessage, MsgBoxStyle.Information, Text)
|
||||||
|
ComboboxDoctype.EditValue = Nothing
|
||||||
|
Else
|
||||||
|
|
||||||
|
CURRENT_DOKART_DUPLICATE_HANDLING = oDocType.Item("DUPLICATE_HANDLING")
|
||||||
|
Refresh_IndexeMan(oSelectedItem.Guid)
|
||||||
|
End If
|
||||||
|
|
||||||
If USER_LANGUAGE = "de-DE" Then
|
|
||||||
oMessage = $"Der Pfad für das ausgewählte Profil ist nicht erreichbar:{vbNewLine}[{oNewDestination}].{vbNewLine}{vbNewLine}Bitte wählen Sie ein anderes Profil."
|
|
||||||
Else
|
Else
|
||||||
oMessage = $"Profile Path is not available:{vbNewLine}[{oNewDestination}].{vbNewLine}{vbNewLine}Please select another profile."
|
MsgBox("Es konnte keine Session aufgebaut werden.")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
MsgBox(oMessage, MsgBoxStyle.Information, Text)
|
|
||||||
ComboboxDoctype.EditValue = Nothing
|
|
||||||
Else
|
Else
|
||||||
|
MsgBox("Es konnte keine Windream-Verbindung aufgebaut werden.")
|
||||||
CURRENT_DOKART_DUPLICATE_HANDLING = oDocType.Item("DUPLICATE_HANDLING")
|
|
||||||
Refresh_IndexeMan(oSelectedItem.Guid)
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user