Common/DocumentREsultList: clean up
This commit is contained in:
parent
4b2ef12a55
commit
b2a02bbecb
@ -108,8 +108,8 @@ Public Class frmDocumentResultList
|
|||||||
AddHandler GridView2.FocusedRowChanged, AddressOf GridView_FocusedRowChanged
|
AddHandler GridView2.FocusedRowChanged, AddressOf GridView_FocusedRowChanged
|
||||||
AddHandler GridView3.FocusedRowChanged, AddressOf GridView_FocusedRowChanged
|
AddHandler GridView3.FocusedRowChanged, AddressOf GridView_FocusedRowChanged
|
||||||
|
|
||||||
UpdateTotalResults(_ResultLists)
|
UpdateTotalResults()
|
||||||
UpdateGridData(_ResultLists)
|
UpdateGridData()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
_Logger.Error(ex)
|
_Logger.Error(ex)
|
||||||
MessageBox.Show("Error while loading results:" & vbNewLine & vbNewLine & ex.Message, Text)
|
MessageBox.Show("Error while loading results:" & vbNewLine & vbNewLine & ex.Message, Text)
|
||||||
@ -200,8 +200,8 @@ Public Class frmDocumentResultList
|
|||||||
Public Function RefreshResults(pResults As IEnumerable(Of BaseResult)) As Boolean Implements IResultForm.RefreshResults
|
Public Function RefreshResults(pResults As IEnumerable(Of BaseResult)) As Boolean Implements IResultForm.RefreshResults
|
||||||
_IsLoading = True
|
_IsLoading = True
|
||||||
Try
|
Try
|
||||||
UpdateTotalResults(_ResultLists)
|
UpdateTotalResults()
|
||||||
UpdateGridData(_ResultLists)
|
UpdateGridData()
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@ -213,7 +213,7 @@ Public Class frmDocumentResultList
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub UpdateGridData(pResultList As List(Of DocumentResult))
|
Private Sub UpdateGridData()
|
||||||
' Load Grids
|
' Load Grids
|
||||||
For index = 0 To _ResultLists.Count - 1
|
For index = 0 To _ResultLists.Count - 1
|
||||||
Select Case index
|
Select Case index
|
||||||
@ -267,10 +267,10 @@ Public Class frmDocumentResultList
|
|||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub UpdateTotalResults(pResultList As List(Of DocumentResult))
|
Private Sub UpdateTotalResults()
|
||||||
Dim oTotalResults = 0
|
Dim oTotalResults = 0
|
||||||
|
|
||||||
For Each oList In pResultList
|
For Each oList In _ResultLists
|
||||||
oTotalResults += oList.Datatable.Rows.Count
|
oTotalResults += oList.Datatable.Rows.Count
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user