This commit is contained in:
Digital Data - Marlon Schreiber
2018-07-13 10:30:32 +02:00
parent 8103f5d055
commit 2d11c3a677
14 changed files with 1303 additions and 1621 deletions

View File

@@ -120,8 +120,35 @@ Public Class frmMain
MsgBox("Error in Load Form:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
Proxy_Server_Controls()
CONN_Manager
End If
End Sub
Sub CONN_Manager()
Try
RibbonPageGroupConnManager.Visible = False
If Not IsNothing(CURRENT_TBPMO_CONN_SWITCH) Then
If CURRENT_TBPMO_CONN_SWITCH.Rows.Count > 1 Then
Dim dt2 As DataTable = CURRENT_TBPMO_CONN_SWITCH
Dim dr2 As DataRow() = dt2.Select("ACTIVE = 0")
Dim name = ""
For Each row As DataRow In dr2
name = row.Item("DESCRIPTION")
Next
If name <> "" Then
BarButtonItemSwitchCon.Caption = "Switch Connection to: " & name
RibbonPageGroupConnManager.Visible = True
End If
End If
End If
Catch ex As Exception
ClassLogger.Add("Unexpected Error in CONN_Manager:" & ex.Message, True)
End Try
End Sub
Sub Proxy_Server_Controls()
If LICENSE_PROXY = True And clsDatabase.DB_PROXY_INITIALIZED = True Then
'itemRefreshProxy.Visibility = BarItemVisibility.Always
@@ -966,4 +993,44 @@ Public Class frmMain
Private Sub BarButtonItem13_ItemClick(sender As Object, e As ItemClickEventArgs) Handles BarButtonItem13.ItemClick
OpenLogRecord()
End Sub
Private Sub BarButtonItemSwitchCon_ItemClick(sender As Object, e As ItemClickEventArgs) Handles BarButtonItemSwitchCon.ItemClick
Try
Dim dt2 As DataTable = CURRENT_TBPMO_CONN_SWITCH
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
For Each row As DataRow In drInActive
INACTIVE_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")
Next
If name <> "" Then
Dim result 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
BarButtonItemSwitchCon.Caption = "Switch Connection to: " & name
Dim sql = String.Format("UPDATE TBPMO_CLIENT_CONN_SWITCH_USER SET ACTIVE = 1 WHERE GUID = {0}", INACTIVE_GUID)
ClassDatabase.Execute_Scalar(sql)
ClassInit.Init_CONN_SWITCH()
End If
End If
Catch ex As Exception
End Try
End Sub
End Class