Listing L
Public Class CreateCustomer
    Inherits System.Web.UI.Page
    Protected WithEvents txtEmail As System.Web.UI.WebControls.TextBox
    Protected WithEvents Label2 As System.Web.UI.WebControls.Label
    Protected WithEvents txtFirstName As System.Web.UI.WebControls.TextBox
    Protected WithEvents Label3 As System.Web.UI.WebControls.Label
    Protected WithEvents txtPassword As System.Web.UI.WebControls.TextBox
    Protected WithEvents Label4 As System.Web.UI.WebControls.Label
    Protected WithEvents txtLastName As System.Web.UI.WebControls.TextBox
    Protected WithEvents Label5 As System.Web.UI.WebControls.Label
    Protected WithEvents btnCreate As System.Web.UI.WebControls.Button
    Protected WithEvents rfvEmail As System.Web.UI.WebControls.RequiredFieldValidator
    Protected WithEvents rfvPassword As System.Web.UI.WebControls.RequiredFieldValidator
    Protected WithEvents txtConfirm As System.Web.UI.WebControls.TextBox
    Protected WithEvents Label6 As System.Web.UI.WebControls.Label
    Protected WithEvents lblResult As System.Web.UI.WebControls.Label
    Protected WithEvents cmpPassword As System.Web.UI.WebControls.CompareValidator
    Protected WithEvents rfvConfirmPw As System.Web.UI.WebControls.RequiredFieldValidator
    Protected WithEvents Label1 As System.Web.UI.WebControls.Label
 
 
#Region " Web Form Designer Generated Code "
 
 
    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
 
 
    End Sub
 
 
    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub
 
 
#End Region
 
 
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.lblResult.Visible = False
    End Sub
 
 
 
 
    '#########################################################################################################################
    ' Creates a new customer record allowing them to place orders in the system
    '#########################################################################################################################
    Private Sub btnCreate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreate.Click
        Try
            Dim CustObj As New CustomerServices()
            CustObj.CreateCustomer(Me.txtEmail.Text, Me.txtPassword.Text, Me.txtFirstName.Text, Me.txtLastName.Text)
 
 
            Me.lblResult.Visible = True
            Me.lblResult.Text = "Your account was created successfully, you may now login"
        Catch ex As Exception
            Me.lblResult.Visible = True
            Me.lblResult.Text = "There was an error creating your account"
        End Try
    End Sub
 
 
 
 
End Class