Logging und Vorbereitung MAPPING wie in taskFLOW
This commit is contained in:
@@ -12,7 +12,7 @@ Public Class ctrlObjectPropertyDialog
|
||||
Implements IBaseForm
|
||||
|
||||
Private Property LogConfig As LogConfig Implements IBaseForm.LogConfig
|
||||
Private Property Logger As Logger Implements IBaseForm.Logger
|
||||
Private Property _Logger As Logger Implements IBaseForm._Logger
|
||||
Private Property ControlManager As AttributeControls
|
||||
Private Property GridBuilder As GridBuilder
|
||||
Private Property Client As Client
|
||||
@@ -38,7 +38,7 @@ Public Class ctrlObjectPropertyDialog
|
||||
|
||||
Public Sub Initialize(pLogConfig As LogConfig, pHostForm As Form, pClient As Client, pEnv As Environment)
|
||||
LogConfig = pLogConfig
|
||||
Logger = pLogConfig.GetLogger()
|
||||
_Logger = pLogConfig.GetLogger()
|
||||
HostForm = pHostForm
|
||||
ControlManager = New AttributeControls(pLogConfig, pEnv, pClient)
|
||||
Helper = New FormHelper(pLogConfig, pHostForm)
|
||||
@@ -58,7 +58,7 @@ Public Class ctrlObjectPropertyDialog
|
||||
Public Async Function SaveChanges() As Task(Of Boolean)
|
||||
Try
|
||||
For Each oChange As KeyValuePair(Of String, Object) In Changes
|
||||
Logger.Info("Updating Attribute [{0}] with value [{1}]", oChange.Key, oChange.Value.ToString)
|
||||
_Logger.Info("Updating Attribute [{0}] with value [{1}]", oChange.Key, oChange.Value.ToString)
|
||||
Await Client.SetAttributeValueAsync(ObjectId, oChange.Key, oChange.Value, New Options.SetAttributeValueOptions With {
|
||||
.Language = Environment.User.Language,
|
||||
.Username = Environment.User.UserName
|
||||
@@ -131,7 +131,7 @@ Public Class ctrlObjectPropertyDialog
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
_Logger.Error(ex)
|
||||
Return False
|
||||
Finally
|
||||
Enabled = True
|
||||
@@ -145,7 +145,7 @@ Public Class ctrlObjectPropertyDialog
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
_Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@@ -156,7 +156,7 @@ Public Class ctrlObjectPropertyDialog
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
_Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@@ -176,14 +176,14 @@ Public Class ctrlObjectPropertyDialog
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
_Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Async Function GetBusinessEntitiesForObjectId(ObjectId As Long) As Task(Of List(Of Long))
|
||||
Try
|
||||
Dim oSQL = $"SELECT BE_ID FROM TBIDB_OBJECT_BE WHERE IDB_OBJ_ID = {ObjectId}"
|
||||
Dim oSQL = $"SELECT BE_ID FROM TBIDB_OBJECT_BE WITH (NOLOCK) WHERE IDB_OBJ_ID = {ObjectId}"
|
||||
Dim oResult = Await Client.GetDatatableFromIDBAsync(oSQL)
|
||||
|
||||
If oResult.OK = False Then
|
||||
@@ -202,7 +202,7 @@ Public Class ctrlObjectPropertyDialog
|
||||
Return oEntities
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
_Logger.Error(ex)
|
||||
Return New List(Of Long)
|
||||
End Try
|
||||
End Function
|
||||
@@ -230,7 +230,7 @@ Public Class ctrlObjectPropertyDialog
|
||||
End Function
|
||||
|
||||
Private Async Function GetPropertiesForObjectId(ObjectId As Long) As Task(Of DataTable)
|
||||
Dim oSQL As String = $"SELECT * FROM TBIDB_OBJECT WHERE IDB_OBJ_ID = {ObjectId}"
|
||||
Dim oSQL As String = $"SELECT * FROM TBIDB_OBJECT WITH (NOLOCK) WHERE IDB_OBJ_ID = {ObjectId}"
|
||||
Dim oResult = Await Client.GetDatatableFromIDBAsync(oSQL)
|
||||
|
||||
Return oResult.Table
|
||||
@@ -246,7 +246,7 @@ Public Class ctrlObjectPropertyDialog
|
||||
ControlManager.LoadControlsForAttributes(oAttributes, Root)
|
||||
Await ControlManager.LoadControlValuesForAttributes(pObjectId, Root)
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user