This commit is contained in:
SchreiberM
2017-01-04 17:09:26 +01:00
128 changed files with 17813 additions and 20419 deletions

View File

@@ -6,6 +6,7 @@ Module ModuleMySettings
Dim ConfigPath As String = Path.Combine(Application.UserAppDataPath(), "UserConfig.xml")
Public MyConnectionString As String = ""
Public LogErrorsOnly As Boolean = True
Public Sett_TaskOverviewKeepInFront As Boolean = True
Public Sett_LoadWD_Docs As Boolean = True
@@ -148,7 +149,37 @@ Module ModuleMySettings
Else
MyConnectionString = ""
End If
Case "MyProxyConnectionString"
Dim connstring As String
'Den ConnectonString mit verschlüsseltem PW laden
Dim csb As New SqlClient.SqlConnectionStringBuilder
csb.ConnectionString = Row.Item("Value")
If Not csb.ConnectionString = "" Then
If csb.ConnectionString.Contains("Password=") Then
'sa-
'Jetzt das Passwort entschlüsseln
Dim PWplainText As String
Dim wrapper As New ClassEncryption("!35452didalog=")
' DecryptData throws if the wrong password is used.
Try
PWplainText = wrapper.DecryptData(csb.Password)
connstring = Row.Item("Value").ToString.Replace(csb.Password, PWplainText)
Catch ex As Exception
ClassLogger.Add("- the Password '" & csb.Password & "' could not be decrypted", False)
connstring = ""
End Try
Else
'Windows-Auth
connstring = Row.Item("Value").ToString
End If
ClassProxy.MyPROXYConnectionString = connstring
Else
ClassProxy.MyPROXYConnectionString = ""
End If
Case "MyLinkedServer"
ClassProxy.MyLinkedServer = Row.Item("Value")
Case "LogErrorsOnly"
LogErrorsOnly = CBool(Row.Item("Value"))
Case "Sett_TaskOverviewKeepInFront"
@@ -223,6 +254,22 @@ Module ModuleMySettings
DT.Rows.Add(newRow)
DT.WriteXml(ConfigPath)
End If
If rowresult.Contains("MyProxyConnectionString") = False Then
Dim newRow As DataRow = DT.NewRow()
newRow("ConfigName") = "MyProxyConnectionString"
newRow("Value") = ""
DT.Rows.Add(newRow)
DT.WriteXml(ConfigPath)
End If
If rowresult.Contains("MyLinkedServer") = False Then
Dim newRow As DataRow = DT.NewRow()
newRow("ConfigName") = "MyLinkedServer"
newRow("Value") = ""
DT.Rows.Add(newRow)
DT.WriteXml(ConfigPath)
End If
Catch ex As Exception
MsgBox("Error in LoadMyConfig" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
ClassLogger.Add("Error in LoadMyConfig: " & ex.Message, True)
@@ -318,7 +365,14 @@ Module ModuleMySettings
Dim newRow13 As DataRow = table.NewRow()
newRow13("ConfigName") = "PATH_ADDON"
newRow13("Value") = ""
table.Rows.Add(newRow13)
Dim newRow14 As DataRow = table.NewRow()
newRow14("ConfigName") = "MyProxyConnectionString"
newRow14("Value") = ""
table.Rows.Add(newRow14)
Dim newRow15 As DataRow = table.NewRow()
newRow15("ConfigName") = "MyLinkedServer"
newRow15("Value") = ""
table.Rows.Add(newRow15)
table.AcceptChanges()
ClassLogger.Add(">> CreateConfigTable su...", False)
@@ -360,7 +414,7 @@ Module ModuleMySettings
Public Function Settings_LoadBasicConfig()
Try
Dim sql As String = "select * from tbdd_Modules where UPPER(NAME) = UPPER('Record-Organizer')"
Dim DT As DataTable = ClassDatabase.Return_Datatable(sql)
Dim DT As DataTable = ClassDatabase.Return_Datatable(sql, False)
If DT.Rows.Count = 1 Then
vWLaufwerk = DT.Rows(0).Item("STRING1")
vVERSION_DELIMITER = DT.Rows(0).Item("VERSION_DELIMITER")