MS Push
This commit is contained in:
@@ -1,34 +1,35 @@
|
||||
Imports System.IO
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.Text
|
||||
'Imports System.Runtime.InteropServices
|
||||
'Imports System.Text
|
||||
Imports DevExpress.XtraGrid.Views.Base
|
||||
Imports DevExpress.XtraPrinting
|
||||
|
||||
Public Class frmDocSearchResult
|
||||
<DllImport("Shell32", CharSet:=CharSet.Auto, SetLastError:=True)>
|
||||
Public Shared Function ShellExecuteEx(ByRef lpExecInfo As SHELLEXECUTEINFO) As Boolean
|
||||
End Function
|
||||
' <DllImport("Shell32", CharSet:=CharSet.Auto, SetLastError:=True)>
|
||||
' Public Shared Function ShellExecuteEx(ByRef lpExecInfo As SHELLEXECUTEINFO) As Boolean
|
||||
' End Function
|
||||
|
||||
Public Structure SHELLEXECUTEINFO
|
||||
Public cbSize As Integer
|
||||
Public fMask As Integer
|
||||
Public hwnd As IntPtr
|
||||
<MarshalAs(UnmanagedType.LPTStr)> Public lpVerb As String
|
||||
<MarshalAs(UnmanagedType.LPTStr)> Public lpFile As String
|
||||
<MarshalAs(UnmanagedType.LPTStr)> Public lpParameters As String
|
||||
<MarshalAs(UnmanagedType.LPTStr)> Public lpDirectory As String
|
||||
Dim nShow As Integer
|
||||
Dim hInstApp As IntPtr
|
||||
Dim lpIDList As IntPtr
|
||||
<MarshalAs(UnmanagedType.LPTStr)> Public lpClass As String
|
||||
Public hkeyClass As IntPtr
|
||||
Public dwHotKey As Integer
|
||||
Public hIcon As IntPtr
|
||||
Public hProcess As IntPtr
|
||||
End Structure
|
||||
Private Const SEE_MASK_INVOKEIDLIST = &HC
|
||||
Private Const SEE_MASK_NOCLOSEPROCESS = &H40
|
||||
Private Const SEE_MASK_FLAG_NO_UI = &H400
|
||||
Public Const SW_SHOW As Short = 5
|
||||
'Public Structure SHELLEXECUTEINFO
|
||||
' Public cbSize As Integer
|
||||
' Public fMask As Integer
|
||||
' Public hwnd As IntPtr
|
||||
' <MarshalAs(UnmanagedType.LPTStr)> Public lpVerb As String
|
||||
' <MarshalAs(UnmanagedType.LPTStr)> Public lpFile As String
|
||||
' <MarshalAs(UnmanagedType.LPTStr)> Public lpParameters As String
|
||||
' <MarshalAs(UnmanagedType.LPTStr)> Public lpDirectory As String
|
||||
' Dim nShow As Integer
|
||||
' Dim hInstApp As IntPtr
|
||||
' Dim lpIDList As IntPtr
|
||||
' <MarshalAs(UnmanagedType.LPTStr)> Public lpClass As String
|
||||
' Public hkeyClass As IntPtr
|
||||
' Public dwHotKey As Integer
|
||||
' Public hIcon As IntPtr
|
||||
' Public hProcess As IntPtr
|
||||
'End Structure
|
||||
' Private Const SEE_MASK_INVOKEIDLIST = &HC
|
||||
' Private Const SEE_MASK_NOCLOSEPROCESS = &H40
|
||||
' Private Const SEE_MASK_FLAG_NO_UI = &H400
|
||||
' Public Const SW_SHOW As Short = 5
|
||||
Private DT_RESULT As DataTable
|
||||
Private SelectedDocID As Int64
|
||||
Private SelectedFULL_FILEPATH As String
|
||||
@@ -41,25 +42,17 @@ Public Class frmDocSearchResult
|
||||
End If
|
||||
|
||||
DT_RESULT = DT_RESULT
|
||||
GridControlDocSearch.DataSource = Nothing
|
||||
GridViewDoc_Search.Columns.Clear()
|
||||
GridControlDocSearch.DataSource = DT_RESULT
|
||||
GridViewDoc_Search.BestFitColumns(True)
|
||||
bsiInfo.Caption = $"{CURRENT_DOCSEARCH_CAPTION} ({DT_RESULT.Rows.Count} rows)"
|
||||
GridControlDocSearch.DataSource = DT_RESULT
|
||||
GridViewDoc_Search.OptionsView.ColumnAutoWidth = False
|
||||
GridViewDoc_Search.BestFitColumns()
|
||||
Load_DocGrid_Layout()
|
||||
GridControlDocSearch.DataSource = DT_RESULT
|
||||
GridControlDocSearch.DataSource = DT_RESULT
|
||||
Try
|
||||
GridViewDoc_Search.Columns.Item("FULL_FILENAME").Visible = False
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
'If GridViewDoc_Search.RowCount > 15000 Then
|
||||
' ToolStripButton2.Enabled = False
|
||||
'Else
|
||||
' ToolStripButton2.Enabled = True
|
||||
'End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn("Unexpected Error in LoadDocSearch: " & ex.Message)
|
||||
End Try
|
||||
@@ -95,7 +88,7 @@ Public Class frmDocSearchResult
|
||||
Dim oDocID = GridViewDoc_Search.GetRowCellValue(GridViewDoc_Search.FocusedRowHandle, "DocID")
|
||||
SelectedFULL_FILEPATH = GridViewDoc_Search.GetRowCellValue(GridViewDoc_Search.FocusedRowHandle, "FULL_FILENAME")
|
||||
If Not IsNothing(oDocID) Then
|
||||
SelectedDocID = oDocID
|
||||
SelectedDocID = oDocID
|
||||
SelectedFULL_FILEPATH = GridViewDoc_Search.GetRowCellValue(GridViewDoc_Search.FocusedRowHandle, "FULL_FILENAME")
|
||||
End If
|
||||
|
||||
@@ -182,29 +175,29 @@ Public Class frmDocSearchResult
|
||||
End Sub
|
||||
|
||||
Private Sub docCM_PropertiesFile_Click(sender As Object, e As EventArgs) Handles docCM_PropertiesFile.Click
|
||||
Show_File_Properties()
|
||||
'Show_File_Properties()
|
||||
End Sub
|
||||
Sub Show_File_Properties()
|
||||
If IsNothing(SelectedFULL_FILEPATH) Then
|
||||
MsgBox("Could not read File Parameters(4)!", MsgBoxStyle.Exclamation)
|
||||
Exit Sub
|
||||
End If
|
||||
If SelectedFULL_FILEPATH <> "" Then
|
||||
Cursor = Cursors.WaitCursor
|
||||
Dim sei As New SHELLEXECUTEINFO
|
||||
sei.cbSize = Marshal.SizeOf(sei)
|
||||
sei.lpVerb = "properties"
|
||||
sei.lpFile = SelectedFULL_FILEPATH
|
||||
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())
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Open file properties:", ex.Message)
|
||||
End If
|
||||
End If
|
||||
Cursor = Cursors.Default
|
||||
'Sub Show_File_Properties()
|
||||
' If IsNothing(SelectedFULL_FILEPATH) Then
|
||||
' MsgBox("Could not read File Parameters(4)!", MsgBoxStyle.Exclamation)
|
||||
' Exit Sub
|
||||
' End If
|
||||
' If SelectedFULL_FILEPATH <> "" Then
|
||||
' Cursor = Cursors.WaitCursor
|
||||
' Dim sei As New SHELLEXECUTEINFO
|
||||
' sei.cbSize = Marshal.SizeOf(sei)
|
||||
' sei.lpVerb = "properties"
|
||||
' sei.lpFile = SelectedFULL_FILEPATH
|
||||
' 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())
|
||||
' ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Open file properties:", ex.Message)
|
||||
' End If
|
||||
' End If
|
||||
' Cursor = Cursors.Default
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
Private Sub frmDocSearchResult_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
LoadDocSearch(False)
|
||||
@@ -276,6 +269,12 @@ Public Class frmDocSearchResult
|
||||
saveFileDialogDocSearchResult.ShowDialog()
|
||||
If saveFileDialogDocSearchResult.FileName <> "" Then
|
||||
Cursor = Cursors.WaitCursor
|
||||
'Dim oOptions As XlsxExportOptionsEx = New XlsxExportOptionsEx
|
||||
'oOptions.ShowGridLines = True
|
||||
'oOptions.AllowSortingAndFiltering = DevExpress.Utils.DefaultBoolean.True
|
||||
'oOptions.ExportType = DevExpress.Export.ExportType.DataAware
|
||||
'oOptions.ExportMode = XlsxExportMode.SingleFile
|
||||
'oOptions.AllowFixedColumnHeaderPanel = DevExpress.Utils.DefaultBoolean.True
|
||||
GridControlDocSearch.MainView.ExportToXlsx(saveFileDialogDocSearchResult.FileName)
|
||||
Dim result As MsgBoxResult
|
||||
Dim msg = String.Format("Datei wurde erstellt! Wollen Sie diese nun öffnen?")
|
||||
|
||||
Reference in New Issue
Block a user