jj: Add Logging
This commit is contained in:
parent
d0b277a04c
commit
f8c879e875
@ -216,6 +216,7 @@ Public Class frmFormDesigner
|
||||
|
||||
Mouse_IsPressed = False
|
||||
|
||||
Try
|
||||
Select Case e.Data.GetData(DataFormats.Text)
|
||||
Case ClassControlCreator.PREFIX_LABEL
|
||||
Dim label = ClassControlCreator.CreateNewLabel(cursorPosition)
|
||||
@ -312,6 +313,10 @@ Public Class frmFormDesigner
|
||||
|
||||
pnldesigner.Controls.Add(line)
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add($"Error while Adding new control {e.Data.GetData(DataFormats.Text)}:")
|
||||
ClassLogger.Add(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub pnlDesigner_DragEnter(sender As System.Object, e As DragEventArgs) Handles pnldesigner.DragEnter
|
||||
@ -601,11 +606,24 @@ Public Class frmFormDesigner
|
||||
|
||||
' Beim Laden der Eigenschaften eines Controls muss die ganze Datatable neu geladen werden
|
||||
' Nicht wirklich, aber gibt gerade keine bessere Möglichkeit, ohne alle SQL Abfragen selbst auszuführen
|
||||
Try
|
||||
TBPM_PROFILE_CONTROLSTableAdapter.FillByProfil(DD_DMSLiteDataSet.TBPM_PROFILE_CONTROLS, ProfileId)
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Error while executing TBPM_PROFILE_CONTROLSTableAdapter.FillByProfil in LoadControlProperties:")
|
||||
ClassLogger.Add(ex)
|
||||
End Try
|
||||
|
||||
row = dt.AsEnumerable().Where(Function(r As DataRow)
|
||||
Return r.Item("GUID") = sender.Tag
|
||||
End Function).Single()
|
||||
End Function).SingleOrDefault()
|
||||
|
||||
' Control-Id wurde nicht in DataRow gefunden
|
||||
If IsNothing(row) Then
|
||||
ClassLogger.Add($"Error while filtering Controls by Guid '{sender.Tag}' in LoadControlProperties:")
|
||||
MsgBox($"Control mit der Id {sender.Tag} wurde nicht gefunden!", MsgBoxStyle.Critical, "Fehler beim Laden der Control Eigenschaften")
|
||||
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' Globale Variablen setzen
|
||||
CurrentControl = sender
|
||||
@ -763,7 +781,7 @@ Public Class frmFormDesigner
|
||||
tslblAenderungen.Visible = True
|
||||
tslblAenderungen.Text = "Änderungen gespeichert - " & Now
|
||||
Catch ex As Exception
|
||||
Dim msg = $"UpdateSingleValue - Fehler beim Speichern von Control (Id: {guid}): {vbCrLf}{ex.Message}"
|
||||
Dim msg = $"UpdateSingleValue - Fehler beim Speichern von Control (Id: {guid}, column: {columnName}): {vbCrLf}{ex.Message}"
|
||||
MsgBox(msg)
|
||||
ClassLogger.Add(msg)
|
||||
End Try
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user