Default.aspx
上传用户:vtryaojia
上传日期:2020-04-18
资源大小:1214k
文件大小:5k
源码类别:

SCSI/ASPI

开发平台:

Others

  1. <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" >
  4. <head runat="server">
  5.     <title>无标题页</title>
  6. </head>
  7. <body>
  8.     <form id="form1" runat="server">
  9.     <div style="background-attachment: scroll; background-image: url(首页.jpg); background-repeat: repeat-y">
  10.         <asp:Image ID="Image1" runat="server" Height="81px" Width="842px" ImageUrl="~/购物车.jpg" />&nbsp;&nbsp;
  11.         <br />
  12.         <asp:Label ID="Label1" runat="server" BackColor="#FFC0C0" Font-Size="Medium" Height="21px" Width="525px"></asp:Label>
  13.         <asp:LinkButton ID="LinkButton2" runat="server" BackColor="#FFC0C0" Font-Size="Medium"
  14.             Height="20px" PostBackUrl="~/log.aspx" Width="76px">登录</asp:LinkButton>
  15.         <asp:LinkButton ID="LinkButton3" runat="server" BackColor="#FFC0C0" Height="20px"
  16.             PostBackUrl="~/reg.aspx" Width="82px">注册</asp:LinkButton>
  17.         <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
  18.             DataSourceID="AccessDataSource1" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Horizontal" Width="701px" OnSelectedIndexChanged="GridView1_SelectedIndexChanged1">
  19.             <Columns>
  20.                 <asp:BoundField DataField="ID" HeaderText="序号" InsertVisible="False" ReadOnly="True"
  21.                     SortExpression="ID" />
  22.                 <asp:BoundField DataField="GoodsName" HeaderText="产品名称" SortExpression="GoodsName" />
  23.                 <asp:BoundField DataField="ClassName" HeaderText="产品类别" SortExpression="ClassName" />
  24.                 <asp:BoundField DataField="MarktePrice" HeaderText="价格(元)" SortExpression="MarktePrice" />
  25.                 <asp:BoundField DataField="GoodsNumb" HeaderText="数量" SortExpression="GoodsNumb" />
  26.                 <asp:TemplateField ShowHeader="False">
  27.                     <ItemTemplate>
  28.                         <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete"
  29.                             OnClick="LinkButton1_Click" Text="删除"></asp:LinkButton>
  30.                     </ItemTemplate>
  31.                 </asp:TemplateField>
  32.             </Columns>
  33.             <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
  34.             <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
  35.             <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
  36.             <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
  37.             <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
  38.             <AlternatingRowStyle BackColor="#F7F7F7" />
  39.         </asp:GridView>
  40.         <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/zzu.mdb"
  41.             SelectCommand="SELECT * FROM [SpKd]" DeleteCommand="DELETE FROM [SpKd] WHERE [ID] = ?" InsertCommand="INSERT INTO [SpKd] ([ID], [GoodsName], [ClassName], [MarktePrice], [GoodsUnit], [GoodsNumb]) VALUES (?, ?, ?, ?, ?, ?)" UpdateCommand="UPDATE [SpKd] SET [GoodsName] = ?, [ClassName] = ?, [MarktePrice] = ?, [GoodsUnit] = ?, [GoodsNumb] = ? WHERE [ID] = ?">
  42.             <DeleteParameters>
  43.                 <asp:Parameter Name="ID" Type="Int32" />
  44.             </DeleteParameters>
  45.             <UpdateParameters>
  46.                 <asp:Parameter Name="GoodsName" Type="String" />
  47.                 <asp:Parameter Name="ClassName" Type="String" />
  48.                 <asp:Parameter Name="MarktePrice" Type="String" />
  49.                 <asp:Parameter Name="GoodsUnit" Type="String" />
  50.                 <asp:Parameter Name="GoodsNumb" Type="Int32" />
  51.                 <asp:Parameter Name="ID" Type="Int32" />
  52.             </UpdateParameters>
  53.             <InsertParameters>
  54.                 <asp:Parameter Name="ID" Type="Int32" />
  55.                 <asp:Parameter Name="GoodsName" Type="String" />
  56.                 <asp:Parameter Name="ClassName" Type="String" />
  57.                 <asp:Parameter Name="MarktePrice" Type="String" />
  58.                 <asp:Parameter Name="GoodsUnit" Type="String" />
  59.                 <asp:Parameter Name="GoodsNumb" Type="Int32" />
  60.             </InsertParameters>
  61.         </asp:AccessDataSource>
  62.         &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
  63.         <asp:Label ID="Label2" runat="server" BackColor="#FFC0C0" Font-Overline="False" Font-Size="Large"
  64.             ForeColor="Purple" Height="25px" Text="合 计" Width="79px"></asp:Label>
  65.         <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
  66.         <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="继续购物" />
  67.         <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="付款" />
  68.         <asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="清空购物车" Width="112px" />
  69.         <br />
  70.         <br />
  71.         <br />
  72.         <br />
  73.         <br />
  74.         <br />
  75.         <br />
  76.         <br />
  77.         <br />
  78.         <br />
  79.         <br />
  80.         <br />
  81.         <br />
  82.         <br />
  83.         <br />
  84.         <br />
  85.         <br />
  86.         <br />
  87.         <br />
  88.         <br />
  89.     </div>
  90.     </form>
  91. </body>
  92. </html>