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

📄 myorder.ascx

📁 网上书店
💻 ASCX
字号:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="MyOrder.ascx.cs" Inherits="DefaultControl_MyOrder" %>
<center>
    &nbsp;<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" 
        CellPadding="3" DataKeyNames="OrderID" GridLines="Horizontal" 
        OnRowDeleting="GridView1_RowDeleting" 
        OnSelectedIndexChanged="GridView1_SelectedIndexChanged" Width="500px">
        <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
        <Columns>
            <asp:BoundField DataField="OrderID" HeaderText="订单号" />
            <asp:BoundField DataField="DateCreated" HeaderText="下单日期" />
            <asp:CommandField ButtonType="Button" HeaderText="订单操作" 
                ShowDeleteButton="True" />
            <asp:CommandField ButtonType="Button" SelectText="显示详情" 
                ShowSelectButton="True" />
        </Columns>
        <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
        <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
        <AlternatingRowStyle BackColor="#F7F7F7" />
    </asp:GridView>
    <asp:Panel ID="Panel1" runat="server" Height="50px" Visible="False" 
        Width="500px">
        &nbsp;<table border="1" cellpadding="0" cellspacing="0" style="width: 500px">
            <tr>
                <td colspan="2">
                    <asp:DetailsView ID="detailViewOrderDetail" runat="server" 
                        AutoGenerateRows="False" BackColor="White" BorderColor="#E7E7FF" 
                        BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Horizontal" 
                        Height="50px" Width="499px">
                        <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                        <EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                        <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
                        <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
                        <Fields>
                            <asp:BoundField DataField="OrderID" HeaderText="订单号" />
                            <asp:BoundField DataField="DateCreated" DataFormatString="{0:d}" 
                                HeaderText="下单日期" />
                            <asp:BoundField DataField="CustomerName" HeaderText="收货人" />
                            <asp:BoundField DataField="CustomerAddress" HeaderText="收货地址" />
                            <asp:BoundField DataField="CustomerPhone" HeaderText="收货人电话" />
                            <asp:BoundField DataField="CustomerEmail" HeaderText="收货人邮箱" />
                            <asp:BoundField DataField="ShipType" HeaderText="邮递方式" />
                            <asp:BoundField DataField="Comments" HeaderText="备注" />
                            <asp:BoundField DataField="Content" HeaderText="订单状态" />
                        </Fields>
                        <FieldHeaderStyle Width="100px" />
                        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
                        <AlternatingRowStyle BackColor="#F7F7F7" />
                    </asp:DetailsView>
                </td>
            </tr>
            <tr>
                <td style="width: 100px; color: #9966cc; background-color: #ccccff;">
                    商品信息:</td>
                <td style="width: 400px">
                    <asp:DataList ID="datalistProducts" runat="server">
                        <ItemTemplate>
                            <table style="width: 400px">
                                <tr>
                                    <td style="width: 100px">
                                        <asp:Label ID="lblBookName" runat="server" Text='<%#Eval("BookName") %>'></asp:Label>
                                    </td>
                                    <td style="width: 100px">
                                        <asp:Label ID="lblPrice" runat="server" Text='<%#Eval("Price") %>'></asp:Label>
                                    </td>
                                    <td style="width: 100px">
                                        <asp:Label ID="lblAmout" runat="server" Text='<%#Eval("Amount") %>'></asp:Label>
                                    </td>
                                    <td style="width: 100px">
                                        <asp:Label ID="lblSubtotal" runat="server" Text='<%#Eval("Subtotal") %>'></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                        <HeaderTemplate>
                            <table style="width: 400px">
                                <tr>
                                    <td align="center" style="width: 100px">
                                        图书名</td>
                                    <td align="center" style="width: 100px">
                                        单价</td>
                                    <td align="center" style="width: 100px">
                                        数量</td>
                                    <td align="center" style="width: 100px">
                                        总额(元)</td>
                                </tr>
                            </table>
                        </HeaderTemplate>
                        <ItemStyle BackColor="LightBlue" ForeColor="#8080FF" />
                        <HeaderStyle BackColor="#C0C0FF" ForeColor="#8080FF" />
                    </asp:DataList>
                </td>
            </tr>
            <tr>
                <td style="width: 100px; color: #9966cc; background-color: #ccccff;">
                    总价:</td>
                <td style="width: 400px; color: #9933cc; background-color: #ccccff;">
                    <asp:Label ID="lblSum" runat="server"></asp:Label>
                </td>
            </tr>
        </table>
    </asp:Panel>
</center>

⌨️ 快捷键说明

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