Imports System
Imports System.ComponentModel
Imports System.Collections.Generic
Imports System.Diagnostics
Imports System.Text
Imports Microsoft.VisualBasic
Imports System.Web
Imports System.Web.Security
Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Web
Imports DevExpress.ExpressApp.Actions
Imports DevExpress.Persistent.Base

Public Class LogonWC
    Inherits DevExpress.ExpressApp.WindowController
    Public SISBusinessAction As SingleChoiceAction
    Public Const DBName As String = "Gatya; Zokni"
    Public Sub New()
        Me.TargetWindowType = WindowType.Main

        'If WebApplication.OldStyleLayout Then
        '    SISBusinessAction = New SingleChoiceAction(Me, "SISBusiness", "Tools")
        'Else
        '    SISBusinessAction = New SingleChoiceAction(Me, "SISBusiness", "Security")
        'End If
        'For Each databaseName As String In DBName.Split(";"c)
        '    SISBusinessAction.Items.Add(New ChoiceActionItem(databaseName, databaseName))
        'Next databaseName
        'AddHandler SISBusinessAction.Execute, AddressOf SISBusinessAction_Execute
    End Sub

    Protected Overrides Sub OnActivated()
        MyBase.OnActivated()
        'For Each item As ChoiceActionItem In SISBusinessAction.Items
        '    If Application.ConnectionString.Contains(CStr(item.Data)) Then
        '        SISBusinessAction.SelectedItem = item
        '        Exit For
        '    End If
        'Next item
    End Sub
    Private Sub SISBusinessAction_Execute(ByVal sender As Object, ByVal e As SingleChoiceActionExecuteEventArgs)
        'WebApplication.Redirect(FormsAuthentication.DefaultUrl & "?" & DBName & "=" & CStr(e.SelectedChoiceActionItem.Data))
    End Sub
End Class

