Verbesserung von Logging, Fehlerbehandlung und Caching
Die Änderungen umfassen: - Zusätzliche Prüfung und Fehlermeldung in `ctrlObjectPropertyDialog`, wenn keine Business Entities gefunden werden. - Anpassung der Logik in `frmObjectPropertyDialog` zur besseren Zuordnung von LayoutControlItem und BaseEdit. - Einführung von Thread-Sicherheit für den Cache in `EDMIService` mittels `SyncLock`. - Erweiterung von Methoden wie `ReturnDatatable`, `ReturnScalarValue` und `ExecuteNonQuery` um Performance-Messung mit `Stopwatch`. - Vereinheitlichung der Fehlerbehandlung durch konsistente Nutzung von `FaultException`. - Erweiterung des Loggings für Sessions, Cache-Aktualisierungen und Datenbankoperationen. - Korrektur der Rückgabe in `GetFileInfoByObjectId` und Verbesserung der Fault-Wrapper-Methoden. - Bereinigung von redundanten Codezeilen und Kommentaren.
This commit is contained in:
@@ -85,6 +85,13 @@ Public Class ctrlObjectPropertyDialog
|
||||
End If
|
||||
' Load Business Entities
|
||||
Dim oEntityIds = Await GetBusinessEntitiesForObjectId(pObjectId)
|
||||
|
||||
If oEntityIds.Count = 0 Then
|
||||
_Logger.Warn("Keine Business Entities für ObjectId {0} gefunden.", pObjectId)
|
||||
Helper.ShowErrorMessage(New ApplicationException($"Für das Objekt '{pObjectId}' wurden keine Business Entities gefunden."), "LoadObject")
|
||||
Return False
|
||||
End If
|
||||
|
||||
Dim oActiveEntity = oEntityIds.FirstOrDefault()
|
||||
|
||||
Dim oCombobox As RepositoryItemComboBox = DirectCast(cmbEntityId.Edit, RepositoryItemComboBox)
|
||||
|
||||
@@ -154,7 +154,8 @@ Public Class frmObjectPropertyDialog
|
||||
End Sub
|
||||
|
||||
Private Sub BaseEdit_EditValueChanged(sender As Object, e As EventArgs)
|
||||
Dim oControl As BaseEdit = sender
|
||||
Dim oControlItem As LayoutControlItem = sender
|
||||
Dim oControl As BaseEdit = oControlItem.Control
|
||||
Dim oAttribute As Attribute = oControl.Tag
|
||||
Dim oValue = oControl.EditValue
|
||||
Dim oKey = oAttribute.Title
|
||||
@@ -163,7 +164,6 @@ Public Class frmObjectPropertyDialog
|
||||
Changes.Item(oKey) = oValue
|
||||
Else
|
||||
Changes.Add(oAttribute.Title, oValue)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user