<%@ Page Language="C#" MasterPageFile="~/Admin/MainPage.Master" AutoEventWireup="true" CodeBehind="ProductList.aspx.cs" Inherits="PPFOR.Admin.ContentArea.Product.ProductList" 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>  
<script language="javascript" type="text/javascript">
 
</script>
<form id="form1" action="ProductList.aspx" method="post" runat="server">
<asp:Label ID="PPFOR_productTypeId" runat="server" Enabled="false" Visible="false"></asp:Label>
<asp:Label ID="PPFOR_productBelongMenuId" runat="server" Enabled="false" Visible="false"></asp:Label>
<asp:Label ID="PPFOR_productLanguageId" runat="server" Enabled="false" Visible="false"></asp:Label>
    <div class="table-ppfor">
		<i></i><u></u>
		<ul>
		  <li><asp:Label ID="PPFOR_goForAddProduct" runat="server"></asp:Label><asp:Label ID="PPFOR_goForAddProductType" 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_productSearchCase" runat="server">
				    <asp:ListItem Text="产品名称" Value="1"></asp:ListItem>
				  </asp:DropDownList>
				<asp:TextBox ID="PPFOR_productSearchText" runat="server" Width="100px" MaxLength="50"></asp:TextBox>
				<asp:Button ID="PPFOR_productSearch" runat="server" Text="搜索" CssClass="blueinput" OnClick="PPFOR_productSearchClick" />
			</li>
		</ul>
	</div>
    <asp:GridView ID="PPFOR_showProductList" runat="server" CssClass="forgridview" OnRowDeleting="PPFOR_showProductList_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_selectProduct" runat="server"></asp:CheckBox>
                 </HeaderTemplate>
                 <ItemTemplate>
                     <asp:CheckBox ID="PPFOR_selectProduct" runat="server"></asp:CheckBox>
                 </ItemTemplate>
             </asp:TemplateField>
             <asp:BoundField HeaderText="ID" DataField="ID" HeaderStyle-Font-Bold="false"/>
             <asp:BoundField HeaderText="名称" ItemStyle-CssClass="right" DataField="productName" HeaderStyle-Font-Bold="false" ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Left"/>
             <asp:TemplateField HeaderText="显示" HeaderStyle-Font-Bold="false">
                <ItemTemplate><asp:CheckBox ID="PPFOR_productShow" runat="server" Text='<%#Eval("show")%>'></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_productRecommended" runat="server" Text='<%#Eval("recommended")%>'></asp:CheckBox></ItemTemplate>
             </asp:TemplateField>
             <asp:TemplateField HeaderText="热点" HeaderStyle-Font-Bold="false">
                <ItemTemplate><asp:CheckBox ID="PPFOR_productHot" runat="server" Text='<%#Eval("hot")%>'></asp:CheckBox></ItemTemplate>
             </asp:TemplateField>    
             <asp:TemplateField HeaderText="幻灯片" HeaderStyle-Font-Bold="false">
                <ItemTemplate><asp:CheckBox ID="PPFOR_productSlide" runat="server" Text='<%#Eval("slide")%>'></asp:CheckBox></ItemTemplate>
             </asp:TemplateField>            
             <asp:TemplateField HeaderText="排序" HeaderStyle-Font-Bold="false">
                <ItemTemplate><asp:TextBox ID="PPFOR_productSort" runat="server" Text='<%#Eval("sort")%>' Width="32" MaxLength="4" ></asp:TextBox></ItemTemplate>
             </asp:TemplateField>
             <asp:TemplateField HeaderText="操作" HeaderStyle-Font-Bold="false">
                <ItemTemplate>
                    <%# PPFOR_getActionLink(Eval("ID"),Eval("htmlName"))%>
                    <asp:LinkButton ID="PPFOR_deleteProduct" 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_updateProductBatch" CssClass="inputbutton" runat="server" Text="全部更新" OnClick="PPFOR_updateProductBatchClick"/>
              <asp:Button ID="PPFOR_deleteProductBatch" CssClass="inputbutton" runat="server" Text="删除" OnClick="PPFOR_deleteProductBatchClick"/>
              <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_updateProductBatch.ClientID %>","<%= PPFOR_deleteProductBatch.ClientID %>","reset1");
                    }
                </script> 
        </td>
        </tr>
      </table>
      <br />
      <publish:Publisher ID="PPFOR_doProductPublish" runat="server"  TextForPublishButton="发布产品" TextForPublishSeleted="仅发布被勾选的产品" TextForPublishAll="发布本类型所有产品" IsDisplayPublishModel="false" />     
</form>        
</asp:Content>
