Fix Crash on ContextMenu open via FilterRow
This commit is contained in:
@@ -960,13 +960,14 @@ Public Class frmMain
|
||||
End Function
|
||||
Private Sub tsmiMarkedFilesFinish_Click(sender As Object, e As EventArgs) Handles tsmiMarkedFilesFinish.Click
|
||||
Try
|
||||
Dim selectedRows As Integer() = GridView_Docs.GetSelectedRows()
|
||||
Dim hitInfo As GridHitInfo = GridView_Docs.CalcHitInfo(GridCursorLocation)
|
||||
Dim workedFiles As Integer = 0
|
||||
Dim oSelectedRows As Integer() = GridView_Docs.GetSelectedRows()
|
||||
Dim oHitInfo As GridHitInfo = GridView_Docs.CalcHitInfo(GridCursorLocation)
|
||||
Dim oSelectedRowHandle As Integer = oHitInfo.RowHandle
|
||||
Dim oWorkedFiles As Integer = 0
|
||||
|
||||
Dim profileId = 0
|
||||
Dim oProfileId = 0
|
||||
|
||||
If selectedRows.Count = 0 Then
|
||||
If oSelectedRows.Count = 0 Then
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
MsgBox("Bitte selektieren Sie einige 1 oder mehr Dokumente", MsgBoxStyle.Exclamation, "Massenabschluss")
|
||||
Else
|
||||
@@ -976,32 +977,11 @@ Public Class frmMain
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If GridView_Docs.IsGroupRow(hitInfo.RowHandle) Then
|
||||
Dim groupRowHandle = hitInfo.RowHandle
|
||||
|
||||
Dim childRows As Integer = GridView_Docs.GetChildRowCount(groupRowHandle)
|
||||
|
||||
If childRows > 0 Then
|
||||
Dim childRowHandle = GridView_Docs.GetChildRowHandle(groupRowHandle, 0)
|
||||
|
||||
profileId = GridView_Docs.GetRowCellValue(childRowHandle, "PROFILE_ID")
|
||||
Else
|
||||
MsgBox("This profile has no documents!")
|
||||
End If
|
||||
Else
|
||||
If hitInfo.RowHandle >= 0 Then
|
||||
profileId = GridView_Docs.GetRowCellValue(hitInfo.RowHandle, "PROFILE_ID")
|
||||
Else
|
||||
Dim parentRowHandle = GridView_Docs.GetParentRowHandle(hitInfo.RowHandle)
|
||||
Dim dataRowHandle = GridView_Docs.GetDataRowHandleByGroupRowHandle(parentRowHandle)
|
||||
|
||||
profileId = GridView_Docs.GetRowCellValue(dataRowHandle, "PROFILE_ID")
|
||||
End If
|
||||
End If
|
||||
oProfileId = GridView_Docs.GetRowCellValue(oSelectedRows.First(), "PROFILE_ID")
|
||||
|
||||
If Init_windream() Then
|
||||
|
||||
CURRENT_ProfilGUID = profileId
|
||||
CURRENT_ProfilGUID = oProfileId
|
||||
CURRENT_DT_FINAL_INDEXING = ClassDatabase.Return_Datatable(String.Format("select * from TBPM_PROFILE_FINAL_INDEXING where PROFIL_ID = {0}", CURRENT_ProfilGUID))
|
||||
CURRENT_DT_PROFILE = ClassDatabase.Return_Datatable(String.Format("select * from TBPM_PROFILE where GUID = {0}", CURRENT_ProfilGUID))
|
||||
CURRENT_PROFILE_VEKTOR_LOG = CURRENT_DT_PROFILE.Rows(0).Item("PM_VEKTOR_INDEX")
|
||||
@@ -1015,16 +995,16 @@ Public Class frmMain
|
||||
dt.Columns.Add("DOC_GUID")
|
||||
dt.Columns.Add("FULL_PATH")
|
||||
|
||||
For Each rowhandle As Integer In selectedRows
|
||||
For Each oRowHandle As Integer In oSelectedRows
|
||||
Dim R As DataRow = dt.NewRow
|
||||
Dim DOC_ID = GridView_Docs.GetRowCellValue(rowhandle, "DOC_ID")
|
||||
Dim DOC_ID = GridView_Docs.GetRowCellValue(oRowHandle, "DOC_ID")
|
||||
CURRENT_DOC_ID = DOC_ID
|
||||
Dim DOC_PATH = GridView_Docs.GetRowCellValue(rowhandle, "FULL_FILE_PATH")
|
||||
Dim DOC_PATH = GridView_Docs.GetRowCellValue(oRowHandle, "FULL_FILE_PATH")
|
||||
CURRENT_DOC_PATH = DOC_PATH
|
||||
CURRENT_DOC_GUID = GridView_Docs.GetRowCellValue(rowhandle, "GUID")
|
||||
CURRENT_DOC_GUID = GridView_Docs.GetRowCellValue(oRowHandle, "GUID")
|
||||
R("DOC_ID") = CURRENT_DOC_ID
|
||||
R("FULL_PATH") = CURRENT_DOC_PATH
|
||||
R("DOC_GUID") = GridView_Docs.GetRowCellValue(rowhandle, "GUID")
|
||||
R("DOC_GUID") = GridView_Docs.GetRowCellValue(oRowHandle, "GUID")
|
||||
dt.Rows.Add(R)
|
||||
Next
|
||||
|
||||
|
||||
Reference in New Issue
Block a user