Imports CharterDotCom.CommonEntities.Library.Enumerations
Imports CharterDotCom.WebSite.Library
Imports CharterDotCom.CommonEntities.Library

Partial Class Customers_SupportOverview
    Inherits CharterCMSPage

    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
        SetContentKeys()

        If Not (Application("IntelliResponse_ENABLED") Is Nothing) Then
            If Application("IntelliResponse_ENABLED").ToString().Trim().ToLower() = "t" Then
                ucSearchSupport.Visible = False
            End If
        End If
    End Sub

    Private Sub SetContentKeys()
        'Support / Overview
        Me.litSupportOverviewHeader.Text = GetCMSContent("Support:Overview:Header")
        Me.litSupportOverviewAlert.Text = GetCMSContent("Support:Overview:Alert")
        Me.litSupportOverviewCable.Text = GetCMSContent("Support:Overview:Cable")
        Me.litSupportOverviewInternet.Text = GetCMSContent("Support:Overview:Internet")
        Me.litSupportOverviewPhone.Text = GetCMSContent("Support:Overview:Phone")
        Me.litSupportOverviewMyAccountBilling.Text = GetCMSContent("Support:Overview:MyAccountBilling")
        Me.litSupportHomeResourcesHelpTools.Text = GetCMSContent("Support:Home:ResourcesHelpTools:SYCH")
    End Sub

    Private Function GetCMSContent(ByVal userControlName As String) As String
        Dim cmsContent As String = String.Empty
        cmsContent = ContentManager.Instance.GetContent(userControlName, "1", OwnerType.Other)
        If (cmsContent Is Nothing) Then
            cmsContent = "content not found: " & userControlName
        End If
        Return cmsContent
    End Function
End Class
