EDMI: First version of Updating files by replacing them!

This commit is contained in:
Jonathan Jenne
2022-01-31 16:31:13 +01:00
parent ab10268c99
commit 17bbaac7a0
30 changed files with 581 additions and 241 deletions

View File

@@ -72,35 +72,35 @@ Namespace IDB
End Try
End Function
Public Function GetAttributesForObject(pObjectId As Long, pLanguage As String) As List(Of ObjectAttribute)
Dim oAttributes As New List(Of ObjectAttribute)
'Public Function GetAttributesForObject(pObjectId As Long, pLanguage As String) As List(Of ObjectAttribute)
' Dim oAttributes As New List(Of ObjectAttribute)
Try
Dim oTable As DataTable = Database.GetDatatable($"EXEC [PRIDB_GET_VALUE_DT] {pObjectId}, '{pLanguage}'")
If oTable Is Nothing OrElse oTable.Rows.Count = 0 Then
Return Nothing
End If
' Try
' Dim oTable As DataTable = Database.GetDatatable($"EXEC [PRIDB_GET_VALUE_DT] {pObjectId}, '{pLanguage}'")
' If oTable Is Nothing OrElse oTable.Rows.Count = 0 Then
' Return Nothing
' End If
For Each oRow As DataRow In oTable.Rows
Dim oAttribute As New ObjectAttribute With {
.Id = oRow.Item("AttributeId"),
.Title = oRow.Item("AttributeTitle"),
.Type = oRow.Item("AttributeType"),
.ValueBigInt = Utils.NotNull(oRow.Item("ValueBigInt"), Nothing),
.ValueDate = Utils.NotNull(oRow.Item("ValueDate"), Nothing),
.ValueDecimal = Utils.NotNull(oRow.Item("ValueDecimal"), Nothing),
.ValueText = Utils.NotNull(oRow.Item("ValueText"), Nothing)
}
' For Each oRow As DataRow In oTable.Rows
' Dim oAttribute As New ObjectAttribute With {
' .Id = oRow.Item("AttributeId"),
' .Title = oRow.Item("AttributeTitle"),
' .Type = oRow.Item("AttributeType"),
' .ValueBigInt = Utils.NotNull(oRow.Item("ValueBigInt"), Nothing),
' .ValueDate = Utils.NotNull(oRow.Item("ValueDate"), Nothing),
' .ValueDecimal = Utils.NotNull(oRow.Item("ValueDecimal"), Nothing),
' .ValueText = Utils.NotNull(oRow.Item("ValueText"), Nothing)
' }
oAttributes.Add(oAttribute)
Next
' oAttributes.Add(oAttribute)
' Next
Return oAttributes
Catch ex As Exception
Logger.Error(ex)
Return Nothing
End Try
End Function
' Return oAttributes
' Catch ex As Exception
' Logger.Error(ex)
' Return Nothing
' End Try
'End Function
Public Function SetAttributeValue(pConnection As SqlConnection, pTransaction As SqlTransaction, pObjectId As Long, pAttributeName As String, pValue As String, pLanguage As String, pWho As String) As Boolean
Dim oSql = $"