<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="Admin_Admin_ShopTradeOrder, mallz" title="商城交易管理" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

   <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">
        <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='<%# MallZ.Web.Shop.TextFormat.GetProductType(Eval("TradeType").ToString()) %>' />
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" Width="10%" />
            </asp:TemplateField>
            <asp:BoundField DataField="InputTime" HeaderText="交易时间">
                <ItemStyle Width="15%" />
            </asp:BoundField>
            <asp:BoundField DataField="MoneyGoods" HeaderText="交易金额">
                <ItemStyle Width="10%" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="交易状态">
                <ItemTemplate>
                    <asp:Literal ID="LitStatus" runat="server" Text='<%# MallZ.Web.Shop.TextFormat.GetOrderStatus(Eval("Status").ToString()) %>' />
                </ItemTemplate>
                <ItemStyle Width="8%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="操作" HeaderStyle-Width="10%">
                <ItemTemplate>
                    <asp:HyperLink ID="xiangxi" runat="server" Text="详细" NavigateUrl='<%# "admin_ShowOrder.aspx?orderID=" + Eval("OrderFormNum")%>' />
                    <asp:LinkButton runat="server" ID="del" Text="删除" CommandArgument='<%# Eval("OrderFormID") %>' OnCommand="del_OnClick" OnClientClick="return confirm('确定删除吗？')" />
                </ItemTemplate>
            </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="批量删除" 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>
