<%@ page language="C#" enableeventvalidation="false" masterpagefile="MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_Shop_ManageOrder, mallz" title="订单列表" %>  
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> 
<script src="../Js/checkBox.js" type="text/javascript">

</script> 
<div class="pageTitle">商家订单管理</div>
<br />
    <table class="SearchTableStyle">
        <tr class="tdbg">
            <td class="tdbg5">付款状态：</td>
            <td class="tdbg6"><asp:DropDownList ID="DroPayStatic" runat="server" AutoPostBack="True" OnSelectedIndexChanged="search">
                    <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>
            <td class="tdbg5">物流状态：</td>
            <td class="tdbg6"><asp:DropDownList ID="DropDeliverStatus" runat="server" AutoPostBack="True" OnSelectedIndexChanged="search">
                    <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>
            <td class="tdbg5">订单状态：</td>
            <td class="tdbg6"><asp:DropDownList ID="DroOrderStatic" runat="server" AutoPostBack="True" OnSelectedIndexChanged="search">
                    <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="TxtOrderNum" runat="server" Height="16px"/></td>
            <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>
            
        </tr>
        <tr class="tdbg">
            <td class="tdbg5">买家名称：</td>
            <td class="tdbg6"><asp:TextBox ID="TxtCusName" runat="server" Height="16px"/></td>
            <td class="tdbg5">金额从：</td>
            <td class="tdbg6"><asp:TextBox ID="TxtBeginMoney" runat="server" Height="16px"/></td>
            <td class="tdbg5">至：</td>
            <td class="tdbg6"><asp:TextBox ID="TxtEndMoney" runat="server" Height="16px"/></td>
            
        </tr>
        <tr class="tdbg">
            <td class="tdbg5">商品名称：</td>
            <td class="tdbg6"><asp:TextBox ID="TxtProductName" runat="server" Height="16px"/></td>    
            <td colspan="4" class="tdbg6">&nbsp;&nbsp;<asp:Button ID="QuickSearchButton" runat="server" Text=" 查 询 " OnClick="search" /></td>
                   
        </tr>
        </table>
        <br />
        <table class="SearchTableStyle">
        <tr><td>
        你现在查看的是：<asp:DropDownList ID="DropMoment" runat="server"  AutoPostBack="True" OnSelectedIndexChanged="search">
                <asp:ListItem Value="1">今天的订单</asp:ListItem>
                <asp:ListItem Value="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" ForeColor="Black" AllowPaging="True" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" DataKeyNames="OrderFormID" CssClass="tableHead">
             <Columns>
                <asp:TemplateField HeaderStyle-Width="4%" HeaderText="ID">
                     <ItemTemplate>
                        <input type="checkbox" id="ids" name="ids" value="<%# Eval("OrderFormID") %>" title="<%# "ID："+Eval("OrderFormID") %>" />
                     </ItemTemplate> 
                     <ItemStyle Width="4%" />                        
                 </asp:TemplateField>
                <asp:HyperLinkField DataNavigateUrlFields="OrderFormNum" DataNavigateUrlFormatString="shop_buyorder.aspx?OrderFormNum={0}" DataTextField="OrderFormNum" HeaderText="编号" />
                <asp:TemplateField HeaderText="联络买家"  HeaderStyle-Width="10%">                
                             <ItemTemplate>
                                 <asp:HyperLink ID="ConnectBuyer" runat="server" Text='<%# Eval("BuyerName") %>' Target="_blank"  NavigateUrl='<%#"../Shop/index.aspx?uid="+Eval("UserID") %>'/>
                             </ItemTemplate>
                         </asp:TemplateField>
                <asp:TemplateField HeaderText="类型" HeaderStyle-Width="6%">
                    <ItemTemplate>
                         <asp:Literal ID="TradeType" Text='<%# MallZ.Web.Shop.TextFormat.GetProductType(Eval("TradeType").ToString()) %>' runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="InputTime" DataFormatString="{0:yy-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_lable" 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_lable" 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_lable" 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>
              <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><td colspan="10">没有符合查询条件的记录！</td></tr>
                    </table></EmptyDataTemplate>
              <PagerStyle CssClass="productPageStyle" />
      </asp:GridView> 
      
                <div style="clear:both; width:98%; text-align:center; margin-top:10px;">
                    <input type="button" value=" 全 选 "  onclick="check_all();"/>
                    <input type="button" value=" 反 选 " onclick="check_rev();"/>
                    <asp:Button ID="Button5" runat="server" OnClick="Button5_Click" Text=" 删 除 " OnClientClick="return confirm('确认删除所选订单吗？')"/>
                </div>
                <div style="padding:10px;">提示：系统默认不删除已确认、已付款、已发货或已签收的订单。</div>
        
</asp:Content>

