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 EBSServicesProvider

Partial Class LoadTest_TestLocalize
    Inherits System.Web.UI.Page


    Private _provider As IEBSServicesProvider

    Private Property Provider() As IEBSServicesProvider
        Get
            Return _provider
        End Get
        Set(ByVal value As IEBSServicesProvider)
            _provider = value
        End Set
    End Property

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        On Error Resume Next
        '################
        'TEST LOCALIZE 
        '################
        'Dim am2 As New BLAccountManager
        'Dim Localized As Boolean = am2.Localize(CType(HttpContext.Current.Request.Cookies(CookieName.SessionID).Value, String), "11943 Del reo ct", "", "63138", False)
        'If Localized Then
        '    Response.Write("Localized is Good" & "<br>")
        'Else
        '    Response.Write("Localized is <b>Bad</b>" & "<br>")
        'End If





        Me.Provider = New ProviderManager()

        Dim objRequest As New GetServiceabilityRequest
        Dim objResult As New GetServiceabilityResponse

        Dim lCriteria As New ServiceabilityCriteria
        Dim lAddress As New ServiceabilityCriteriaAddress
        lAddress.AddressLine1 = "6318 Alaska Ave"
        lAddress.AddressLine2 = ""
        lAddress.CleansedAddress = True
        lAddress.ZipCode = "63111"
        lAddress.ZipCode4 = ""
        lCriteria.Item = lAddress
        lCriteria.ItemElementName = ItemChoiceType.Address
        objRequest.Criteria = lCriteria

        objResult = Me.Provider.GetServiceability(objRequest)

        If Not (objResult Is Nothing) Then
            If Not (objResult.Exception) Then
                Response.Write("SERVICEABILITY is Good" & "<br>")
            Else
                Response.Write("SERVICEABILITY is <b>Bad</b>" & "<br>")
            End If
        Else
            Response.Write("SERVICEABILITY is <b>Bad</b>" & "<br>")
        End If
    End Sub
End Class
