Imports System.Collections.Generic
Imports System.Text
Imports CharterDotCom.CommonEntities.Library
Imports CharterDotCom.CommonEntities.Library.Enumerations
Imports CharterDotCom.CommonEntities.Library.EntityMemberServices
'Imports CharterDotCom.CommonEntities.Library.EntityEBSServices
Imports CharterDotCom.CommonEntities.Library.EntitySupport
Imports CharterDotCom.CommonEntities.Library.EntitySearch
Imports CharterDotCom.CommonEntities.Library.EntityWebConfig
'Imports CharterDotCom.CommonEntities.Library.EntityG2BServices
Imports CharterDotCom.CommonEntities.Library.Common
Imports CharterDotCom.WebSite.Library

Partial Class Controls_CharterMessages
	Inherits System.Web.UI.UserControl

	Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim _messages As String
		

        If Not Page.IsPostBack Then

            Dim _account As IAccount
            _account = AccountManager.Instance.GetAccount()


            '###############################################################
            'MODIFICATION   SIVA DOLA   CHARTER BUSINESS    11/02/2008
            '###############################################################
            Dim blnCBMyAccountUse As String = Application("ENABLE_CHARTER_BUSINESS_MYACCOUNT_SECTION")
            If Not (blnCBMyAccountUse Is Nothing) Then
                Select Case blnCBMyAccountUse.Trim().ToUpper()
                    Case "T"
                        '#######################################################################
                        '11/02/2008     Siva Dola   
                        'Users are directed based on account type(Residential or Bussiness) 
                        '#######################################################################
                        If Not _account Is Nothing Then
                            If Not (_account.AccountType Is Nothing) Then
                                Select Case True
                                    Case _account.AccountType.ToLower().Trim() = "commercial"
                                        _messages = ContentManager.Instance.GetContent("cb:messages", "1", OwnerType.Other)
                                    Case _account.AccountType.ToLower().Trim() = "bus"
                                        _messages = ContentManager.Instance.GetContent("cb:messages", "1", OwnerType.Other)
                                    Case Else
                                        '#################################################################
                                        'CONSIDERED TO BE RESEDENTIAL CUSTOMERS, SEND TO THE RESIDENTIAL 
                                        'MY ACCOUNT LANDING PAGE.
                                        '#################################################################
                                        _messages = ContentManager.Instance.GetContent("chartermessages", "1", OwnerType.Other)
                                End Select
                            Else
                                _messages = ContentManager.Instance.GetContent("chartermessages", "1", OwnerType.Other)
                            End If
                        Else
                            _messages = ContentManager.Instance.GetContent("chartermessages", "1", OwnerType.Other)
                        End If
                        '#######################################################################
                    Case Else
                        '###############################################################
                        'ASSUME THE CHARTER BUSINESS MYACCOUNT SECTION IS TURNED OFF, 
                        'JUST SHOW THE NORMAL RESEDENTIAL.
                        '###############################################################
                        _messages = ContentManager.Instance.GetContent("chartermessages", "1", OwnerType.Other)
                End Select
            Else
                _messages = ContentManager.Instance.GetContent("chartermessages", "1", OwnerType.Other)
            End If
            '###############################################################
            '###############################################################


            ltrMessages.Text = _messages

        End If
	End Sub
End Class
