jj für ms
This commit is contained in:
@@ -1017,35 +1017,35 @@ Public Class frmMain
|
||||
Dim drActive As DataRow() = dt2.Select("ACTIVE = 1")
|
||||
Dim drInActive As DataRow() = dt2.Select("ACTIVE = 0")
|
||||
Dim name = ""
|
||||
Dim sqlcon = ""
|
||||
Dim sqlcon_Proxy = ""
|
||||
Dim WM_ALIAS = ""
|
||||
Dim INACTIVE_GUID
|
||||
Dim ACTIVE_GUID
|
||||
Dim oSqlcon = ""
|
||||
Dim oSqlcon_Proxy = ""
|
||||
Dim oWM_ALIAS = ""
|
||||
Dim oINACTIVE_GUID
|
||||
Dim oACTIVE_GUID
|
||||
For Each row As DataRow In drInActive
|
||||
INACTIVE_GUID = row.Item("GUID")
|
||||
oINACTIVE_GUID = row.Item("GUID")
|
||||
name = row.Item("DESCRIPTION")
|
||||
sqlcon = row.Item("SQL_CONNECTION")
|
||||
sqlcon_Proxy = row.Item("SQL_CONNECTION_PROXY")
|
||||
WM_ALIAS = row.Item("WM_ALIAS")
|
||||
oSqlcon = row.Item("SQL_CONNECTION")
|
||||
oSqlcon_Proxy = row.Item("SQL_CONNECTION_PROXY")
|
||||
oWM_ALIAS = row.Item("WM_ALIAS")
|
||||
Next
|
||||
For Each row As DataRow In drActive
|
||||
ACTIVE_GUID = row.Item("GUID")
|
||||
oACTIVE_GUID = row.Item("GUID")
|
||||
Next
|
||||
|
||||
|
||||
If name <> "" Then
|
||||
Dim result As MsgBoxResult
|
||||
Dim oresult As MsgBoxResult
|
||||
Dim msg = "Wollen Sie die Verbindungs-Konfiguration nun auf '" & name & "' ändern?"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "Would You like to change the Connection-configuration to '" & name & "'?"
|
||||
End If
|
||||
result = MessageBox.Show(msg, "Confirmation:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
If result = MsgBoxResult.Yes Then
|
||||
oresult = MessageBox.Show(msg, "Confirmation:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
If oresult = MsgBoxResult.Yes Then
|
||||
BarButtonItemSwitchCon.Caption = "Switch Connection to: " & name
|
||||
Try
|
||||
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\A.I.S. GmbH\windream\3.6\ServerShareSelector", "CurrentAlias", WM_ALIAS)
|
||||
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\A.I.S. GmbH\windream\3.6\ServerShareSelector", "VFSAlias", WM_ALIAS)
|
||||
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\A.I.S. GmbH\windream\3.6\ServerShareSelector", "CurrentAlias", oWM_ALIAS)
|
||||
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\A.I.S. GmbH\windream\3.6\ServerShareSelector", "VFSAlias", oWM_ALIAS)
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected error in Changing WMAlias: " & ex.Message, True)
|
||||
Exit Sub
|
||||
@@ -1067,12 +1067,15 @@ Public Class frmMain
|
||||
Exit Sub
|
||||
End Try
|
||||
|
||||
SaveMySettingsValue("MyConnectionString", sqlcon, "ConfigMain")
|
||||
SaveMySettingsValue("MyConnectionString", oSqlcon, "ConfigMain")
|
||||
MyConnectionString = oSqlcon
|
||||
Display_ConString()
|
||||
|
||||
If sqlcon_Proxy <> String.Empty Then
|
||||
SaveMySettingsValue("MyProxyConnectionString", sqlcon_Proxy, "ConfigMain")
|
||||
If oSqlcon_Proxy <> String.Empty Then
|
||||
SaveMySettingsValue("MyProxyConnectionString", oSqlcon_Proxy, "ConfigMain")
|
||||
ClassProxy.MyPROXYConnectionString = oSqlcon_Proxy
|
||||
End If
|
||||
Dim sql = String.Format("UPDATE TBPMO_CLIENT_CONN_SWITCH_USER SET ACTIVE = 1 WHERE GUID = {0}", INACTIVE_GUID)
|
||||
Dim sql = String.Format("UPDATE TBPMO_CLIENT_CONN_SWITCH_USER SET ACTIVE = 1 WHERE GUID = {0}", oINACTIVE_GUID)
|
||||
ClassDatabase.Execute_Scalar(sql)
|
||||
If ClassInit.InitDatabase = True Then
|
||||
ClassInit.InitUserLogin()
|
||||
|
||||
Reference in New Issue
Block a user