Imports CharterDotCom.CommonEntities.Library
Imports CharterDotCom.CommonEntities.Library.Common
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.WebSite.Library
Imports CharterDotCom.WebSite.Library.BLCommon

Partial Class Visitors_ContentPopup
    Inherits CharterCMSPage

  Private _title As String
  Private _control As String
  Private _ownerID As String
  Private _ownerType As OwnerType

  Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
    If Request.Params(QueryStringName.ControlID) = String.Empty Then
      _control = String.Empty
      _ownerID = String.Empty
    Else
      _control = Request.Params(QueryStringName.ControlID)
      _ownerID = Request.Params(QueryStringName.OwnerID)
      _ownerType = Request.Params(QueryStringName.OwnerTypeID)
    End If
        _title = "Charter Communications"

  End Sub

  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        SetPageTitle("")
        Dim choiceID As Integer

    If Not Page.IsPostBack Then
      If Not (Control = String.Empty OrElse OwnerID = String.Empty) Then
        choiceID = CType(Request.QueryString(QueryStringName.ChoiceID), Integer)

        ltrContent.Text = ContentManager.Instance.GetContent(Control, OwnerID, TypeofOwner)

        If ltrContent.Text = String.Empty Then
          ltrContent.Text = String.Format("ControlID - {0}; OwnerID --- {1}; OwnerTypeID - {2}", Control, OwnerID, TypeofOwner)
        End If
      End If
    End If
  End Sub

  Public Property PageTitle() As String
    Get
      Return _title
    End Get
    Set(ByVal value As String)
            _title = value
            SetPageTitle(_title)
    End Set
  End Property

  Protected ReadOnly Property Control() As String
    Get
      Return _control
    End Get
  End Property

  Protected ReadOnly Property OwnerID() As String
    Get
      Return _ownerID
    End Get
  End Property

  Protected ReadOnly Property TypeofOwner() As OwnerType
    Get
      Return _ownerType
    End Get
  End Property
End Class
