<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ShopTradeOrder, WebApp_deploy" title="商城交易管理" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script src="Js/Function.js" type="text/javascript"></script>  

<table class="adminheading">
   <tr>
      <th valign="middle" class="menus" align="left">订单管理</th>
      <td align="right">
      <div style="width:400px">
            <a href="Admin_ShopTradeOrder.aspx" >订单记录管理</a>&nbsp;|&nbsp;
            <a href="Admin_ShopSendOrderView.aspx?add=1">发退货管理</a>&nbsp;|&nbsp;
            <a href="Admin_ShopInvoiceView.aspx">开发票记录管理</a>&nbsp;|&nbsp;
            <a  href="Admin_ShopPayInfoView.aspx">订单支付记录</a>&nbsp;<br />
      </div>
      </td> 
      <td class="rtdw"></td>          
   </tr>                     
</table>

   <table class="nick"><tr><td colspan="4" class="tit">订单查找</td></tr>
     <tr><td class="ltd">
      快速查找：</td><td class="rtd" style="width: 30%;">
      <asp:DropDownList ID="QuickSearch" runat="server" CssClass="text_area" OnSelectedIndexChanged="QuickSearch_SelectedIndexChanged"  AutoPostBack="true">
         <asp:ListItem Text="所有的交易纪录" Value="all" />
         <asp:ListItem Text="一口价交易记录" Value="standprice" />
         <asp:ListItem Text="所有的拍卖记录" Value="auction" />
         <asp:ListItem Text="所有的团购记录" Value="team_buy" />
         <asp:ListItem Text="十天内交易记录" Value="ten_day_order" />
         <asp:ListItem Text="交易结束的记录" Value="success" />
         <asp:ListItem Text="拍卖领先的记录" Value="first" />
         <asp:ListItem Text="拍卖出局的记录" Value="last" />
         <asp:ListItem Text="团购预订的记录" Value="team_beforehand" />
      </asp:DropDownList></td><td class="ltd">
      高级查找：</td><td class="rtd">
      <asp:DropDownList ID="DetailSearchType" runat="server" CssClass="text_area">
         <asp:ListItem Text="订单编号" Value="ordernum" />
         <asp:ListItem Text="买家名称" Value="user_name" />
         <asp:ListItem Text="卖家名称" Value="saler_name" />         
      </asp:DropDownList>
      <asp:TextBox ID="SearchName" runat="server" CssClass="text_area"/>
      <asp:Button ID="SearchButton" runat="server" Text=" 查 询 " OnClick="SearchButton_Click" />
    </td></tr>
   </table>
     
   <asp:GridView ID="GridView1" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" runat="server" CssClass="adminlist" AutoGenerateColumns="False" HeaderStyle-HorizontalAlign="Center" OnRowDataBound="GridView1_RowDataBound" DataKeyNames="OrderFormID" OnRowDeleting="GridView1_RowDeleting1">
        <Columns>
            <asp:TemplateField>
              <HeaderTemplate>
                  <input id="Checkbox1" onclick="SelectAllCheckboxes(this,'select_id');" runat="server" type="checkbox" />
              </HeaderTemplate>
              <ItemTemplate>
                <input id="select_id" name="select_id" value='<%# Eval("OrderFormID") %>' type="checkbox" />
              </ItemTemplate>
              <ItemStyle Width="4%"/>
            </asp:TemplateField>
            <asp:HyperLinkField DataNavigateUrlFields="OrderFormNum" DataNavigateUrlFormatString="admin_ShowOrder.aspx?orderID={0}"
                DataTextField="OrderFormNum" HeaderText="订单编号">
            </asp:HyperLinkField>
            <asp:HyperLinkField DataNavigateUrlFields="UserID" DataNavigateUrlFormatString="Admin_UserDetail.aspx?UserID={0}" DataTextField="BuyerName" HeaderText="买家名称">
                <ItemStyle Width="12%" />
            </asp:HyperLinkField>
            <asp:HyperLinkField DataTextField="SalerName" DataNavigateUrlFields="SalerID" DataNavigateUrlFormatString="Admin_UserDetail.aspx?UserID={0}" HeaderText="卖家名称">
                <ItemStyle Width="12%" />
            </asp:HyperLinkField>
            <asp:TemplateField HeaderText="商品类别">
                <ItemTemplate>
                    <asp:Literal ID="LitTradeType" runat="server" Text='<%# HoWave.Web.Shop.TextFormat.GetProductType(Eval("TradeType").ToString()) %>' />
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" Width="10%" />
            </asp:TemplateField>
            <asp:BoundField DataField="InputTime" HeaderText="交易时间">
                <ItemStyle Width="14%" />
            </asp:BoundField>
            <asp:BoundField DataField="MoneyGoods" HeaderText="交易金额">
                <ItemStyle Width="10%" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="交易状态">
                <ItemTemplate>
                    <%--<asp:Literal ID="LitStatus" runat="server" Text='<%# HoWave.Web.Shop.TextFormat.GetOrderStatus(Eval("Status").ToString(),HoWave.Web.Shop.TextFormat.GetReceived(Eval("OrderFormID"))) %>' />--%>
                </ItemTemplate>
                <ItemStyle Width="8%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="操作">

                <ItemTemplate>
                       <a id="xiangxi"  target="_self"  href="Admin_ShowOrder.aspx?orderID=<%#Eval("OrderFormNum") %>">详细</a>
                <%--        <asp:LinkButton runat="server" ID="del"   Text="删除"  CommandName="delete" />--%>
                </ItemTemplate>
                <HeaderStyle Width="10%" />
            </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
            <tr>
              <th>ID</th><th>订单编号</th><th>买家名称</th><th scope="col">卖家名称</th><th scope="col">商品类别</th><th scope="col">交易时间</th><th>交易金额</th><th>交易状态</th>
            </tr>
            <tr>
              <td colspan="10">暂无交易！</td>
            </tr>
        </EmptyDataTemplate>
        <HeaderStyle HorizontalAlign="Center" />
   </asp:GridView>
   
   <div class="page">
     <asp:Label ID="PagePanel" runat="server" />
   </div> 
 
   <div class="div_btm">
      <div style="float:inherit"> 
      <asp:Button Text="批量删除" Visible="false" OnClientClick="return confirm('确定删除吗？')" runat="server"  ID="DeleteButton" OnClick="DeleteButton_Click"/> </div>
   </div>
   <div style="padding:5px; color:red;">
       <asp:Label ID="Delete_Tips" runat="server" />
   </div>


  

</asp:Content>
