-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathViewCart.aspx
146 lines (118 loc) · 5.43 KB
/
ViewCart.aspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<%@ Page Title="" Language="VB" MasterPageFile="~/MainLayout.master" AutoEventWireup="false" CodeFile="ViewCart.aspx.vb" Inherits="ViewCart" %>
<asp:Content ID="Content3" ContentPlaceHolderID="head" Runat="Server"></asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:SqlDataSource ID="SqlDSCart2" runat="server"
DataSourceMode="DataSet"
ConnectionString="<%$ ConnectionStrings:PocketStoreConnectionString %>"
ProviderName="<%$ ConnectionStrings:PocketStoreConnectionString.ProviderName %>">
</asp:SqlDataSource>
<div class="container">
<asp:ListView ID="lvCart" runat="server" DataSourceID="SqlDSCart2"
OnItemCommand="lvCart_OnItemCommand" DataKeyField="CartID,ProductID"
RepeatColumns="1" DataKeyNames="CartID">
<LayoutTemplate>
<br />
<br />
<!--- Column Title Row -->
<div class="row" style="color:#fff; font-size:20px ">
<div class="col-sm-2">
</div>
<div class="col-sm-2">
Details
</div>
<div class="col-sm-2">
Price
</div>
<div class="col-sm-2">
Quantity
</div>
<div class="col-sm-2">
Total For This Row
</div>
<div class="col-sm-2"></div>
</div>
<asp:PlaceHolder runat="server" ID="groupPlaceHolder" />
<!--BOTTOM ROW -->
<div class="row">
<div class="col-sm-2"></div>
<div class="col-sm-2"></div>
<div class="col-sm-2"></div>
<div class="col-sm-2"></div>
<div class="col-sm-2"></div>
<div class="col-sm-2" style="font-size:30px; font-style:normal; color:#ffd800; font-family:Candara";>
<asp:LinkButton runat="server" ID="lbClearAll" Text='Clear Cart'
CommandName="cmdClearCart" CommandArgument='<%#Eval("CartID")%>' />
</div>
</div>
<br />
<br />
</LayoutTemplate>
<GroupTemplate>
<asp:PlaceHolder runat="server" id="itemPlaceholder"></asp:PlaceHolder>
</GroupTemplate>
<ItemTemplate>
<br />
<br />
<!--- ITEM ROW -->
<div class="row" style="color:#0094ff">
<!--- I. image -->
<div class="col-sm-2" >
<img src="product-images/<%# Trim(Eval("ProductNo"))%>.jpg" width="80" height="120" >
</div>
<!--- II. details -->
<div class="col-sm-2">
<%# Eval("ProductName")%>
<div class="row">
<div class="col-sm-2">
<p><%# Eval("ProductID")%>/<%# Eval("ProductNo")%></p>
</div>
</div>
</div>
<!--- III. price -->
<div class="col-sm-2" >
<div class="row">
<div class="col-sm-2">
<p>$<%# Eval("Price")%></p>
</div>
</div>
</div>
<!--- IV. quantity -->
<div class="col-sm-2 " >
<div class="row">
<asp:TextBox ID="tbQuantity" Text='<%#Eval("Quantity")%>' runat="server" Width="30px" />
<asp:LinkButton runat="server" OnClick="lbUpdateQuantity_Click" ID="lbUpdateQuantity" Text=' Update Quantity'
CommandName="cmdUpdateQuantity" CommandArgument='<%#Eval("ProductID") %>' />
</div>
</div>
<!--- V. subtotal -->
<div class="col-sm-2">
<p class="cart_total_price">$<%# Eval("Quantity") * Eval("Price") %></p>
</div>
<!--- IV. clear row -->
<div class="col-sm-2" >
<asp:LinkButton runat="server" ID="lbDelete" Text='Clear Row'
CommandName="cmdDelete" CommandArgument='<%# Eval("ProductID") %>' />
</div>
</div>
</ItemTemplate>
</asp:ListView>
<!-- SUBTOTAL ROW -->
<div class="row" style="color:#0ff; font-size:30px ">
<div class="col-sm-2">
</div>
<div class="col-sm-2">
</div>
<div class="col-sm-2">
</div>
<div class="col-sm-2">
Subtotal:
</div>
<div class="col-sm-2">
<asp:Label ID="lbltotal" runat="server" Text=""> </asp:Label>
</div>
<div class="col-sm-2">
<asp:Button ID="checkoutButton" runat="server" text="Check Out" BackColor="#666699" ForeColor="Black" BorderStyle="ridge" BorderWidth="5px" />
</div>
</div>
</div>
</asp:Content>