<%@ page language="C#" masterpagefile="MyShopMasterPage.master" autoeventwireup="true" inherits="Member_Shop_BuyManageOrder, WebApp_deploy" title="订单列表" enableEventValidation="false" %>  
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="pageTitle">订单管理</div>
<br />
 <table  class="SearchTableStyle">
         <tr>  
            <td>订单编号</td>
            <td class="tdbg5"><asp:TextBox ID="TxtOrderNum" runat="server" Height="16px" /></td>
            <td class="tdbg5">订单名称</td>
            <td class="tdbg5"><asp:TextBox ID="TxtOrderName" runat="server" Height="16px" /></td>
            <td class="tdbg5">订单状态：</td>
            <td>
                <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="tdbg5"><asp:TextBox ID="TxtBeginDate" runat="server" Height="16px" /></td>
            <td class="tdbg5">结束日期</td>
            <td class="tdbg5"><asp:TextBox ID="TxtEndDate" runat="server" Height="16px" /></td>
            <td class="tdbg5">付款状态：</td>
            <td>
                <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="tdbg5"><asp:TextBox ID="TxtBeginMoney" runat="server" Height="16px" /></td>
            <td class="tdbg5">&nbsp;至</td>
            <td class="tdbg5"><asp:TextBox ID="TxtEndMoney" runat="server" Height="16px" /></td>
            <td class="tdbg5">物流状态：</td>
            <td><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="tdbg5" 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="0">所有订单</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:HyperLinkField DataNavigateUrlFields="OrderFormNum" DataNavigateUrlFormatString="Shop_BuyOrder.aspx?OrderFormNum={0}"
                            DataTextField="OrderFormNum" HeaderText="订单号" >
                            <HeaderStyle Width="15%" />
                        </asp:HyperLinkField>
                        <asp:TemplateField HeaderText="类型" >
                          <ItemTemplate>
                            <asp:Literal ID="TradeType" runat="server" Text='<%# HoWave.Web.Shop.TextFormat.GetProductType(Eval("TradeType").ToString())%>'  />
                          </ItemTemplate>
                          <HeaderStyle Width="8%" />
                        </asp:TemplateField>    
                        <asp:BoundField DataField="InputTime" DataFormatString="{0:yyyy-MM-dd}" HeaderText="订单时间" >
                            <HeaderStyle Width="15%" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="联络卖家">                
                             <ItemTemplate>
                                 <asp:HyperLink ID="ConnectSaler" runat="server" Text='<%# Eval("SalerName") %>' Target="_blank"  NavigateUrl='<%#"../Shop/"+Eval("ShopID")+"/?action=Intro" %>'/>
                             </ItemTemplate>
                         </asp:TemplateField>     
                        <asp:BoundField DataField="MoneyTotal" HeaderText="订单金额" >
                            <HeaderStyle Width="9%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="MoneyReceipt" HeaderText="已收金额" >
                            <HeaderStyle Width="9%" />
                        </asp:BoundField>
                    
                       <asp:TemplateField HeaderText="订单状态">
                            <ItemTemplate> 
                               <asp:Literal ID="Status" runat="server" Text='<%# HoWave.Web.Shop.TextFormat.GetOrderStatus(Eval("Status").ToString()) %>' />
                            </ItemTemplate>
                            <HeaderStyle Width="9%"  />
                           <ItemStyle HorizontalAlign="Center" />
                       </asp:TemplateField>    
                       <asp:TemplateField HeaderText="付款状态">
                         <ItemTemplate>
                           <asp:Literal ID="PayStatus" runat="server" Text='<%# HoWave.Web.Shop.TextFormat.GetPayStatus(Eval("PayStatus").ToString()) %>' />
                         </ItemTemplate>
                         <HeaderStyle Width="9%" />
                           <ItemStyle HorizontalAlign="Center" />
                       </asp:TemplateField>
                        <asp:TemplateField HeaderText="物流状态">
                         <ItemTemplate>
                           <asp:Literal ID="DeliverStatus" runat="server" Text='<%# HoWave.Web.Shop.TextFormat.GetDeliverStatus(Eval("DeliverStatus").ToString()) %>' />
                         </ItemTemplate>
                         <HeaderStyle Width="9%" />
                            <ItemStyle HorizontalAlign="Center" />
                       </asp:TemplateField>
                       
                        <asp:TemplateField HeaderText="操作" Visible="False">
                            <ItemTemplate> 
                                <asp:HyperLink ID="Review" runat="server" Text="评价" NavigateUrl='<%#"Shop_AddReview.aspx?TransSize=0&ItemID="+Eval("OrderFormID")+"&ProductID=&ProductName=&ReviewerID="+Eval("SalerID")+"&ReviewerName="+Eval("SalerName") %>' />
                            </ItemTemplate>
                            <HeaderStyle Width="6%" />
                        </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>

