<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Order.aspx.cs" Inherits="TopWinCMS.WebUI.Admin.Shop.Order" %>

<%@ Register Assembly="TopWinCMS.WebControls" Namespace="TopWinCMS.WebControls" TagPrefix="cc1" %>
<%@ Register Src="../UC_AjaxLoading.ascx" TagName="UC_AjaxLoading" TagPrefix="uc1" %>
<!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Pragma" content="no-cache" />

    <script language="javascript" type="text/javascript" src="../TopWin.js"></script>

    <link rel="stylesheet" type="text/css" href="../Style.css" />

    <script language="javascript" type="text/javascript" src="../../Images/skysoft.js"></script>

</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
        <ProgressTemplate>
            <uc1:UC_AjaxLoading ID="UC_AjaxLoading1" runat="server" />
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table style="width: 100%;" border="0" cellpadding="4" cellspacing="0" id="NavigationPath">
                <tr>
                    <td>
                        &nbsp;<img src='../../Images/arrow.gif' alt="" />
                        您现在的位置：<asp:Label ID="LB_Path" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        搜索：
                        <asp:TextBox ID="TB_KeyWord" runat="server"></asp:TextBox>
                        <asp:DropDownList ID="DDL_Sort" runat="server" EnableViewState="False">
                            <asp:ListItem Value="OrderNum">订单号</asp:ListItem>
                            <asp:ListItem Value="UserName">订货人</asp:ListItem>
                            <asp:ListItem>收货人</asp:ListItem>
                        </asp:DropDownList>
                        &nbsp; &nbsp;<asp:DropDownList ID="DDL_Status" runat="server">
                            <asp:ListItem Value="-1">订单状态</asp:ListItem>
                            <asp:ListItem Value="0">等待确认</asp:ListItem>
                            <asp:ListItem Value="1">已经确认,未付款</asp:ListItem>
                            <asp:ListItem Value="2">已付定金</asp:ListItem>
                            <asp:ListItem Value="3">已经付清</asp:ListItem>
                            <asp:ListItem Value="4">交易成功结束</asp:ListItem>
                        </asp:DropDownList>
                        &nbsp;
                        <asp:DropDownList ID="DDL_DeliverStatus" runat="server">
                            <asp:ListItem Value="-1">发货状态</asp:ListItem>
                            <asp:ListItem Value="0">未开始配送</asp:ListItem>
                            <asp:ListItem Value="1">配送准备中</asp:ListItem>
                                <asp:ListItem Value="2">已发货</asp:ListItem>
                                <asp:ListItem Value="3">已签收</asp:ListItem>
                                <asp:ListItem Value="99">物流失败</asp:ListItem>
                        </asp:DropDownList>
                        
                        <asp:Button ID="BT_Search" runat="server" Text="搜索" EnableViewState="False" CssClass="btn"
                            OnClick="BT_Search_Click"></asp:Button>
                    </td>
                </tr>
            </table>
            <asp:GridView ID="GV_List" runat="server" AutoGenerateColumns="False" CssClass="GridView"
                DataKeyNames="ID">
                <Columns>
                    <asp:TemplateField HeaderText="选择">
                        <HeaderTemplate>
                            <input name="chkHeader" onclick="javascript:SelectAll(this);" type="checkbox" value="chkHeader" /></HeaderTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="单号(点击打开)">
                        <ItemTemplate>
                            <%# MyLink(Eval("OrderNum"), Eval("ID"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="订购者" DataField="UserName" HeaderStyle-Width="100px" />
                    <asp:BoundField HeaderText="总金额" DataField="MoneyGoods" DataFormatString="{0:C}"
                        HeaderStyle-Width="100px">
                        <ItemStyle HorizontalAlign="Right" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="付费方式">
                        <ItemTemplate>
                            <%# Eval("PaymentName") %>
                        </ItemTemplate>
                        <HeaderStyle Width="100px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="送货方式">
                        <ItemTemplate>
                            <%# Eval("DeliveryName")%>
                        </ItemTemplate>
                        <HeaderStyle Width="100px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="状态">
                        <ItemTemplate>
                            <%# Status(Eval("Status"))%>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                        <HeaderStyle Width="100px" />
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="订购时间" DataField="CheckInDate" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}">
                        <HeaderStyle Width="108px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                </Columns>
                <HeaderStyle CssClass="HeaderStyle" />
            </asp:GridView>
            <div class="WorkArea">
                &nbsp;&nbsp; &nbsp;<asp:Button ID="BT_Confirmed" runat="server" Text="确认订单" 
                    Style="cursor: hand" EnableViewState="False"
                    CssClass="btn" onclick="BT_Confirmed_Click"></asp:Button>
                &nbsp;&nbsp; |&nbsp;&nbsp;<asp:Button ID="BT_Cancel" runat="server" Text="取消订单" Style="cursor: hand"
                    EnableViewState="False" CssClass="btn" onclick="BT_Cancel_Click"></asp:Button>
                &nbsp;&nbsp; |&nbsp;&nbsp;<asp:Button ID="BT_Delete" runat="server" Text="删除订单" Style="cursor: hand"
                    EnableViewState="False" CssClass="btn" OnClick="BT_Delete_Click" 
                    OnClientClick="return confirm('注意，删除后将不可恢复！');">
                </asp:Button>
                &nbsp;&nbsp; |&nbsp;&nbsp;
            </div>
            <div class="pagefield">
                <cc1:PageNavigation ID="PageNavigation1" runat="server" SubmitButtonClass="btn" 
                    onpagechanging="PageNavigation1_PageChanging" PageSize="15">
                </cc1:PageNavigation>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
