(
<%@ Import Namespace=
<%@ Import Namespace=
(
(
(
Imports System
Imports System
Imports Wrox
Partial Class Checkout
Inherits System
Sub Page_Load(ByVal sender As Object
Trace
If Not Page
If Profile
NoCartlabel
Wizard
End If
Trace
If User
Wizard
Else
Wizard
End If
End If
End Sub
Sub chkUseProfileAddress_CheckedChanged(ByVal sender As Object
If chkUseProfileAddress
txtName
txtAddress
txtCity
txtCounty
txtPostCode
txtCountry
End If
End Sub
Sub Wizard
Dim conn As SqlConnection = Nothing
Dim trans As SqlTransaction = Nothing
Dim cmd As SqlCommand
Try
conn = New SqlConnection(ConfigurationManager
conn
trans = conn
cmd = New SqlCommand()
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
cmd
Dim OrderID As Integer
OrderID = Convert
cmd
cmd
cmd
cmd
cmd
cmd
cmd
For Each item As CartItem In Profile
cmd
cmd
cmd
cmd
Next
trans
Catch SqlEx As SqlException
If trans IsNot Nothing Then
trans
End If
Throw New Exception(
CreateOrderErrorLabel
Return
Finally
If conn IsNot Nothing Then
conn
End If
End Try
Profile
End Sub
Sub Wizard
Trace
If e
Dim l As System
If Membership
FormsAuthentication
e
Else
Trace
l
l
e
End If
Else
If Not User
e
Wizard
End If
End If
End Sub
Protected Sub Wizard
If Not User
Trace
Wizard
End If
End Sub
End Class
[
From:http://tw.wingwit.com/Article/program/net/201311/15651.html