<%@ page language="C#" autoeventwireup="true" inherits="ECMe_Order_OrderList, ECMe_Deploy" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!-- Put IE into quirks mode -->
<!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>
    <link href="../CSS/Admin/CSS/ECMe.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/Admin/CSS/body156.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/Admin/CSS/volti.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/Admin/TableSort/tablesort.css" rel="stylesheet" type="text/css" />
    <link href="../JS/ThickBox/thickbox.css" rel="stylesheet" type="text/css" />
    <link href="../JS/DatePicker/datePicker.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../JS/jquery.js"></script>
    <script type="text/javascript" src="../JS/Common.js"></script>
    <script type="text/javascript" src="../JS/ThickBox/thickbox.js"></script>
    <script type="text/javascript" src="../JS/DatePicker/date.js"></script>
    <script type="text/javascript" src="../JS/DatePicker/jquery.datePicker.js"></script>
    <script type="text/javascript">
        $(function () {
            Date.firstDayOfWeek = 0;
            Date.format = 'yyyy-mm-dd';
            $('.top_date').datePicker({ clickInput: true, startDate: '2010-01-01' });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:RegularExpressionValidator ID="REV_TStartDate" runat="server" ControlToValidate="TStartDate"
        Display="None" ErrorMessage="起始日期时间格式不对" ValidationExpression="^(?:(?:1[6-9]|[2-9][0-9])[0-9]{2}([-/.]?)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:(?:1[6-9]|[2-9][0-9])(?:0[48]|[2468][048]|[13579][26])|(?:16|[2468][048]|[3579][26])00)([-/.]?)0?2\2(?:29))$"></asp:RegularExpressionValidator>
    <asp:RegularExpressionValidator ID="REV_TEndDate" runat="server" ControlToValidate="TEndDate"
        Display="None" ErrorMessage="结束日期时间格式不对" ValidationExpression="^(?:(?:1[6-9]|[2-9][0-9])[0-9]{2}([-/.]?)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:(?:1[6-9]|[2-9][0-9])(?:0[48]|[2468][048]|[13579][26])|(?:16|[2468][048]|[3579][26])00)([-/.]?)0?2\2(?:29))$"></asp:RegularExpressionValidator>
    <div class="header">
        <div class="header_top">
            <div class="ajserver">
                <asp:BulletedList ID="BOrderState" runat="server" DisplayMode="LinkButton" OnClick="BOrderState_Click">
                    <asp:ListItem Value="">全部订单</asp:ListItem>
                    <asp:ListItem>收款</asp:ListItem>
                    <asp:ListItem>配货</asp:ListItem>
                    <asp:ListItem>发货</asp:ListItem>
                    <asp:ListItem>完成</asp:ListItem>
                    <asp:ListItem>换货</asp:ListItem>
                    <asp:ListItem>退款</asp:ListItem>
                    <asp:ListItem>退货</asp:ListItem>
                    <asp:ListItem>作废</asp:ListItem>
                </asp:BulletedList>
            </div>
        </div>
        <div class="top_body">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <th style="width: 170px;">
                        常用操作
                    </th>
                    <th>
                        搜索订单（状态，订单号，下单起始日期，下单结束日期）
                    </th>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="BDelete" runat="server" Text="删除所选" Width="80px" OnClick="BDelete_Click"
                            OnClientClick="return confirm('你真的要删除?');" CssClass="but_2" />
                        <asp:Button ID="BPrint" runat="server" Text="打印表格" Width="80px" OnClick="BPrint_Click"
                            CssClass="but_2" />
                    </td>
                    <td>
                        <asp:DropDownList ID="DOrderState" Height="20px" Width="60px" runat="server">
                            <asp:ListItem Value="">全部</asp:ListItem>
                            <asp:ListItem>收款</asp:ListItem>
                            <asp:ListItem>配货</asp:ListItem>
                            <asp:ListItem>发货</asp:ListItem>
                            <asp:ListItem>完成</asp:ListItem>
                            <asp:ListItem>换货</asp:ListItem>
                            <asp:ListItem>退款</asp:ListItem>
                            <asp:ListItem>退货</asp:ListItem>
                            <asp:ListItem>作废</asp:ListItem>
                        </asp:DropDownList>
                        <asp:TextBox ID="TOrderNumber" runat="server" Width="100px"></asp:TextBox>
                        <asp:TextBox ID="TStartDate" CssClass="top_date" runat="server" Width="100px"></asp:TextBox>
                        <asp:TextBox ID="TEndDate" CssClass="top_date" runat="server" Width="100px"></asp:TextBox>
                        <asp:Button ID="BSearch" runat="server" Text="搜索" OnClick="BSearch_Click" CssClass="but_1" />
                        <asp:HiddenField ID="HOrderBy" runat="server" />
                        <asp:HiddenField ID="HSort" Value="false" runat="server" />
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
        <div class="tab_top">
            <table class="thead">
                <tbody>
                    <tr>
                        <th style="width: 30px">
                            <input id="ChkAll" type="checkbox" onclick="Check(this,'CheckBoxSelect','RepeaterTable')" />
                        </th>
                        <th style="width: 40px">
                            状态
                        </th>
                        <th style="width: 140px">
                            订单号
                        </th>
                        <th style="width: 40px">
                            付款
                        </th>
                        <th style="width: 40px">
                            发货
                        </th>
                        <th style="width: 130px">
                            [
                            <asp:LinkButton ID="LOrderDate" CssClass="blue" runat="server" OnClick="LOrderDate_Click">下单日期</asp:LinkButton>
                            ]
                        </th>
                        <th style="width: 120px">
                            [
                            <asp:LinkButton ID="LOrderAmount" CssClass="blue" runat="server" OnClick="LOrderAmount_Click">订单金额</asp:LinkButton>
                            ]
                        </th>
                        <th style="width: 80px">
                            会员
                        </th>
                        <th style="width: 50px">
                            查看
                        </th>
                        <th>
                            操作
                        </th>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="container">
        <div class="tab_body">
            <table class="tbody">
                <tbody>
                    <asp:Repeater ID="RepeaterTable" runat="server">
                        <ItemTemplate>
                            <tr>
                                <td style="width: 30px">
                                    <asp:CheckBox ID="CheckBoxSelect" runat="server" ToolTip='<%#Eval("OrderNumber")%>'
                                        BorderStyle="None" BorderWidth="0px" />
                                </td>
                                <td style="width: 40px; background-color: <%# GetStateColor(Eval("OrderState").ToString()) %>;
                                    color: #ffffff;">
                                    <%#Eval("OrderState")%></a>
                                </td>
                                <td style="width: 140px">
                                    <img src="../CSS/Admin/images/order.png" alt="订单" />
                                    <a href="OrderInfo.aspx?id=<%#Eval("OrderNumber")%>&keepThis=true&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=450&width=780"
                                        class="thickbox" title="查看详细信息">
                                        <%#Eval("OrderNumber")%></a>
                                </td>
                                <td style="width: 40px">
                                    <%#Utils.GetBoolWord(bool.Parse(Eval("IsPayment").ToString())) %>
                                </td>
                                <td style="width: 40px">
                                    <%#Utils.GetBoolWord(bool.Parse(Eval("IsSendProduct").ToString()))%>
                                </td>
                                <td style="width: 130px">
                                    <%#Eval("CreateDate")%>
                                </td>
                                <td style="width: 120px" class="ys_red">
                                    ￥：<%#Eval("OrderPrice")%>
                                </td>
                                <td style="width: 80px">
                                    <img src="../CSS/Admin/images/member.png" alt="会员" />
                                    <%# GetOrderMember(Eval("OrderNumber").ToString()) %>
                                </td>
                                <td style="width: 50px" class="ys_red">
                                    <img src="../CSS/Admin/images/View.png" alt="查看" />
                                    <a href="OrderInfo.aspx?id=<%#Eval("OrderNumber")%>&keepThis=true&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=450&width=780"
                                        class="thickbox" title="查看详细信息">查看</a>
                                </td>
                                <td>
                                    <img src="../CSS/Admin/images/Edit.png" alt="编辑" />
                                    <a href="UpdateOrderPrice.aspx?id=<%#Eval("OrderNumber")%>&keepThis=true&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=450&width=780"
                                        class="thickbox" title="修改订单价格">修改</a>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </tbody>
            </table>
        </div>
    </div>
    <div class="footer">
        <div class="txte">
        </div>
        <webdiyer:AspNetPager ID="AspNetPagerItem" runat="server" CssClass="yahoo2" AlwaysShow="True"
            OnPageChanged="AspNetPagerItem_PageChanged" PageSize="30">
        </webdiyer:AspNetPager>
    </div>
    </form>
</body>
</html>
