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_PrintChannels
    Inherits CharterCMSPage


	Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        SetPageTitle("Print Channels")
        Dim address1 As String
		Dim address2 As String
		Dim zipCode As String
		Dim lineup As IChannelLineUp

		If Not Page.IsPostBack Then
			rprChannels.Visible = False

			If Request.QueryString("addr1") Is Nothing Or Request.QueryString("zip") Is Nothing Then
				Exit Sub
			End If

			address1 = Server.UrlDecode(Request.QueryString("addr1"))

			If Request.QueryString("addr2") IsNot Nothing Then
				address2 = Server.UrlDecode(Request.QueryString("addr2"))
			Else
				address2 = String.Empty
			End If

			zipCode = Server.UrlDecode(Request.QueryString("zip"))

			lineup = SiteManager.Instance.GetChannelLineup(address1, address2, zipCode, False)

			If lineup IsNot Nothing Then
				rprChannels.DataSource = lineup.ChannelLineUp
				rprChannels.DataBind()
				rprChannels.Visible = True
			End If
		End If
	End Sub
End Class