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