Improve Logging for frmConfig

This commit is contained in:
Jonathan Jenne
2023-11-07 10:00:47 +01:00
parent f67368c1d9
commit c1fa500f36

View File

@@ -192,18 +192,22 @@ Public Class frmConfig
Private Sub GridViewTables_FocusedRowChanged(sender As Object, e As Views.Base.FocusedRowChangedEventArgs) Handles GridViewTables.FocusedRowChanged
Try
If GridViewTables.FocusedRowHandle < 0 Then
Logger.Debug("No row selected. Exiting.")
Exit Sub
End If
Dim oRow As DataRow = GridViewTables.GetDataRow(GridViewTables.FocusedRowHandle)
If oRow Is Nothing Then
Logger.Debug("Invalid row handle. Exiting.")
Exit Sub
End If
Dim oTableId = oRow.Item("GUID")
Logger.Debug("Loading Items for Table [{0}]", oTableId)
TBMT_TEMPLATE_ITEMSTableAdapter.Fill(DS_DD_ECM.TBMT_TEMPLATE_ITEMS, oTableId)
Catch ex As Exception
Logger.Error(ex)
FormHelper.ShowError(ex, "Laden der Tabelle")
End Try
End Sub