fix settings loading

This commit is contained in:
Jonathan Jenne
2019-11-06 10:00:32 +01:00
parent e9bb4b309f
commit c6f839bef8

View File

@@ -9,12 +9,12 @@ Module ModuleRuntime
Public Function SaveMySettingsValue(name As String, value As String, type As String) Public Function SaveMySettingsValue(name As String, value As String, type As String)
Try Try
Dim DT As DataTable Dim DT As DataTable = Nothing
If type = "ConfigMain" Then If type = "ConfigMain" Then
DT = GetTablefromXML(ConfigPath) DT = GetTablefromXML(ConfigPath)
End If End If
If Not DT Is Nothing Then If Not IsNothing(DT) Then
For Each Row As DataRow In DT.Rows For Each Row As DataRow In DT.Rows
If Row.Item("ConfigName") = name Then If Row.Item("ConfigName") = name Then
Row.Item("Value") = value Row.Item("Value") = value
@@ -34,7 +34,7 @@ Module ModuleRuntime
End Function End Function
Private Function GetTablefromXML(path As String) Private Function GetTablefromXML(path As String) As DataTable
Try Try
Dim DS As New DataSet Dim DS As New DataSet
DS.ReadXml(path) DS.ReadXml(path)