⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shoppingcar.aspx

📁 visual stdio 2005
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ShoppingCar.aspx.cs" Inherits="ShoppingCar" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>浏览购物车</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width: 1162px; height: 89px">
            <tr>
                <td colspan="2" style="text-align: center">
                    <asp:Image ID="Image1" runat="server" ImageUrl="~/image/logo.JPG" /></td>
                <td style="width: 191px; vertical-align: text-bottom;">
                    <asp:ImageMap ID="ImageMap2" runat="server" Height="27px" HotSpotMode="Navigate"
                        ImageUrl="~/image/menu1.jpg" Style="vertical-align: text-top" Width="285px">
                        <asp:RectangleHotSpot Bottom="25" HotSpotMode="Navigate" Left="17" NavigateUrl="~/Default.aspx"
                            Right="70" Top="5" />
                        <asp:RectangleHotSpot Bottom="25" HotSpotMode="Navigate" Left="100" NavigateUrl="~/Search.aspx"
                            Right="170" Top="5" />
                        <asp:RectangleHotSpot Bottom="25" HotSpotMode="Navigate" Left="205" NavigateUrl="~/ShoppingCar.aspx"
                            Right="265" Top="5" />
                    </asp:ImageMap></td>
                <td style="width: 91px">
                </td>
                <td style="vertical-align: text-bottom; width: 185px; text-align: right">
                    <asp:Menu ID="Menu1" runat="server" BackColor="#FFFBD6" Font-Names="Verdana" Font-Size="Small"
                        ForeColor="#990000" Height="21px" Orientation="Horizontal" Width="303px">
                        <StaticSelectedStyle BackColor="#FFCC66" />
                        <Items>
                            <asp:MenuItem ImageUrl="~/image/p_gwc.gif" NavigateUrl="~/ShoppingCar.aspx" SeparatorImageUrl="~/image/bj_line.gif"
                                Text="购物车" Value="购物车"></asp:MenuItem>
                            <asp:MenuItem SeparatorImageUrl="~/image/bj_line.gif" Text="我的帐户" Value="用户信息"></asp:MenuItem>
                            <asp:MenuItem NavigateUrl="~/Register.aspx" SeparatorImageUrl="~/image/bj_line.gif"
                                Text="新帐户注册" Value="新帐户注册"></asp:MenuItem>
                            <asp:MenuItem NavigateUrl="~/help.aspx" SeparatorImageUrl="~/image/bj_line.gif" Text="帮助中心"
                                Value="帮助中心"></asp:MenuItem>
                            <asp:MenuItem NavigateUrl="~/quite.aspx" SeparatorImageUrl="~/image/bj_line.gif"
                                Text="退出" Value="退出"></asp:MenuItem>
                        </Items>
                    </asp:Menu>
                </td>
            </tr>
            <tr>
                <td colspan="5" style="vertical-align: text-top; height: 38px; text-align: center">
                    <asp:Image ID="Image2" runat="server" ImageUrl="~/image/line.bmp" Width="951px" /></td>
            </tr>
            <tr>
                <td colspan="3" style="text-align: center; height: 33px;">
                    <asp:Image ID="Image3" runat="server" ImageUrl="~/image/shop-cart-header-blue.gif" /></td>
                <td style="width: 91px; height: 33px;">
                </td>
                <td style="width: 185px; height: 33px;">
                </td>
            </tr>
            <tr>
                <td colspan="5" style="text-align: center; height: 208px;">
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
                        DataKeyNames="ID,BName" DataSourceID="AccessDataSource1" ForeColor="#333333" GridLines="None"
                        Height="174px" Width="833px" AllowSorting="True" OnRowDeleted="GridView1_RowDeleted">
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <Columns>
                            <asp:ButtonField ButtonType="Button" CommandName="Delete" Text="移除此书" />
                            <asp:BoundField DataField="BName" HeaderText="书籍名称" SortExpression="BName">
                                <ItemStyle HorizontalAlign="Center" Width="600px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="BPrice1" HeaderText="单价" SortExpression="BPrice1" DataFormatString="¥{0:C}">
                                <ItemStyle Width="40px" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="数量">
                                <ItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("BNum", "{0}") %>' Width="46px" EnableTheming="True" Wrap="False"></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <RowStyle BackColor="#EFF3FB" />
                        <EditRowStyle BackColor="#2461BF" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                </td>
            </tr>
            <tr>
                <td style="width: 56px; height: 44px">
                </td>
                <td style="width: 112px; height: 44px">
                </td>
                <td style="width: 191px; height: 44px">
                </td>
                <td style="width: 91px; height: 44px">
                </td>
                <td style="width: 185px; height: 44px; text-align: right">
                    <asp:Button ID="Button3" runat="server" OnClick="Button3_Click1" Text="刷新购书数量" /></td>
            </tr>
            <tr>
                <td style="width: 56px; height: 49px">
                </td>
                <td style="width: 112px; height: 49px">
                </td>
                <td style="width: 191px; height: 49px">
                </td>
                <td style="width: 91px; height: 49px">
                </td>
                <td style="width: 185px; height: 49px; text-align: right">
                    <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Overline="False" Font-Underline="False"
                        ForeColor="Red" Text="总计:"></asp:Label>
                    <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Underline="False" ForeColor="Red"
                        Text="Label" Font-Size="Large"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="width: 56px">
                </td>
                <td style="width: 112px">
                </td>
                <td style="width: 191px">
                </td>
                <td style="width: 91px">
                    <asp:Button ID="Button1" runat="server" PostBackUrl="~/Default.aspx" Text="继续购物"
                        Width="98px" /></td>
                <td style="width: 185px">
                    &nbsp;
                    <asp:Button ID="Button2" runat="server" Text="提交订单" Width="106px" OnClick="Button2_Click" /></td>
            </tr>
            <tr>
                <td colspan="5" style="vertical-align: text-bottom; height: 117px; text-align: center">
                    <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/BDB/BookStore.mdb"
                        DeleteCommand="DELETE FROM [BookCar] WHERE [ID] = ?" InsertCommand="INSERT INTO [BookCar] ([ID], [BName], [BAuthor], [BChuban], [BKind], [BNum], [BPrice1], [BPrice2]) VALUES (?, ?, ?, ?, ?, ?, ?, ?)"
                        OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [BookCar]"
                        UpdateCommand="UPDATE [BookCar] SET [BName] = ?, [BAuthor] = ?, [BChuban] = ?, [BKind] = ?, [BNum] = ?, [BPrice1] = ?, [BPrice2] = ? WHERE [ID] = ?">
                        <DeleteParameters>
                            <asp:Parameter Name="original_ID" Type="Int32" />
                        </DeleteParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="BName" Type="String" />
                            <asp:Parameter Name="BAuthor" Type="String" />
                            <asp:Parameter Name="BChuban" Type="String" />
                            <asp:Parameter Name="BKind" Type="String" />
                            <asp:Parameter Name="BNum" Type="Int16" />
                            <asp:Parameter Name="BPrice1" Type="Int16" />
                            <asp:Parameter Name="BPrice2" Type="Int16" />
                            <asp:Parameter Name="original_ID" Type="Int32" />
                        </UpdateParameters>
                        <InsertParameters>
                            <asp:Parameter Name="ID" Type="Int32" />
                            <asp:Parameter Name="BName" Type="String" />
                            <asp:Parameter Name="BAuthor" Type="String" />
                            <asp:Parameter Name="BChuban" Type="String" />
                            <asp:Parameter Name="BKind" Type="String" />
                            <asp:Parameter Name="BNum" Type="Int16" />
                            <asp:Parameter Name="BPrice1" Type="Int16" />
                            <asp:Parameter Name="BPrice2" Type="Int16" />
                        </InsertParameters>
                    </asp:AccessDataSource>
                    <asp:Label ID="Label3" runat="server" Font-Size="X-Small" ForeColor="DimGray" Text="Copyright (C) 19小组 2008-9999, All Rights Reserved 19小组"></asp:Label></td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -