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_LocalArea
	Inherits System.Web.UI.UserControl
	Dim _objaccount As IAccount
	Public Property Account() As IAccount
		Get
			Return _objaccount
		End Get
		Set(ByVal value As IAccount)
			_objaccount = value
		End Set
	End Property
  Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
		'Dim objaccount As IAccount															'commntd
		'objaccount = AccountManager.Instance.GetAccount()      'commntd

    Dim _areaID As Integer

		_areaID = _objaccount.AreaID		 'objaccount is changed to _objaccount
		HttpContext.Current.Response.Cookies.Add(New HttpCookie(CookieKey.AreaName, _objaccount.AreaName))	'objaccout is changed to _objaccount
    'ltrHead.Text = String.Format("ControlID:{0};OwnerID:{0};OwnerType:{2}", "LocalArea:Head", _areaID, OwnerType.ZipCode)	'ContentManager.Instance.GetContent("LocalArea:Head", _areaID, OwnerType.ZipCode)
    'ltrHead.Text = ContentManager.Instance.GetContent("LocalArea:Head", _areaID, OwnerType.ZipCode)
    'ltrBody.Text = String.Format("ControlID:{0};OwnerID:{0};OwnerType:{2}", "LocalArea:Body", _areaID, OwnerType.ZipCode)	'ContentManager.Instance.GetContent("LocalArea:Body", _areaID, OwnerType.ZipCode)
    If _areaID <> 0 Then
      ltrBody.Text = ContentManager.Instance.GetContent("LocalArea:Body", _areaID, OwnerType.ZipCode)
    Else
			ltrBody.Text = "<BR><BR><B>We're sorry, but we were unable to find the zip code you entered.&nbsp;&nbsp;Please enter your zip code again in the box above.</B>"
    End If
  End Sub
End Class
