<%@ page language="C#" masterpagefile="MyShopMasterPage.master" autoeventwireup="true" inherits="Member_Shop_BuyManageOrder, mallz" title="订单列表" enableEventValidation="false" %>  
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="pageTitle">订单管理</div>
<br />
 <table  class="SearchTableStyle">
         <tr>  
            <td class="tdbg5">订单编号：</td>
            <td class="tdbg6"><asp:TextBox ID="TxtOrderNum" runat="server" Height="16px" /></td>
            <td class="tdbg5">产品名称：</td>
            <td class="tdbg6"><asp:TextBox ID="TxtOrderName" runat="server" Height="16px" /></td>
            <td class="tdbg5">订单状态：</td>
            <td class="tdbg6">
                <asp:DropDownList ID="DroOrderStatic" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DroOrderStatic_Onchange">
                    <asp:ListItem Value="">所有订单</asp:ListItem>
                    <asp:ListItem Value="0">等待确认</asp:ListItem>
                    <asp:ListItem Value="1">已经确认</asp:ListItem>
                    <asp:ListItem Value="2">交易失败</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbg5">起始日期：</td>
            <td class="tdbg6"><asp:TextBox ID="TxtBeginDate" runat="server" Height="16px" /></td>
            <td class="tdbg5">结束日期：</td>
            <td class="tdbg6"><asp:TextBox ID="TxtEndDate" runat="server" Height="16px" /></td>
            <td class="tdbg5">付款状态：</td>
            <td class="tdbg6">
                <asp:DropDownList ID="DroPayStatic" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DroPayStatic_Onchange">
                    <asp:ListItem Value="">所有订单</asp:ListItem>
                    <asp:ListItem Value="0">等待付款</asp:ListItem>
                    <asp:ListItem Value="1">已付定金</asp:ListItem>
                    <asp:ListItem Value="2">已经付清</asp:ListItem>
                </asp:DropDownList>
           </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbg5">金额从：</td>
            <td class="tdbg6"><asp:TextBox ID="TxtBeginMoney" runat="server" Height="16px" /></td>
            <td class="tdbg5">&nbsp;至：</td>
            <td class="tdbg6"><asp:TextBox ID="TxtEndMoney" runat="server" Height="16px" /></td>
            <td class="tdbg5">物流状态：</td>
            <td class="tdbg6"><asp:DropDownList ID="DropDeliverStatus" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDeliverStatus_Onchange">
                    <asp:ListItem Value="">所有订单</asp:ListItem>
                    <asp:ListItem Value="0">配送中 </asp:ListItem>
                    <asp:ListItem Value="1">已发货 </asp:ListItem>
                    <asp:ListItem Value="2">已签收 </asp:ListItem>
                </asp:DropDownList></td>
        </tr>
        <tr class="tdbg">
            <td class="tdbg6" align="center" colspan="6"><asp:Button ID="QuickSearchBtn" Text="查询订单"  runat="server" OnClick="SearchUp"/></td>
        </tr>
        </table> 
        <br />
        <table class="SearchTableStyle">
        <tr><td>
        你现在查看的是：<asp:DropDownList ID="DropMoment" runat="server" Width="130px" AutoPostBack="True" OnSelectedIndexChanged="OnDropMomentChange">
                <asp:ListItem Value="1">今天的订单</asp:ListItem>
                <asp:ListItem Value="10">近10天的订单</asp:ListItem>
                <asp:ListItem Value="30">近一个月的订单</asp:ListItem>
                <asp:ListItem Value="">所有订单</asp:ListItem>
              </asp:DropDownList>
        </td></tr> 
        </table>
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowPaging="True"
          DataKeyNames="OrderFormID" PageSize="15" CssClass="tableHead" >
                    <Columns>
                        <asp:TemplateField HeaderStyle-Width="4%" HeaderText="ID">
                             <ItemTemplate>
                                <input type="checkbox" name="ids" id="ids" value="<%#Eval("OrderFormID") %>" title="<%# "ID：" + Eval("OrderFormID") %>" />
                             </ItemTemplate>
                         </asp:TemplateField>
                        <asp:HyperLinkField DataNavigateUrlFields="OrderFormNum" DataNavigateUrlFormatString="Shop_BuyOrder.aspx?OrderFormNum={0}" DataTextField="OrderFormNum" HeaderText="订单号" />
                        <asp:TemplateField HeaderText="类型"  HeaderStyle-Width="6%">
                          <ItemTemplate>
                            <asp:Literal ID="TradeType" runat="server" Text='<%# MallZ.Web.Shop.TextFormat.GetProductType(Eval("TradeType").ToString())%>'  />
                          </ItemTemplate>
                        </asp:TemplateField>    
                        <asp:TemplateField HeaderText="联络卖家"  HeaderStyle-Width="10%">                
                             <ItemTemplate>
                                 <asp:HyperLink ID="ConnectSaler" runat="server" Text='<%# Eval("SalerName") %>' Target="_blank"  NavigateUrl='<%#"../Shop/index.aspx?uid="+Eval("SalerID") %>'/>
                             </ItemTemplate>
                         </asp:TemplateField>
                         <asp:BoundField DataField="InputTime" DataFormatString="{0:yyyy-MM-dd}" HeaderText="订单时间" HeaderStyle-Width="13%" />
                        <asp:BoundField DataField="MoneyTotal" HeaderText="订单金额"  HeaderStyle-Width="8%" />
                        <asp:BoundField DataField="MoneyReceipt" HeaderText="已收金额" HeaderStyle-Width="8%" />
                    
                       <asp:TemplateField HeaderText="订单状态" HeaderStyle-Width="7%">
                            <ItemTemplate> 
                               <asp:Literal ID="Status" runat="server" Text='<%# MallZ.Web.Shop.TextFormat.GetOrderStatus(Eval("Status").ToString()) %>' />
                            </ItemTemplate>
                       </asp:TemplateField>    
                       <asp:TemplateField HeaderText="付款状态" HeaderStyle-Width="7%">
                         <ItemTemplate>
                           <asp:Literal ID="PayStatus" runat="server" Text='<%# MallZ.Web.Shop.TextFormat.GetPayStatus(Eval("PayStatus").ToString()) %>' />
                         </ItemTemplate>
                       </asp:TemplateField>
                        <asp:TemplateField HeaderText="物流状态" HeaderStyle-Width="7%">
                         <ItemTemplate>
                           <asp:Literal ID="DeliverStatus" runat="server" Text='<%# MallZ.Web.Shop.TextFormat.GetDeliverStatus(Eval("DeliverStatus").ToString()) %>' />
                         </ItemTemplate>
                       </asp:TemplateField>
                       
                        <asp:TemplateField HeaderText="操作" HeaderStyle-Width="7%">
                            <ItemTemplate> 
                                <asp:HyperLink ID="xx" runat="server" Text="详细" NavigateUrl='<%# "Shop_BuyOrder.aspx?OrderFormNum="+Eval("OrderFormNum") %>' />
                                <asp:HyperLink ID="Review" runat="server" Text="评价" NavigateUrl='<%#"Shop_AddReview.aspx?OrderID="+Eval("OrderFormID") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>    
                        
                    </Columns>  
                    <PagerStyle CssClass="productPageStyle" />
                    <EmptyDataTemplate >
                    <table class="tableHeader" style="width:98%"><tr><th>订单号</th><th>类型</th><th>订单时间</th><th>联络卖家</th><th>订单金额</th>
                    <th>已收金额</th><th>订单状态</th><th>付款状态</th><th>物流状态</th><th>操作</th></tr>
                    <tr><td colspan="10">没有符合查询条件的记录！</td></tr>
                    </table>                                 
                    </EmptyDataTemplate>                
        </asp:GridView>
                           
</asp:Content>

