BugFix und WMFileCreate
This commit is contained in:
@@ -29,8 +29,8 @@ Public Class frmValidator
|
||||
'speichert die DocumentDaten
|
||||
Private navStep As String = Nothing
|
||||
|
||||
Public Shared myWMDocumentPath As String
|
||||
Public PathToWM_File As String
|
||||
Public Shared WMDocPathWindows As String
|
||||
Public WMDocFileString As String
|
||||
|
||||
Dim OLD_Document_Path As String = ""
|
||||
Dim ValueDTP As Date
|
||||
@@ -97,7 +97,7 @@ Public Class frmValidator
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Error in Load FormLayout: " & ex.Message)
|
||||
End Try
|
||||
Select Case Path.GetExtension(myWMDocumentPath).ToLower
|
||||
Select Case Path.GetExtension(WMDocPathWindows).ToLower
|
||||
Case ".pdf"
|
||||
Select Case VIEWER_PDF
|
||||
Case "internal"
|
||||
@@ -148,7 +148,7 @@ Public Class frmValidator
|
||||
Kill_PDFAcrobat()
|
||||
Else
|
||||
If pdfxchange = True Or sumatra = True Then
|
||||
Close_PDF_Viewer(myWMDocumentPath)
|
||||
Close_PDF_Viewer(WMDocPathWindows)
|
||||
End If
|
||||
KillU_Viewer()
|
||||
End If
|
||||
@@ -1283,9 +1283,9 @@ Public Class frmValidator
|
||||
End Try
|
||||
End Sub
|
||||
Sub Open_PDF_withStandard()
|
||||
If myWMDocumentPath.ToLower.EndsWith(".pdf") = True Then
|
||||
If WMDocPathWindows.ToLower.EndsWith(".pdf") = True Then
|
||||
Dim Proc As New System.Diagnostics.Process
|
||||
Dim psi As New ProcessStartInfo(PathToWM_File)
|
||||
Dim psi As New ProcessStartInfo(WMDocPathWindows)
|
||||
psi.WindowStyle = ProcessWindowStyle.Minimized
|
||||
Proc.EnableRaisingEvents = True
|
||||
Proc.StartInfo = psi
|
||||
@@ -1330,43 +1330,12 @@ Public Class frmValidator
|
||||
LOGGER.Debug("Old Document_Path: " & OLD_Document_Path)
|
||||
newGUID = Next_GUID(OLD_Document_Path, CURRENT_ProfilGUID, PROFIL_sortbynewest)
|
||||
|
||||
myWMDocumentPath = ""
|
||||
WMDocPathWindows = ""
|
||||
CURRENT_DOC_PATH = ""
|
||||
CURRENT_WMFILE = Nothing
|
||||
If newGUID > 0 Then
|
||||
LOGGER.Debug("newGUID: " & newGUID.ToString)
|
||||
myWMDocumentPath = TBPM_PROFILE_FILESTableAdapter.CmdGetFilePath_2_GUID(newGUID)
|
||||
LOGGER.Debug($"myWMDocumentPath: {myWMDocumentPath}")
|
||||
myWMDocumentPath = myWMDocumentPath.Replace("W:", "\\windream\objects")
|
||||
myWMDocumentPath = myWMDocumentPath.Replace("K:", "\\windream\objects")
|
||||
|
||||
PathToWM_File = GetFilesystemDocPath()
|
||||
LOGGER.Debug("Filesystem_Document_Path: " & PathToWM_File)
|
||||
CURRENT_DOC_PATH = myWMDocumentPath
|
||||
LOGGER.Debug("CURRENT_DOC_PATH: " & CURRENT_DOC_PATH)
|
||||
|
||||
LOGGER.Debug("Überprüfen ob File existiert?")
|
||||
Dim i As Integer = 0
|
||||
Do While allgFunk.file_exists(myWMDocumentPath, _windream) = False And newGUID <> 0
|
||||
i = i + 1
|
||||
If i > 800 Then
|
||||
allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Get_Next_GUID - Datei nicht vorhanden!", Environment.UserName)
|
||||
LOGGER.Info(" >> ACHTUNG: Ausnahme in GetNextGUID - Datei nicht vorhanden")
|
||||
Dim Del = "DELETE FROM TBPM_PROFILE_FILES where GUID = " & newGUID
|
||||
ClassDatabase.Execute_non_Query(Del, True)
|
||||
oErrorMessage = "Die windream-Datei existiert nicht!"
|
||||
myWMDocumentPath = ""
|
||||
CURRENT_DOC_PATH = ""
|
||||
Return 0
|
||||
End If
|
||||
Loop
|
||||
OLD_Document_Path = myWMDocumentPath
|
||||
'If PROFIL_sortbynewest Then
|
||||
' newGUID = TBPM_PROFILE_FILESTableAdapter.cmdgetNextFile_GUID_Newest(PROFIL_ID, Document_Path, Environment.UserName)
|
||||
' Document_Path = TBPM_PROFILE_FILESTableAdapter.CmdGetFilePath_2_GUID(newGUID)
|
||||
'Else
|
||||
' newGUID = TBPM_PROFILE_FILESTableAdapter.cmdGetNextFile_GUID(PROFIL_ID, Document_Path, Environment.UserName)
|
||||
' Document_Path = TBPM_PROFILE_FILESTableAdapter.CmdGetFilePath_2_GUID(newGUID)
|
||||
'End If
|
||||
Else
|
||||
LOGGER.Info(" >> ACHTUNG: Ausnahme in GetNextGUID - Es konnte keine GUID abgerufen werden!")
|
||||
newGUID = 0
|
||||
@@ -1397,7 +1366,7 @@ Public Class frmValidator
|
||||
AnzDoks = DT.Rows.Count
|
||||
Else
|
||||
AnzDoks = 1
|
||||
myWMDocumentPath = CURRENT_DOC_PATH
|
||||
WMDocPathWindows = CURRENT_DOC_PATH
|
||||
End If
|
||||
|
||||
tsslblDocID.Text = "Document-ID: " & CURRENT_DOC_ID & " - GUID: " & CURRENT_DOC_GUID
|
||||
@@ -1413,7 +1382,7 @@ Public Class frmValidator
|
||||
End If
|
||||
End If
|
||||
If pdfxchange = True Or sumatra = True Or VIEWER_PDF = "system" Then
|
||||
Close_PDF_Viewer(myWMDocumentPath)
|
||||
Close_PDF_Viewer(WMDocPathWindows)
|
||||
End If
|
||||
If CURRENT_WMFILE Is Nothing = False Then
|
||||
If CURRENT_WMFILE.aLocked Then
|
||||
@@ -1433,32 +1402,63 @@ Public Class frmValidator
|
||||
pnlpdf.Visible = visible
|
||||
|
||||
End Sub
|
||||
Private Function GetFilesystemDocPath() As String
|
||||
LOGGER.Debug($"in GetFilesystemDocumentPath...'")
|
||||
Dim oWMRELPATH = CURRENT_DT_CONFIG.Rows.Item(0).Item("WM_REL_PATH")
|
||||
If IsDBNull(oWMRELPATH) Then
|
||||
LOGGER.Debug($"WM_REL_PATH is null'")
|
||||
CURRENT_DT_CONFIG.Rows.Item(0).Item("WM_REL_PATH") = "\\windream\objects"
|
||||
CURRENT_DT_CONFIG.AcceptChanges()
|
||||
Private Function CreateWMObject() As String
|
||||
LOGGER.Debug($"in GetWMDocFileString...'")
|
||||
Dim oWMRELPATH As String = CURRENT_DT_CONFIG.Rows.Item(0).Item("WM_REL_PATH")
|
||||
If oWMRELPATH.EndsWith("\") = False Then
|
||||
oWMRELPATH = oWMRELPATH & "\"
|
||||
End If
|
||||
Dim oResult As String
|
||||
If myWMDocumentPath.StartsWith(oWMRELPATH) Then
|
||||
oResult = myWMDocumentPath
|
||||
Else
|
||||
oResult = Path.Combine(oWMRELPATH, myWMDocumentPath)
|
||||
Dim oWMOwnPath = WMDocPathWindows.Replace(oWMRELPATH, "")
|
||||
LOGGER.Debug($"oWMOwnPath: {oWMOwnPath}")
|
||||
Try
|
||||
Dim oNormalizedPath = WINDREAM.NormalizePath(oWMOwnPath)
|
||||
CURRENT_WMFILE = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, oNormalizedPath)
|
||||
WMDocFileString = oNormalizedPath
|
||||
LOGGER.Debug("WMDocFileString: " & WMDocFileString)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Dim _err1 As Boolean = False
|
||||
LOGGER.Error(ex)
|
||||
allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "error in creatin WMObject - DocGUID: " & CURRENT_DOC_GUID & " - ERROR: " & ex.Message, Environment.UserName)
|
||||
LOGGER.Info("Unexpected error creating WMObject(1) in GetWMDocFileString: " & ex.Message)
|
||||
LOGGER.Info("Error Number: " & Err.Number.ToString)
|
||||
errormessage = $"Could not create a WMObject(1) for [{oWMOwnPath}]!"
|
||||
frmError.ShowDialog()
|
||||
WMDocFileString = ""
|
||||
Return False
|
||||
|
||||
End Try
|
||||
|
||||
End If
|
||||
Return oResult
|
||||
End Function
|
||||
Private Function GetWMDocPathWindows(_CheckStandard As Integer)
|
||||
Dim oResult As String
|
||||
Dim oSQL = $"SELECT [dbo].[FNPM_GET_WM_FILE_PATH] ({CURRENT_DOC_GUID},{_CheckStandard})"
|
||||
oResult = ClassDatabase.Execute_Scalar(oSQL, CONNECTION_STRING)
|
||||
LOGGER.Debug($"Checking file [{oResult}] exists?...")
|
||||
If File.Exists(oResult) = False Then
|
||||
LOGGER.Debug($"GetWMDocPathWindows returned false - trying with standard again...")
|
||||
oSQL = $"SELECT [dbo].[FNPM_GET_WM_FILE_PATH] ({CURRENT_DOC_GUID},1)"
|
||||
oResult = ClassDatabase.Execute_Scalar(oSQL, CONNECTION_STRING)
|
||||
LOGGER.Debug($"Checking file [{oResult}] exists?...")
|
||||
If File.Exists(oResult) = False Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
WMDocPathWindows = oResult
|
||||
OLD_Document_Path = WMDocPathWindows
|
||||
CURRENT_DOC_PATH = WMDocPathWindows
|
||||
LOGGER.Debug($"CURRENT_DOC_PATH: {CURRENT_DOC_PATH}")
|
||||
Return True
|
||||
|
||||
End Function
|
||||
Sub Load_Next_Document(first As Boolean)
|
||||
|
||||
CURRENT_WMFILE = Nothing
|
||||
LOGGER.Debug("CURRENT_WMFILE nothing gesetzt")
|
||||
activate_controls(False)
|
||||
oErrorMessage = ""
|
||||
myWMDocumentPath = ""
|
||||
PathToWM_File = ""
|
||||
WMDocPathWindows = ""
|
||||
WMDocFileString = ""
|
||||
|
||||
CURRENT_HTML_DOC = ""
|
||||
|
||||
@@ -1488,56 +1488,52 @@ Public Class frmValidator
|
||||
LOGGER.Debug($"CURRENT_JUMP_DOC_GUID: {CURRENT_JUMP_DOC_GUID}'")
|
||||
If CURRENT_JUMP_DOC_GUID = 0 Then
|
||||
CURRENT_DOC_GUID = Get_Next_GUID()
|
||||
Else
|
||||
LOGGER.Debug($"CURRENT_DOC_PATH: {CURRENT_DOC_PATH}' later: myWMDocumentPath")
|
||||
myWMDocumentPath = CURRENT_DOC_PATH
|
||||
PathToWM_File = GetFilesystemDocPath()
|
||||
End If
|
||||
|
||||
GetWMDocPathWindows(0)
|
||||
LOGGER.Debug("Dokument-GUID: '" & CURRENT_DOC_GUID.ToString & "'")
|
||||
If CURRENT_DOC_GUID > 0 Then
|
||||
If CURRENT_DOC_GUID > 0 And CreateWMObject() = True Then
|
||||
|
||||
'Beschriftung des Navigators
|
||||
'lblNavigator_anzDok.Text = position & " of " & Anzahl_ValDoks & " files"
|
||||
If myWMDocumentPath <> String.Empty Then
|
||||
If WMDocPathWindows <> String.Empty Then
|
||||
' >> >> >> >> >> >>##### Das Dokument in Bearbeitung nehmen ###########################
|
||||
TBPM_PROFILE_FILESTableAdapter.CmdSETWORK(True, Environment.UserName, CURRENT_DOC_GUID)
|
||||
' ############ Infos eintragen #################
|
||||
tsslblDocID.Text = "Document-ID: " & CURRENT_DOC_ID & " - DocGUID: " & CURRENT_DOC_GUID
|
||||
' txtDateipfad.Text = Document_Path
|
||||
tstrlbl_Info.Text = "Datei " & docCounter.ToString & " von " & Anzahl_ValDoks.ToString
|
||||
LOGGER.Info(">> Validierung für Dokument '" & myWMDocumentPath & "' gestartet")
|
||||
LOGGER.Info(">> Validierung für Dokument '" & WMDocPathWindows & "' gestartet")
|
||||
|
||||
Try
|
||||
CURRENT_WMFILE = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, WINDREAM.NormalizePath(myWMDocumentPath))
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Fehler bei Erzeugen windream-Objekt - DocGUID: " & CURRENT_DOC_GUID & " - ERROR: " & ex.Message, Environment.UserName)
|
||||
LOGGER.Info("Fehler bei Erzeugen windream-Objekt in (LoadNextDokument): " & ex.Message)
|
||||
LOGGER.Info("Error Number: " & Err.Number.ToString)
|
||||
Dim _err1 As Boolean = False
|
||||
'Nochmaliger Versuch windream zu initialiseren
|
||||
If Init_windream() = True Then
|
||||
Try
|
||||
CURRENT_WMFILE = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, myWMDocumentPath)
|
||||
Catch ex1 As Exception
|
||||
LOGGER.Info("Fehler bei 2. Versuch windream-Objekt: " & ex1.Message)
|
||||
oErrorMessage = "1-Es besteht ein Problem beim Anmelden an windream - Bitte wenden Sie sich an Digital Data!"
|
||||
_err1 = True
|
||||
End Try
|
||||
Else
|
||||
oErrorMessage = "2-Es besteht ein Problem beim Anmelden an windream - Bitte wenden Sie sich an Digital Data!"
|
||||
_err1 = True
|
||||
End If
|
||||
If _err1 = True Then
|
||||
errormessage = oErrorMessage
|
||||
frmError.ShowDialog()
|
||||
Exit Sub
|
||||
End If
|
||||
'Try
|
||||
' CURRENT_WMFILE = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, WINDREAM.NormalizePath(WMDocFileString))
|
||||
'Catch ex As Exception
|
||||
' LOGGER.Error(ex)
|
||||
' allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Fehler bei Erzeugen windream-Objekt - DocGUID: " & CURRENT_DOC_GUID & " - ERROR: " & ex.Message, Environment.UserName)
|
||||
' LOGGER.Info("Fehler bei Erzeugen windream-Objekt in (LoadNextDokument): " & ex.Message)
|
||||
' LOGGER.Info("Error Number: " & Err.Number.ToString)
|
||||
' Dim _err1 As Boolean = False
|
||||
' 'Nochmaliger Versuch windream zu initialiseren
|
||||
' If Init_windream() = True Then
|
||||
' Try
|
||||
' CURRENT_WMFILE = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, WINDREAM.NormalizePath(WMDocPathWindows))
|
||||
' Catch ex1 As Exception
|
||||
' LOGGER.Info("1- Fehler bei 2. Versuch windream-Objekt: " & ex1.Message)
|
||||
' oErrorMessage = $"1-Could not create a WMObject for [{WMDocPathWindows}]!"
|
||||
' _err1 = True
|
||||
' End Try
|
||||
' Else
|
||||
' oErrorMessage = "2-Could not login to ECM - Please check Your log for further details!"
|
||||
' _err1 = True
|
||||
' End If
|
||||
' If _err1 = True Then
|
||||
' errormessage = oErrorMessage
|
||||
' frmError.ShowDialog()
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
End Try
|
||||
'End Try
|
||||
|
||||
LOGGER.Debug("Windream-Dokument geladen und gelockt")
|
||||
LOGGER.Debug("WMDoc created...")
|
||||
oErrorMessage = Windream_get_Doc_info()
|
||||
|
||||
LOGGER.Debug("Windream-Dok Info geholt")
|
||||
@@ -1547,7 +1543,7 @@ Public Class frmValidator
|
||||
|
||||
load_viewer()
|
||||
|
||||
If myWMDocumentPath.ToLower.EndsWith(".pdf") Then
|
||||
If WMDocPathWindows.ToLower.EndsWith(".pdf") Then
|
||||
ToolStripButtonAnnotation.Visible = True
|
||||
Else
|
||||
ToolStripButtonAnnotation.Visible = False
|
||||
@@ -1591,6 +1587,7 @@ Public Class frmValidator
|
||||
End If
|
||||
End If
|
||||
activate_controls(True)
|
||||
Me.BringToFront()
|
||||
Else
|
||||
errormessage = oErrorMessage
|
||||
frmError.ShowDialog()
|
||||
@@ -1625,19 +1622,19 @@ Public Class frmValidator
|
||||
If VIEWER_ALL = "uviewer" Then
|
||||
pdfxchange = False
|
||||
sumatra = False
|
||||
If PathToWM_File.ToLower.EndsWith(".msg") Then
|
||||
If WMDocPathWindows.ToLower.EndsWith(".msg") Then
|
||||
Show_Email()
|
||||
Else
|
||||
ShowFile_UniversalViewer(PathToWM_File)
|
||||
ShowFile_UniversalViewer(WMDocPathWindows)
|
||||
End If
|
||||
ElseIf VIEWER_ALL = "docview" Then
|
||||
PdfControls_visible(False)
|
||||
If PathToWM_File.ToLower.EndsWith(".pdf") And VIEWER_PDF <> "none" Then
|
||||
If WMDocPathWindows.ToLower.EndsWith(".pdf") And VIEWER_PDF <> "none" Then
|
||||
Select Case VIEWER_PDF
|
||||
Case "internal"
|
||||
SplitContainer1.Panel2Collapsed = False
|
||||
PdfViewer1.LoadDocument(PathToWM_File)
|
||||
LOGGER.Debug("Internal Viewer Path: " & PathToWM_File)
|
||||
PdfViewer1.LoadDocument(WMDocPathWindows)
|
||||
LOGGER.Debug("Internal Viewer Path: " & WMDocPathWindows)
|
||||
PdfControls_visible(True)
|
||||
Me.Size = My.Settings.frmValidation_Size_PDFViewer
|
||||
'PdfViewer1.ZoomFactor = PDFViewer_ZoomMode
|
||||
@@ -1646,14 +1643,14 @@ Public Class frmValidator
|
||||
sumatra = False
|
||||
Case "pdfxchange"
|
||||
SplitContainer1.Panel2Collapsed = True
|
||||
Open_PDFXCHANGE(PathToWM_File)
|
||||
Open_PDFXCHANGE(WMDocPathWindows)
|
||||
pdfxchange = True
|
||||
sumatra = False
|
||||
System.Threading.Thread.Sleep(1000)
|
||||
Me.Size = My.Settings.frmValidatorSize
|
||||
Case "sumatra"
|
||||
SplitContainer1.Panel2Collapsed = True
|
||||
Open_Sumatra(PathToWM_File)
|
||||
Open_Sumatra(WMDocPathWindows)
|
||||
sumatra = True
|
||||
pdfxchange = False
|
||||
System.Threading.Thread.Sleep(1000)
|
||||
@@ -1666,7 +1663,7 @@ Public Class frmValidator
|
||||
System.Threading.Thread.Sleep(1000)
|
||||
Me.Size = My.Settings.frmValidatorSize
|
||||
End Select
|
||||
ElseIf PathToWM_File.ToLower.EndsWith(".msg") Then
|
||||
ElseIf WMDocPathWindows.ToLower.EndsWith(".msg") Then
|
||||
Show_Email()
|
||||
Else
|
||||
SplitContainer1.Panel2Collapsed = True
|
||||
@@ -1695,44 +1692,44 @@ Public Class frmValidator
|
||||
Sub Show_Email()
|
||||
|
||||
Me.grpBetreff.Dock = DockStyle.Top
|
||||
Me.grpbxMailBody.Dock = DockStyle.Fill
|
||||
Dim msg_email As New Msg.Message(myWMDocumentPath)
|
||||
'Eine tempfile generieren
|
||||
Dim tempFilename = My.Computer.FileSystem.GetTempFileName()
|
||||
Dim name = Path.GetFileNameWithoutExtension(tempFilename)
|
||||
tempFilename = Path.Combine(Path.GetDirectoryName(tempFilename), name & ".html")
|
||||
'tempfile löschen
|
||||
If My.Computer.FileSystem.FileExists(tempFilename) Then
|
||||
My.Computer.FileSystem.DeleteFile(tempFilename)
|
||||
End If
|
||||
Me.grpbxMailBody.Dock = DockStyle.Fill
|
||||
Dim msg_email As New Msg.Message(WMDocPathWindows)
|
||||
'Eine tempfile generieren
|
||||
Dim tempFilename = My.Computer.FileSystem.GetTempFileName()
|
||||
Dim name = Path.GetFileNameWithoutExtension(tempFilename)
|
||||
tempFilename = Path.Combine(Path.GetDirectoryName(tempFilename), name & ".html")
|
||||
'tempfile löschen
|
||||
If My.Computer.FileSystem.FileExists(tempFilename) Then
|
||||
My.Computer.FileSystem.DeleteFile(tempFilename)
|
||||
End If
|
||||
|
||||
Me.txtBetreff.Text = msg_email.Subject
|
||||
Try
|
||||
Dim wFile As System.IO.FileStream
|
||||
Dim byteData() As Byte
|
||||
byteData = msg_email.BodyHtml
|
||||
Me.txtBetreff.Text = msg_email.Subject
|
||||
Try
|
||||
Dim wFile As System.IO.FileStream
|
||||
Dim byteData() As Byte
|
||||
byteData = msg_email.BodyHtml
|
||||
|
||||
' MsgBox(msg_email.InternetCodePage)
|
||||
' wFile = New FileStream(tempFilename, FileMode.Append)
|
||||
' wFile.Write(byteData, 0, byteData.Length)
|
||||
' wFile.Close()
|
||||
'Catch ex As IOException
|
||||
' MsgBox(ex.ToString)
|
||||
'End Try
|
||||
' MsgBox(msg_email.InternetCodePage)
|
||||
' wFile = New FileStream(tempFilename, FileMode.Append)
|
||||
' wFile.Write(byteData, 0, byteData.Length)
|
||||
' wFile.Close()
|
||||
'Catch ex As IOException
|
||||
' MsgBox(ex.ToString)
|
||||
'End Try
|
||||
|
||||
Dim vIn() As Byte = msg_email.BodyHtml
|
||||
Dim vOut As String = System.Text.Encoding.UTF8.GetString(vIn)
|
||||
File.WriteAllText(tempFilename, vOut, System.Text.Encoding.UTF8)
|
||||
Dim vIn() As Byte = msg_email.BodyHtml
|
||||
Dim vOut As String = System.Text.Encoding.UTF8.GetString(vIn)
|
||||
File.WriteAllText(tempFilename, vOut, System.Text.Encoding.UTF8)
|
||||
|
||||
CURRENT_HTML_DOC = tempFilename
|
||||
Me.tslblWebbrowser.Text = CURRENT_HTML_DOC
|
||||
WebBrowser.Navigate("file:///" & CURRENT_HTML_DOC)
|
||||
SplitContainer1.Panel2Collapsed = False
|
||||
Me.Size = My.Settings.frmValidation_Size_Email
|
||||
Me.grpbxMailBody.Visible = True
|
||||
Me.grpBetreff.Visible = True
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
CURRENT_HTML_DOC = tempFilename
|
||||
Me.tslblWebbrowser.Text = CURRENT_HTML_DOC
|
||||
WebBrowser.Navigate("file:///" & CURRENT_HTML_DOC)
|
||||
SplitContainer1.Panel2Collapsed = False
|
||||
Me.Size = My.Settings.frmValidation_Size_Email
|
||||
Me.grpbxMailBody.Visible = True
|
||||
Me.grpBetreff.Visible = True
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
errormessage = "Unvorhergesehener Fehler bei Show_Email:" & ex.Message
|
||||
LOGGER.Info("Unvorhergesehener Fehler in Show_Email: " & ex.Message)
|
||||
My.Settings.Save()
|
||||
@@ -1756,6 +1753,7 @@ Public Class frmValidator
|
||||
|
||||
'End If
|
||||
Try
|
||||
LOGGER.Debug($"GetVariableValue [{INDEX_DMS_ERSTELLT}]...")
|
||||
CURRENT_DOC_CREATION_DATE = CURRENT_WMFILE.GetVariableValue(INDEX_DMS_ERSTELLT)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
@@ -1791,9 +1789,10 @@ Public Class frmValidator
|
||||
LOGGER.Debug("DMS-Erstellt aus WD: " & CURRENT_DOC_CREATION_DATE)
|
||||
|
||||
Try
|
||||
LOGGER.Debug($"GetVariableValue [{INDEX_DMS_ERSTELLT_ZEIT}]...")
|
||||
CURRENT_DOC_CREATION_TIME = CURRENT_WMFILE.GetVariableValue(INDEX_DMS_ERSTELLT_ZEIT)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
|
||||
If ex.Message.Contains("Variable: " & INDEX_DMS_ERSTELLT_ZEIT & " not found!") Then
|
||||
LOGGER.Info("1. Ausnahme in Windream_get_Doc_info: Variable: " & INDEX_DMS_ERSTELLT_ZEIT & " not found", True)
|
||||
If INDEX_DMS_ERSTELLT = "DMS Created" Then
|
||||
@@ -1817,9 +1816,10 @@ Public Class frmValidator
|
||||
'SaveMySettingsValue("IDX_DMS_ERSTELLT", "DMS Created")
|
||||
'SaveMySettingsValue("IDX_DMS_ERSTELLT_ZEIT", "DMS Created Time")
|
||||
End If
|
||||
|
||||
LOGGER.Debug($"GetVariableValue (2) [{INDEX_DMS_ERSTELLT_ZEIT}]...")
|
||||
CURRENT_DOC_CREATION_TIME = CURRENT_WMFILE.GetVariableValue(INDEX_DMS_ERSTELLT_ZEIT)
|
||||
Else
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Fehler in Windream_get_Doc_info 3: " & ex.Message)
|
||||
Return "Fehler in Windream_get_Doc_info 3: " & ex.Message
|
||||
End If
|
||||
@@ -2449,7 +2449,7 @@ Public Class frmValidator
|
||||
Dim oArrlist As New List(Of String)
|
||||
For Each oVectorRow As Object In oWindreamValue
|
||||
Dim Ocontent = oVectorRow.ToString
|
||||
oArrlist.Add(oVectorRow.ToString)
|
||||
oArrlist.Add(Ocontent)
|
||||
Next
|
||||
oLookup.SelectedValues = oArrlist
|
||||
_CURRENT_INDEX_ARRAY(oCount, 1) = oWindreamValue.ToString
|
||||
@@ -2787,7 +2787,7 @@ Public Class frmValidator
|
||||
ClassDatabase.Execute_non_Query(ins)
|
||||
|
||||
Close_document_viewer()
|
||||
If myWMDocumentPath.ToLower.EndsWith(".pdf") Then
|
||||
If WMDocPathWindows.ToLower.EndsWith(".pdf") Then
|
||||
If Not IsNothing(WORK_HISTORY_ENTRY) Then
|
||||
If CBool(CURRENT_DT_PROFILE.Rows(0).Item("ANNOTATE_WORK_HISTORY_ENTRY")) = True Then
|
||||
sql = String.Format("SELECT * FROM TBPM_FILES_WORK_HISTORY WHERE GUID = (SELECT MAX(GUID) FROM TBPM_FILES_WORK_HISTORY WHERE PROFIL_ID = {0} AND DOC_ID = {1})", CURRENT_ProfilGUID, CURRENT_DOC_ID)
|
||||
@@ -2818,7 +2818,7 @@ Public Class frmValidator
|
||||
|
||||
'wenn Move2Folder aktiviert wurde
|
||||
If Move2Folder <> "" Then
|
||||
idxerr_message = allgFunk.Move2Folder(myWMDocumentPath, Move2Folder, CURRENT_ProfilGUID, _windream)
|
||||
idxerr_message = allgFunk.Move2Folder(WMDocPathWindows, Move2Folder, CURRENT_ProfilGUID, _windream)
|
||||
If idxerr_message <> "" Then
|
||||
errormessage = "Fehler bei Move2Folder:" & vbNewLine & idxerr_message
|
||||
My.Settings.Save()
|
||||
@@ -2827,7 +2827,7 @@ Public Class frmValidator
|
||||
End If
|
||||
End If
|
||||
'Validierungsfile löschen wenn vorhanden
|
||||
allgFunk.Delete_xffres(myWMDocumentPath, _windream)
|
||||
allgFunk.Delete_xffres(WMDocPathWindows, _windream)
|
||||
LOGGER.Debug("Delete_xffres ausgeführt")
|
||||
LOGGER.Debug("All Input clear")
|
||||
Anzahl_validierte_Dok += 1
|
||||
@@ -3082,7 +3082,12 @@ Public Class frmValidator
|
||||
Try
|
||||
If oRegexMatch <> String.Empty AndAlso Not Regex.IsMatch(oControl.Text, oRegexMatch) Then
|
||||
oMissing = True
|
||||
oErrorMessage = "Falsche Eingabe in Textbox '" & oControl.Name & "'"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
oErrorMessage = "Wrong input in textbox '" & oControl.Name & "'"
|
||||
Else
|
||||
oErrorMessage = "Falsche Eingabe in Textbox '" & oControl.Name & "'"
|
||||
End If
|
||||
|
||||
|
||||
If oRegexMessage <> String.Empty Then
|
||||
oErrorMessage &= ":" & vbCrLf & oRegexMessage
|
||||
@@ -3095,7 +3100,12 @@ Public Class frmValidator
|
||||
'Als erstes überprüfen ob überhaupt etwas eingetragen worden ist
|
||||
If Check_Missing(oControl, "txt") = True And oIsRequired = True Then 'NICHTS EINGETRAGEN
|
||||
oMissing = True
|
||||
oErrorMessage = "Fehlende Eingabe in Textbox '" & oControl.Name & "'"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
oErrorMessage = "Missing input in textbox '" & oControl.Name & "'"
|
||||
Else
|
||||
oErrorMessage = "Fehlende Eingabe in Textbox '" & oControl.Name & "'"
|
||||
End If
|
||||
|
||||
oControl.BackColor = Color.Red
|
||||
Exit For
|
||||
Else
|
||||
@@ -3610,7 +3620,7 @@ Public Class frmValidator
|
||||
Private Sub DateiÖffnenToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles DateiÖffnenToolStripMenuItem.Click
|
||||
Try
|
||||
Dim Proc As New System.Diagnostics.Process
|
||||
Dim psi As New ProcessStartInfo(PathToWM_File)
|
||||
Dim psi As New ProcessStartInfo(WMDocPathWindows)
|
||||
Proc.EnableRaisingEvents = True
|
||||
Proc.StartInfo = psi
|
||||
Proc.Start()
|
||||
@@ -3631,8 +3641,8 @@ Public Class frmValidator
|
||||
'Das Dokument freigeben
|
||||
TBPM_PROFILE_FILESTableAdapter.CmdSETWORK(False, "", CURRENT_DOC_GUID)
|
||||
|
||||
If TBPM_FILES_USER_NOT_INDEXEDTableAdapter.FileExists(Environment.UserName, CURRENT_ProfilGUID, myWMDocumentPath) = 0 Then
|
||||
TBPM_FILES_USER_NOT_INDEXEDTableAdapter.cmdInsert(Environment.UserName, CURRENT_ProfilGUID, myWMDocumentPath)
|
||||
If TBPM_FILES_USER_NOT_INDEXEDTableAdapter.FileExists(Environment.UserName, CURRENT_ProfilGUID, WMDocPathWindows) = 0 Then
|
||||
TBPM_FILES_USER_NOT_INDEXEDTableAdapter.cmdInsert(Environment.UserName, CURRENT_ProfilGUID, WMDocPathWindows)
|
||||
End If
|
||||
|
||||
LOGGER.Debug("Dokument freigegeben")
|
||||
@@ -3652,7 +3662,7 @@ Public Class frmValidator
|
||||
Close_document_viewer()
|
||||
'Aus der Tabelle löschen
|
||||
TBPM_PROFILE_FILESTableAdapter.CmdDelete(CURRENT_DOC_GUID)
|
||||
Dim resul = allgFunk.Delete_xffres(PathToWM_File, _windream)
|
||||
Dim resul = allgFunk.Delete_xffres(WMDocPathWindows, _windream)
|
||||
If resul = Nothing Or resul = True Then
|
||||
If Delete_File() = True Then
|
||||
'MsgBox("Die Datei wurde erfolgreich aus windream gelöscht!" & vbNewLine & "Es wird nun die nächste Datei angezeigt!", MsgBoxStyle.Information, "Erfolgsmeldung:")
|
||||
@@ -3728,12 +3738,12 @@ Public Class frmValidator
|
||||
End Structure
|
||||
|
||||
Private Sub DateieigenschaftenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DateieigenschaftenToolStripMenuItem.Click
|
||||
If myWMDocumentPath <> "" Then
|
||||
If WMDocPathWindows <> "" Then
|
||||
Cursor = Cursors.WaitCursor
|
||||
Dim oShellExecuteInfo As New SHELLEXECUTEINFO
|
||||
oShellExecuteInfo.cbSize = Marshal.SizeOf(oShellExecuteInfo)
|
||||
oShellExecuteInfo.lpVerb = "properties"
|
||||
oShellExecuteInfo.lpFile = PathToWM_File
|
||||
oShellExecuteInfo.lpFile = WMDocPathWindows
|
||||
oShellExecuteInfo.nShow = SW_SHOW
|
||||
oShellExecuteInfo.fMask = SEE_MASK_INVOKEIDLIST
|
||||
If Not ShellExecuteEx(oShellExecuteInfo) Then
|
||||
@@ -3745,8 +3755,8 @@ Public Class frmValidator
|
||||
|
||||
End Sub
|
||||
Private Sub frmValidation_ResizeEnd(sender As Object, e As EventArgs) Handles Me.ResizeEnd
|
||||
If myWMDocumentPath Is Nothing = False Then
|
||||
Select Case Path.GetExtension(myWMDocumentPath).ToLower
|
||||
If WMDocPathWindows Is Nothing = False Then
|
||||
Select Case Path.GetExtension(WMDocPathWindows).ToLower
|
||||
Case ".pdf"
|
||||
Select Case VIEWER_PDF
|
||||
Case "internal"
|
||||
@@ -3820,7 +3830,7 @@ Public Class frmValidator
|
||||
|
||||
Private Sub ToolStripButtonAnnotation_Click(sender As Object, e As EventArgs) Handles ToolStripButtonAnnotation.Click
|
||||
PdfViewer1.CloseDocument()
|
||||
Close_PDF_Viewer(myWMDocumentPath)
|
||||
Close_PDF_Viewer(WMDocPathWindows)
|
||||
Application.DoEvents()
|
||||
|
||||
frmAnnotations.ShowDialog()
|
||||
|
||||
Reference in New Issue
Block a user