
Partial Class domain_activation
    Inherits System.Web.UI.Page


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Request.QueryString("key") Is Nothing Then
            If Request.QueryString("key") = "0" Then
                Me.ResultLabel.Text = Me.GetLocalResourceObject("ActivationResult_5")
            Else
                Dim _webWS As New WebWS
                Dim _ds As System.Data.DataSet = _webWS.GetDomainNameByActivationKey(Request.QueryString("key"))
                If _ds.Tables(0).Rows.Count > 0 Then
                    If Not Convert.ToString(_ds.Tables(0).Rows(0).Item("ActivationKey")).Equals("") Then
                        If _ds.Tables(0).Rows(0).Item("IsActive").Equals("True") Then
                            Me.ResultLabel.Text = Me.GetLocalResourceObject("ActivationResult_4")
                        Else
                            If _webWS.UpdateDomainIsActive(Request.QueryString("key"), True) Then
                                Me.ResultLabel.Text = Me.GetLocalResourceObject("ActivationResult_3") & _
                                    "<br/><br/><b><a href='http://" & _ds.Tables(0).Rows(0).Item("DomainName").ToString() & ".goprint2.com'>" & _
                                        _ds.Tables(0).Rows(0).Item("DomainName").ToString() & ".goprint2.com</a></b>"
                            Else
                                Me.ResultLabel.Text = Me.GetLocalResourceObject("ActivationResult_2")
                            End If
                        End If
                    End If
                Else
                    Me.ResultLabel.Text = Me.GetLocalResourceObject("ActivationResult_1")
                End If
            End If
        End If
    End Sub

End Class
