This commit is contained in:
SchreiberM
2016-09-27 13:23:30 +02:00
parent 8f3122c24b
commit 51bd2cdb1d
27 changed files with 2750 additions and 1921 deletions

View File

@@ -78,7 +78,7 @@ Public Class frmRecordView
Dim item As ClassWindreamDocGrid.WindreamDocGridComboboxItem = ComboBox.SelectedItem
Dim value As String = item.Value
Dim configId As Integer = item.ConfigID
Dim docId As Integer = ClassWindreamDocGrid.RESULT_DOC_ID
Dim docId As Integer = ClassWindreamDocGrid.SELECTED_DOC_ID
Dim user As String = Environment.UserName
Dim Sql As String = String.Format("EXEC PRPMO_DOC_VALUE {0}, {1}, '{2}', '{3}'", docId, configId, value, Environment.UserName)
@@ -336,84 +336,122 @@ Public Class frmRecordView
End Sub
Private Sub GridViewDoc_Search_FocusedRowChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs)
Try
ClassWindreamDocGrid.RESULT_DOC_PATH = GridViewDoc_Search.GetFocusedRowCellValue(GridViewDoc_Search.Columns("FULLPATH"))
Catch ex As Exception
ClassWindreamDocGrid.RESULT_DOC_PATH = Nothing
End Try
ClassWindreamDocGrid.GetDocItems(GridViewDoc_Search)
'Try
' ClassWindreamDocGrid.RESULT_DOC_PATH = GridViewDoc_Search.GetFocusedRowCellValue(GridViewDoc_Search.Columns("FULLPATH"))
'Catch ex As Exception
' ClassWindreamDocGrid.RESULT_DOC_PATH = Nothing
'End Try
End Sub
Private Sub GridControlDocSearch_DoubleClick(sender As Object, e As EventArgs)
Try
ClassWindreamDocGrid.RESULT_DOC_PATH = GridViewDoc_Search.GetFocusedRowCellValue(GridViewDoc_Search.Columns("FULLPATH"))
Catch ex As Exception
ClassWindreamDocGrid.RESULT_DOC_PATH = Nothing
End Try
ClassHelper.File_open(ClassWindreamDocGrid.RESULT_DOC_PATH, 0)
ClassWindreamDocGrid.GetDocItems(GridViewDoc_Search)
'Try
' ClassWindreamDocGrid.RESULT_DOC_PATH = GridViewDoc_Search.GetFocusedRowCellValue(GridViewDoc_Search.Columns("FULLPATH"))
'Catch ex As Exception
' ClassWindreamDocGrid.RESULT_DOC_PATH = Nothing
'End Try
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
MsgBox("Could not read File Parameters(DoubleClick)!", MsgBoxStyle.Exclamation)
Exit Sub
End If
For Each row As DataRow In ClassWindreamDocGrid.DT_RESULTFILES.Rows
ClassHelper.File_open(row.Item("DOC_PATH"), 0)
Next
End Sub
Private Sub DateiÖffnenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DateiÖffnenToolStripMenuItem.Click
ClassHelper.File_open(ClassWindreamDocGrid.RESULT_DOC_PATH, 0)
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
MsgBox("Could not read File Parameters(DoubleClick)!", MsgBoxStyle.Exclamation)
Exit Sub
End If
For Each row As DataRow In ClassWindreamDocGrid.DT_RESULTFILES.Rows
ClassHelper.File_open(row.Item("DOC_PATH"), 0)
Next
End Sub
Private Sub CopyToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CopyToolStripMenuItem.Click
If ClassWindreamDocGrid.RESULT_DOC_PATH <> Nothing Then
Try
Dim selectedfile(0) As String
selectedfile(0) = ClassWindreamDocGrid.RESULT_DOC_PATH
Dim dataobj As New DataObject
dataobj.SetData(DataFormats.FileDrop, True, selectedfile)
Clipboard.Clear()
Clipboard.SetDataObject(dataobj, True)
Catch ex As Exception
MsgBox("Unexpected Error in Copy file:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
Cursor = Cursors.Default
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
MsgBox("Could not read File Parameters(DoubleClick)!", MsgBoxStyle.Exclamation)
Exit Sub
End If
For Each row As DataRow In ClassWindreamDocGrid.DT_RESULTFILES.Rows
If row.Item("DOC_PATH") <> "" Then
Try
Dim selectedfile(0) As String
selectedfile(0) = row.Item("DOC_PATH")
Dim dataobj As New DataObject
dataobj.SetData(DataFormats.FileDrop, True, selectedfile)
Clipboard.Clear()
Clipboard.SetDataObject(dataobj, True)
Exit For
Catch ex As Exception
MsgBox("Unexpected Error in Copy file:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
Cursor = Cursors.Default
End If
Next
End Sub
Private Sub DeleteToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DeleteToolStripMenuItem.Click
If ClassWindreamDocGrid.RESULT_DOC_PATH <> Nothing Then
Dim msg = "Sind Sie sicher, dass Sie diese Datei löschen wollen?"
If USER_LANGUAGE <> "de-DE" Then
msg = "Are You sure You want to delete this file?"
End If
Dim result As MsgBoxResult
result = MessageBox.Show(msg, "Confirmation:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = MsgBoxResult.Yes Then
Try
Dim FileToDelete As String
FileToDelete = ClassWindreamDocGrid.RESULT_DOC_PATH
If System.IO.File.Exists(FileToDelete) = True Then
System.IO.File.Delete(FileToDelete)
RUN_WDSEARCH_GRID()
End If
Catch ex As Exception
MsgBox("Unexpected Error in Delete file:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End If
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
MsgBox("Could not read File Parameters(DoubleClick)!", MsgBoxStyle.Exclamation)
Exit Sub
End If
For Each row As DataRow In ClassWindreamDocGrid.DT_RESULTFILES.Rows
If row.Item("DOC_PATH") <> "" Then
Dim msg = "Sind Sie sicher, dass Sie die Datei löschen wollen?"
If USER_LANGUAGE <> "de-DE" Then
msg = "Are You sure You want to delete this file?"
End If
Dim result As MsgBoxResult
result = MessageBox.Show(msg, "Confirmation:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = MsgBoxResult.Yes Then
Try
Dim FileToDelete As String
FileToDelete = row.Item("DOC_PATH")
If System.IO.File.Exists(FileToDelete) = True Then
System.IO.File.Delete(FileToDelete)
RUN_WDSEARCH_GRID()
End If
Catch ex As Exception
MsgBox("Unexpected Error in Delete file:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End If
End If
Next
End Sub
Private Sub PropertiesToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PropertiesToolStripMenuItem.Click
If ClassWindreamDocGrid.RESULT_DOC_PATH <> Nothing Then
Cursor = Cursors.WaitCursor
Dim sei As New SHELLEXECUTEINFO
sei.cbSize = Marshal.SizeOf(sei)
sei.lpVerb = "properties"
sei.lpFile = ClassWindreamDocGrid.RESULT_DOC_PATH
sei.nShow = SW_SHOW
sei.fMask = SEE_MASK_INVOKEIDLIST
If Not ShellExecuteEx(sei) Then
Dim ex As New System.ComponentModel.Win32Exception(System.Runtime.InteropServices.Marshal.GetLastWin32Error())
MsgBox("Unexpected Error in Open file propertys:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End If
If IsNothing(ClassWindreamDocGrid.DT_RESULTFILES) Then
MsgBox("Could not read File Parameters(Properties RecordView)!", MsgBoxStyle.Exclamation)
Exit Sub
End If
For Each row As DataRow In ClassWindreamDocGrid.DT_RESULTFILES.Rows
If row.Item("DOC_PATH") <> "" Then
Cursor = Cursors.WaitCursor
Dim sei As New SHELLEXECUTEINFO
sei.cbSize = Marshal.SizeOf(sei)
sei.lpVerb = "properties"
sei.lpFile = row.Item("DOC_PATH")
sei.nShow = SW_SHOW
sei.fMask = SEE_MASK_INVOKEIDLIST
If Not ShellExecuteEx(sei) Then
Dim ex As New System.ComponentModel.Win32Exception(System.Runtime.InteropServices.Marshal.GetLastWin32Error())
MsgBox("Unexpected Error in Open file propertys:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End If
End If
Next
Cursor = Cursors.Default
End Sub