WIP: Remove empty rows
This commit is contained in:
parent
6650b01b10
commit
83f026d389
@ -320,6 +320,32 @@ Public Class ImportZUGFeRDFiles
|
|||||||
|
|
||||||
_logger.Debug("Done Fetching Property values.")
|
_logger.Debug("Done Fetching Property values.")
|
||||||
|
|
||||||
|
|
||||||
|
Dim oIndexesToRemove As New List(Of Integer)
|
||||||
|
|
||||||
|
For oRowIndex = 0 To oRowCount - 1
|
||||||
|
Dim oColumnIsEmpty = False
|
||||||
|
|
||||||
|
For Each oRow In oPropertyList
|
||||||
|
Dim oValue As List(Of Object) = oRow.Value.Item(oRowIndex)
|
||||||
|
Dim oIsEmpty = oValue.Count = 0
|
||||||
|
oColumnIsEmpty = oIsEmpty
|
||||||
|
|
||||||
|
Console.WriteLine($"Value is empty: {oValue.Count = 0}")
|
||||||
|
Next
|
||||||
|
|
||||||
|
If oColumnIsEmpty Then
|
||||||
|
oIndexesToRemove.Add(oRowIndex)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Console.WriteLine($"Column is empty: {oColumnIsEmpty}")
|
||||||
|
Next
|
||||||
|
|
||||||
|
' TODO: Remove Empty Rows by `oIndexesToRemove`!
|
||||||
|
|
||||||
|
|
||||||
' Structure of oPropertyList
|
' Structure of oPropertyList
|
||||||
' [ # Propertyname # Row 1 # Row 2
|
' [ # Propertyname # Row 1 # Row 2
|
||||||
' PositionsMenge: [BilledQuantity1, BilledQuantity2, ...],
|
' PositionsMenge: [BilledQuantity1, BilledQuantity2, ...],
|
||||||
@ -358,7 +384,7 @@ Public Class ImportZUGFeRDFiles
|
|||||||
oPropertyValue = String.Empty
|
oPropertyValue = String.Empty
|
||||||
End If
|
End If
|
||||||
|
|
||||||
_logger.Debug("Property {0} has value {1}", oPropertyDescription, oPropertyValue)
|
_logger.Debug("Property {0} has value '{1}'", oPropertyDescription, oPropertyValue)
|
||||||
|
|
||||||
Dim oCommand = $"INSERT INTO {oTableName} (REFERENCE_GUID, ITEM_DESCRIPTION, ITEM_VALUE, GROUP_COUNTER) VALUES ('{oFileGroupId}', '{oPropertyDescription}', '{oPropertyValue}', {oRowCounter})"
|
Dim oCommand = $"INSERT INTO {oTableName} (REFERENCE_GUID, ITEM_DESCRIPTION, ITEM_VALUE, GROUP_COUNTER) VALUES ('{oFileGroupId}', '{oPropertyDescription}', '{oPropertyValue}', {oRowCounter})"
|
||||||
_logger.Debug("Mapping Property {0} to value {1}. Will be inserted into table {2} with RowCounter {3}", oPropertyDescription, oPropertyValue, oTableName, oRowCounter)
|
_logger.Debug("Mapping Property {0} to value {1}. Will be inserted into table {2} with RowCounter {3}", oPropertyDescription, oPropertyValue, oTableName, oRowCounter)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user