-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewcart.aspx
75 lines (69 loc) · 2.94 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
<%@ Page Language="C#" Debug="true" %>
<%@ import Namespace="Westrans" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.OleDb" %>
<script runat="server">
void Page_Load(Object sender, EventArgs e) {
string strDb = Server.MapPath("\\westrans\\db\\example.mdb");
string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strDb;
Cart west = new Cart(strConn);
dgCart.DataSource = west.GetCart(west.GetCartID());
dgCart.DataBind();
}
void dgCart_ItemCommand(Object source, DataGridCommandEventArgs e) {
if (((LinkButton)e.CommandSource).CommandName == "RemoveFromCart")
{
}
}
</script>
<html>
<head>
<title>Wes-T-Rans Parts and Service Department</title>
</head>
<body>
<form runat="server">
<table width="100%" border="0">
<tbody>
<tr>
<td colspan="3">
<p align="center">
<strong><font color="#0000c0" size="5">Wes-T-Rans Parts and Service Department</font></strong>
</p>
</td>
</tr>
<tr>
<td>
<div align="left">
<asp:LinkButton id="lbtnCheckOut" runat="server">Checkout</asp:LinkButton>
<asp:HyperLink id="hlContinue" runat="server" NavigateUrl="default.aspx">Continue Shopping</asp:HyperLink>
</div>
</td>
<td>
<p align="right">
<asp:LinkButton id="btnLogin" runat="server">Login</asp:LinkButton>
</p>
</td>
</tr>
<tr>
<td colspan="2">
<p>
<asp:DataGrid id="dgCart" runat="server" Width="100%" AllowPaging="True" AllowCustomPaging="True" OnItemCommand="dgCart_ItemCommand">
<HeaderStyle horizontalalign="Center" backcolor="Gray"></HeaderStyle>
<PagerStyle horizontalalign="Center" mode="NumericPages"></PagerStyle>
<AlternatingItemStyle backcolor="Silver"></AlternatingItemStyle>
<Columns>
<asp:ButtonColumn Text="Remove" HeaderText="Remove From Cart" CommandName="RemoveFromCart">
<ItemStyle horizontalalign="Center"></ItemStyle>
</asp:ButtonColumn>
</Columns>
</asp:DataGrid>
</p>
</td>
</tr>
</tbody>
</table>
<asp:Label id="Message" runat="server"></asp:Label>
</form>
</body>
</html>