Common: Configurable Column Names for Fixed Columns, Helpers for Error Messages, Checks for Datatable contents and environment
This commit is contained in:
@@ -25,7 +25,7 @@ Public Class frmDataResultList
|
||||
|
||||
Private _ActiveGrid As GridControl = Nothing
|
||||
Private _ActiveGridBand As GridBand = Nothing
|
||||
Private _ActiveRowHandle As Integer = Constants.NO_ROW_HANDLE
|
||||
Private _Helpers As DocumentResultList
|
||||
|
||||
Public Property ShouldReturnToPreviousForm As Boolean Implements IResultForm.ShouldReturnToPreviousForm
|
||||
|
||||
@@ -39,6 +39,7 @@ Public Class frmDataResultList
|
||||
_LogConfig = LogConfig
|
||||
_Logger = LogConfig.GetLogger()
|
||||
_Config = New ConfigManager(Of DataResultConfig)(LogConfig, oConfigPath, Application.StartupPath)
|
||||
_Helpers = New DocumentResultList(_LogConfig)
|
||||
_Environment = Environment
|
||||
_Params = Params
|
||||
_ResultLists = Params.Results
|
||||
@@ -128,7 +129,7 @@ Public Class frmDataResultList
|
||||
End Sub
|
||||
|
||||
Private Sub GridView_FocusedRowChanged(sender As Object, e As FocusedRowChangedEventArgs)
|
||||
_ActiveRowHandle = e.FocusedRowHandle
|
||||
_Helpers.SetRowHandle(e)
|
||||
End Sub
|
||||
|
||||
Private Sub GridControl_Enter(sender As GridControl, e As EventArgs) Handles GridControl1.Enter, GridControl2.Enter, GridControl3.Enter
|
||||
@@ -204,7 +205,7 @@ Public Class frmDataResultList
|
||||
|
||||
Private Function GetActiveRow() As DataRow
|
||||
Dim oActiveGrid = GetActiveGridControl()
|
||||
Dim oActiveRowhandle = GetActiveRowHandle()
|
||||
Dim oActiveRowhandle = _Helpers.ActiveRowHandle
|
||||
|
||||
If oActiveGrid IsNot Nothing And oActiveRowhandle <> Constants.NO_ROW_HANDLE Then
|
||||
Dim oView = DirectCast(oActiveGrid.DefaultView, GridView)
|
||||
@@ -223,14 +224,6 @@ Public Class frmDataResultList
|
||||
Return _ActiveGrid
|
||||
End Function
|
||||
|
||||
Private Function GetActiveRowHandle() As Integer
|
||||
If _ActiveRowHandle = Constants.NO_ROW_HANDLE Then
|
||||
Return Constants.NO_ROW_HANDLE
|
||||
End If
|
||||
|
||||
Return _ActiveRowHandle
|
||||
End Function
|
||||
|
||||
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
|
||||
Dim oActiveGrid = GetActiveGridControl()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user