<%@ Page Language="C#" MasterPageFile="~/Admin/MainPage.Master" AutoEventWireup="true" CodeBehind="FileList.aspx.cs" Inherits="PPFOR.Admin.ContentArea.Download.FileList" Title="下载文件列表" %>
<%@ Register Src="~/Admin/Ascx/PageBar.ascx" TagName="PageBar" TagPrefix="page" %>
<%@ Register Src="~/Admin/Ascx/Publisher.ascx" TagName="Publisher" TagPrefix="publish" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PPFOR_mainContent" runat="server">
<script src="../../JS/gridview.js" type="text/javascript"></script>  
<form id="form1" action="FileList.aspx" method="post" runat="server">
<asp:Label ID="PPFOR_fileTypeId" runat="server" Enabled="false" Visible="false"></asp:Label>
<asp:Label ID="PPFOR_fileBelongMenuId" runat="server" Enabled="false" Visible="false"></asp:Label>
<asp:Label ID="PPFOR_fileLanguageId" runat="server" Enabled="false" Visible="false"></asp:Label>
    <div class="table-ppfor">
		<i></i><u></u>
		<ul>
		  <li><asp:Label ID="PPFOR_goForAddDownloadFile" runat="server"></asp:Label><asp:Label ID="PPFOR_goForAddFileType" runat="server"></asp:Label><input type="button" class="blueinput" value="生成静态页" onclick="return showDiv('生成静态页',400,150);" /></li>
		    <li class="right">
		        <asp:DropDownList Width="100px" ID="PPFOR_fileSearchCase" runat="server">
				    <asp:ListItem Text="文件标题" Value="1"></asp:ListItem>				  
				  </asp:DropDownList>
				<asp:TextBox ID="PPFOR_fileSearchText" runat="server" Width="100px" MaxLength="50"></asp:TextBox>
				<asp:Button ID="PPFOR_fileSearch" runat="server" Text="搜索" CssClass="blueinput" OnClick="PPFOR_fileSearchClick" />
			</li>
		</ul>
	</div>
    <asp:GridView ID="PPFOR_showDownloadFileList" runat="server" CssClass="forgridview" OnRowDeleting="PPFOR_showDownloadFileList_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_selectDownloadFile" runat="server"></asp:CheckBox>
                 </HeaderTemplate>
                 <ItemTemplate>
                     <asp:CheckBox ID="PPFOR_selectDownloadFile" runat="server"></asp:CheckBox>
                 </ItemTemplate>
             </asp:TemplateField>
             <asp:BoundField HeaderText="ID" DataField="Id" HeaderStyle-Font-Bold="false"/>
             <asp:BoundField HeaderText="标题" DataField="FileTitle" ItemStyle-CssClass="right" HeaderStyle-Font-Bold="false" ItemStyle-Width="40%" ItemStyle-HorizontalAlign="Left"/>
             <asp:TemplateField HeaderText="显示" HeaderStyle-Font-Bold="false">
                <ItemTemplate><asp:CheckBox ID="PPFOR_fileShow" runat="server" Text='<%#Eval("IsShow")%>'></asp:CheckBox></ItemTemplate>
             </asp:TemplateField>    
             <asp:TemplateField HeaderText="最新" HeaderStyle-Font-Bold="false">
                <ItemTemplate><asp:CheckBox ID="PPFOR_isNew" runat="server" Text='<%#Eval("New")%>'></asp:CheckBox></ItemTemplate>
             </asp:TemplateField>                      
             <asp:TemplateField HeaderText="推荐" HeaderStyle-Font-Bold="false">
                <ItemTemplate><asp:CheckBox ID="PPFOR_fileRecommended" runat="server" Text='<%#Eval("Recommended")%>'></asp:CheckBox></ItemTemplate>
             </asp:TemplateField>
             <asp:TemplateField HeaderText="热点" HeaderStyle-Font-Bold="false">
                <ItemTemplate><asp:CheckBox ID="PPFOR_fileHot" runat="server" Text='<%#Eval("Hot")%>'></asp:CheckBox></ItemTemplate>
             </asp:TemplateField>    
             <asp:TemplateField HeaderText="幻灯片" HeaderStyle-Font-Bold="false">
                <ItemTemplate><asp:CheckBox ID="PPFOR_fileSlide" runat="server" Text='<%#Eval("Slide")%>'></asp:CheckBox></ItemTemplate>
             </asp:TemplateField>            
             <asp:TemplateField HeaderText="排序" HeaderStyle-Font-Bold="false">
                <ItemTemplate><asp:TextBox ID="PPFOR_fileSort" runat="server" Text='<%#Eval("Sort")%>' Width="32" MaxLength="4" ></asp:TextBox></ItemTemplate>
             </asp:TemplateField>
             <asp:TemplateField HeaderText="操作" HeaderStyle-Font-Bold="false">
                <ItemTemplate>
                    <%#PPFOR_getLinkActions(Eval("Id"),Eval("HtmlName"))%> 
                    <asp:LinkButton ID="PPFOR_deleteDownloadFile" 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_updateDownloadFileBatch" CssClass="inputbutton" runat="server" Text="全部更新" OnClick="PPFOR_updateDownloadFileBatchClick"/>
              <asp:Button ID="PPFOR_deleteDownloadFileBatch" CssClass="inputbutton" runat="server" Text="删除" OnClick="PPFOR_deleteDownloadFileBatchClick"/>
              <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_updateDownloadFileBatch.ClientID %>","<%= PPFOR_deleteDownloadFileBatch.ClientID %>","reset1");
                    }
                </script>  
            </td>
        </tr>
      </table>
      <br />
      <publish:Publisher ID="PPFOR_doDownloadFilePublish" runat="server" TextForPublishButton="发布下载文件" TextForPublishSeleted="仅发布被勾选的下载文件" TextForPublishAll="发布本类型所有下载文件" IsDisplayPublishModel="false" />     
</form>        
</asp:Content>
