<%@ Page Language="C#" MasterPageFile="~/Admin/MainPage.Master"  AutoEventWireup="true"  Codebehind="OrderList.aspx.cs" Inherits="PPFOR.Admin.Order.OrderList" Title="订单列表" %>
<%@ Register Src="~/Admin/Ascx/PageBar.ascx" TagName="PageBar" TagPrefix="page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PPFOR_mainContent" runat="server"> 
<form id="form1" action="OrderList.aspx" method="post" runat="server">
<script src="../JS/gridview.js" type="text/javascript"></script>  
<div class="table-ppfor">
	<i></i><u></u>
	<ul>
	  <li><span style="display:none;"><b></b><a href="#">添加订单</a><s></s></span></li>
	  <li>
            <asp:DropDownList Width="100px" ID="PPFOR_orderSearchCase" runat="server">
		        <asp:ListItem Text="订单号" Value="1"></asp:ListItem>
		        <asp:ListItem Text="收货人" Value="2"></asp:ListItem>
		      </asp:DropDownList>
		    <asp:TextBox ID="PPFOR_orderSearchText" runat="server" Width="100px" MaxLength="100"></asp:TextBox>
		    <asp:Button ID="PPFOR_orderSearch" runat="server" Text="搜索" CssClass="blueinput" OnClick="PPFOR_orderSearchClick" />
	    </li>
	  <li class="right">
			操作对象：<asp:DropDownList ID="PPFOR_languageList" runat="server" OnSelectedIndexChanged="PPFOR_languageListChanged" AutoPostBack="true" Width="86px" AppendDataBoundItems="true" >
        <asp:ListItem Value="0" >所有语言</asp:ListItem>
        </asp:DropDownList>
        </li>
	</ul>
</div>
<asp:GridView ID="PPFOR_showOrderList" CssClass="forgridview" runat="server" OnRowDeleting="PPFOR_showOrderList_RowDeleting" OnRowDataBound="PPFOR_gridViewRowDataBound" AllowPaging="false" AutoGenerateColumns="False"  DataKeyNames="Id"  Width="100%" CellPadding="0" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="0px" EmptyDataText="还没有添加订单">
       <Columns>                
         <asp:TemplateField ShowHeader="False" HeaderText="" HeaderStyle-HorizontalAlign="Center">
             <ItemStyle Wrap="False" HorizontalAlign="Center" />
             <HeaderTemplate>
                 <asp:CheckBox ID="PPFOR_selectOrder" runat="server"></asp:CheckBox>
             </HeaderTemplate>
             <ItemTemplate>
                 <asp:CheckBox ID="PPFOR_selectOrder" runat="server"></asp:CheckBox>
             </ItemTemplate>
         </asp:TemplateField>
         <asp:HyperLinkField DataNavigateUrlFields="Id" HeaderText="订单号" DataNavigateUrlFormatString="OrderEdit.aspx?oid={0}" DataTextField="OrderNo" HeaderStyle-Font-Bold="false"/> 
         <asp:BoundField HeaderText="下单语言" DataField="BelongLanguage" HeaderStyle-Font-Bold="false"/> 
         <asp:BoundField HeaderText="下单时间" DataField="OrderDate" HeaderStyle-Font-Bold="false"/>  
         <asp:BoundField HeaderText="订单总金额" DataFormatString="{0:N2}" DataField="OrderMoney" HeaderStyle-Font-Bold="false"/>  
         <asp:BoundField HeaderText="收货人" DataField="RecipientName" HeaderStyle-Font-Bold="false"/>  
         <asp:BoundField HeaderText="付款状态" DataField="PayStatus" HeaderStyle-Font-Bold="false"/>  
         <asp:BoundField HeaderText="发货状态" DataField="DeliveryStatus" HeaderStyle-Font-Bold="false"/>               
         <asp:TemplateField HeaderText="订单操作" HeaderStyle-Font-Bold="false">
            <ItemTemplate> 
            <a href="OrderEdit.aspx?oid=<%#Eval("Id") %>">查看</a> | 
            <asp:LinkButton ID="PPFOR_deleteOrder" runat="server" CausesValidation="False" CommandName="Delete"
                Text="删除" OnClientClick="return confirm('删除订单后不能恢复,确认要删除吗？');"></asp:LinkButton></ItemTemplate>
         </asp:TemplateField>
        </Columns>            
         <FooterStyle BackColor="#990000" ForeColor="White" /> 
         <RowStyle Wrap="False" HorizontalAlign="Center" Font-Bold="false" BackColor="#ffffff"/> 
         <HeaderStyle HorizontalAlign="Center" BackColor="#F5F5F5" Font-Bold="false" ForeColor="#000000" />
         <AlternatingRowStyle BackColor="#F5F5F5" />
    </asp:GridView>
  <br />
    <page:PageBar ID="PPFOR_pageBar" runat="server" />
  <br />
  <table width="100%" border="0" cellspacing="0" cellpadding="0" style="display:none;">
    <tr>
      <td>
          <asp:Button ID="PPFOR_deleteOrderBatch" CssClass="inputbutton" runat="server" Text="删除" OnClick="PPFOR_deleteOrderBatchClick" />
          <input name="reset" type="reset" id="reset1" class="inputbutton" onmouseover="this.className='inputbutton_hover'" onmouseout="this.className='inputbutton'" value="重置" onclick="SelectAllRows('<%=form1.ClientID%>',false)"/>
            <script type="text/javascript">
                if("<%=PPFOR_displayRecordOption %>"!='none'){
                    addButtonArray("<%= PPFOR_deleteOrderBatch.ClientID %>","reset1");
                }
            </script>  
    </td>
    </tr>
  </table>
  </form>
</asp:Content>
