<%@ Page Language="C#" MasterPageFile="~/admins/Masteradmin.master" AutoEventWireup="true" CodeFile="OrderManager.aspx.cs" Inherits="admins_OrderManager" Title="星欣书城" %>
<%-- 在此处添加内容控件 --%>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <div style="width: 362px; height: 7px">
        <asp:Label ID="Label1" runat="server" ForeColor="Red" Text="用户管理" Width="148px"></asp:Label></div>
    <div>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" DataSourceID="AccessDataSource1" Height="1px" DataKeyNames="orderID"
            PageSize="8" Width="1200px">
            <Columns>
                <asp:BoundField DataField="orderID" HeaderText="订单号" SortExpression="orderID" />
                <asp:BoundField DataField="book_name" HeaderText="书名" SortExpression="book_name" />
                <asp:BoundField DataField="price" HeaderText="总价格" SortExpression="price" />
                <asp:BoundField DataField="userName" HeaderText="网名" SortExpression="userName" />
                <asp:BoundField DataField="trueName" HeaderText="真实姓名" SortExpression="trueName" />
                <asp:BoundField DataField="address" HeaderText="地址" SortExpression="address" />
                <asp:BoundField DataField="postcode" HeaderText="邮政编码" SortExpression="postcode" />
                <asp:BoundField DataField="phone" HeaderText="电话" SortExpression="phone" />
                <asp:BoundField DataField="email" HeaderText="邮箱" SortExpression="email" />
                <asp:BoundField DataField="payMode" HeaderText="付费方式" SortExpression="payMode" />
                <asp:BoundField DataField="carryMode" HeaderText="配送方式" SortExpression="carryMode" />
                <asp:BoundField DataField="orderTime" HeaderText="订单时间" SortExpression="orderTime" />
                <asp:BoundField DataField="orderState" HeaderText="订单状态" SortExpression="orderState" />
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ShowSelectButton="True" />
            </Columns>
        </asp:GridView>
        <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/database.mdb"
            DeleteCommand="DELETE FROM order_info WHERE orderID=@orderID" SelectCommand="SELECT book_info.book_name, order_book.orderID, order_book.price, user_info.userName, user_info.trueName, user_info.address, user_info.postcode, user_info.phone, user_info.email, order_info.payMode, order_info.carryMode, order_info.orderTime, order_info.orderState FROM (((book_info INNER JOIN order_book ON book_info.book_ID = order_book.book_ID) INNER JOIN order_info ON order_book.orderID = order_info.orderID) INNER JOIN user_info ON order_info.userID = user_info.userID)"
            UpdateCommand="UPDATE order_info SET carryMode = @carryMode, orderState = @orderState">
            <DeleteParameters>
            <asp:Parameter Name="orderID" Type=Int32 />
            
            </DeleteParameters>
            <UpdateParameters>
            <asp:Parameter Name="carryMode" Type=string />
               <asp:Parameter Name="orderState" Type=string />
         
            </UpdateParameters>
            </asp:AccessDataSource>
            
        &nbsp;
    </div>
</asp:Content>
