<%@ Page Language="C#" MasterPageFile="~/Admin/MainPage.Master" AutoEventWireup="true"
    Codebehind="ModelList.aspx.cs" Inherits="PPFOR.Admin.ContentArea.Model.ModelList"
    Title="信息列表" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PPFOR_mainContent" runat="server">
<script src="../../JS/gridview.js" type="text/javascript"></script>  
<script src="../../JS/menuview.js" type="text/javascript"></script>  
<form id="form1" action="ModelList.aspx" method="post" runat="server">
<asp:Label ID="PPFOR_modelBelongLanguage" runat="server" Enabled="false" Visible="false"></asp:Label>
	<div class="table-ppfor">
		<i></i><u></u>
		<ul>
		  <li><asp:Label ID="PPFOR_goForAddCustomModel" runat="server" ></asp:Label></li>
		</ul>
	</div>      
    <asp:GridView ID="PPFOR_showCustomModelList" runat="server" CssClass="forgridview" OnRowDeleting="PPFOR_showCustomModelList_RowDeleting" OnRowDataBound="PPFOR_gridViewRowDataBound" AllowPaging="false" AutoGenerateColumns="False"  DataKeyNames="ModelID"  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_selectCustomModel" runat="server"></asp:CheckBox>
                 </HeaderTemplate>
                 <ItemTemplate>
                     <asp:CheckBox ID="PPFOR_selectCustomModel" runat="server"></asp:CheckBox>
                 </ItemTemplate>
             </asp:TemplateField>
             <asp:BoundField HeaderText="ID" DataField="ModelID" HeaderStyle-Font-Bold="false"/>
             <asp:BoundField HeaderText="信息名称" ItemStyle-HorizontalAlign="Center" ItemStyle-CssClass="right" DataField="ModelName" HeaderStyle-Font-Bold="false" ItemStyle-Width="30%"/>       
             <asp:TemplateField HeaderText="是否显示" HeaderStyle-Font-Bold="false">
                <ItemTemplate><asp:CheckBox ID="PPFOR_modelShow" runat="server" Text='<%#Eval("Show") %>'></asp:CheckBox></ItemTemplate>
             </asp:TemplateField>
             <asp:TemplateField HeaderText="排列顺序" HeaderStyle-Font-Bold="false">
                <ItemTemplate>
                <asp:TextBox ID="PPFOR_modelSort" runat="server" Text='<%#Eval("ModelOrder") %>' Width="50" MaxLength="4"></asp:TextBox>                    
                </ItemTemplate>
             </asp:TemplateField>             
             <asp:TemplateField HeaderText="操作" HeaderStyle-Font-Bold="false">
                <ItemTemplate>
                <%# PPFOR_getLinkActions(Eval("ModelID"))%>
                <asp:LinkButton ID="PPFOR_deleteCustomModel" runat="server" CausesValidation="False" CommandName="Delete"
                    Text="删除" OnClientClick="return confirm('确认要删除该信息吗？');"></asp:LinkButton>
                </ItemTemplate>
             </asp:TemplateField>
             <asp:TemplateField HeaderText="标签调用" HeaderStyle-Font-Bold="false" ItemStyle-HorizontalAlign="Left">
                <ItemTemplate>
                    名称调用：{#ModelTitle:<%# Eval("ModelID")%>}<br />
                    内容调用：{#ModelContent:<%# Eval("ModelID")%>}
                </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 />
      <table width="100%" border="0" cellspacing="0" cellpadding="0" style="display:none;">
        <tr>
          <td>
              <asp:Button ID="PPFOR_updateCustomModelBatch" CssClass="inputbutton" runat="server" Text="全部更新" OnClick="PPFOR_updateCustomModelBatchClick"/>
              <asp:Button ID="PPFOR_deleteCustomModelBatch" CssClass="inputbutton" runat="server" Text="删除" OnClick="PPFOR_deleteCustomModelBatchClick" />
              <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_updateCustomModelBatch.ClientID %>","<%= PPFOR_deleteCustomModelBatch.ClientID %>","reset1");
                    }
                </script>  
            </td>
        </tr>
      </table>
      <br />    
</form>        
</asp:Content>
