'--------CODE FOR LOGON PROCEDURE
MsgBox("Checking Logon details for " & strEmail)
Email = strEmail
Password = strPassword
'retrieval of data is hardcoded for testing purposes only
If UCase(strEmail) = "KAREN@WINGTIPTOYS.MSN.COM" And UCase(strPassword) = "PASSWORD" Then
intCustomerID = 1119
FirstName = "Karen"
LastName = "Berge"
Address = "5678 Valley Road," & vbCrLf & "New York," & vbCrLf & "NY 98077"
Company = "Wingtip Toys"
ElseIf UCase(strEmail) = "JOHN@TAILSPINTOYS.MSN.COM" And UCase(strPassword) = "PASSWORD" Then
intCustomerID = 1015
FirstName = "John"
LastName = "Kelly"
Address = "567 Jamb Lane," & vbCrLf & "New York," & vbCrLf & "NY 98133"
Company = "Tailspin Toys"
Else
Throw New Exception("E-mail or password incorrect")
End If
'--------END CODE FOR LOGON PROCEDURE
'--------CODE FOR ADDCUSTOMER PROCEDURE
intCustomerID = 1200 'next available id number
MsgBox("Saving Customer Details as CustomerID " & intCustomerID)
Email = strEmail
Password = strPassword
FirstName = strFName
LastName = strLName
Address = strAddress
Company = strCompany
Return CustomerID
'--------END CODE FOR ADDCUSTOMER PROCEDURE
'--------CODE FOR PARAMETERIZED CONSTRUCTOR
MsgBox("Retrieving Customer Details for CustomerID " & intID)
intCustomerID = intID
'retrieval of data is hardcoded for testing purposes only
If CustomerID = 1119 Then
Email = "karen@wingtiptoys.msn.com"
Password = "password"
FirstName = "Karen"
LastName = "Berge"
Address = "5678 Valley Road," & vbCrLf & "New York," & vbCrLf & "NY 98077"
Company = "Wingtip Toys"
ElseIf CustomerID = 1015 Then
Email = "john@tailspintoys.msn.com"
Password = "password"
FirstName = "John"
LastName = "Kelly"
Address = "567 Jamb Lane," & vbCrLf & "New York," & vbCrLf & "NY 98133"
Company = "Tailspin Toys"
Else
Throw New Exception("Invalid CustomerID")
End If
'--------END CODE FOR PARAMETERIZED CONSTRUCTOR