<%@ Page Language="C#" MasterPageFile="~/Admin/MainPage.Master" AutoEventWireup="true" CodeBehind="form_list.aspx.cs" Inherits="PPFOR.Admin.DesignCenter.Console.form_list" Title="自定义表单列表" %>
<%@ Register Src="~/Admin/Ascx/PageBar.ascx" TagName="PageBar" TagPrefix="page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PPFOR_mainContent" runat="server">
<script src="../../JS/gridview.js" type="text/javascript"></script>   
<script src="../../JS/popup.js" type="text/javascript"></script> 
<script language="javascript" type="text/javascript">
function openHtmlCodeOrLook(fid,arg)
{
   popup_show("HTML代码调用与预览","<iframe id='htmlFrame' src='/Admin/CustomView/htmlcode.aspx?fid=" + fid + "&arg=" + arg + "' scrolling='yes' width='100%' height='100%' frameborder='0'></iframe>",600,380);
}
</script>
<form id="form1" action="form_list.aspx" method="post" runat="server">
    <label id="showHtmlCode"></label>
    <asp:GridView ID="PPFOR_showCustomFormList" CssClass="forgridview" runat="server" 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_selectCustomForm" runat="server"></asp:CheckBox>
                 </HeaderTemplate>
                 <ItemTemplate>
                     <asp:CheckBox ID="PPFOR_selectCustomForm" runat="server"></asp:CheckBox>
                 </ItemTemplate>
             </asp:TemplateField>
             <asp:BoundField HeaderText="ID" DataField="Id" HeaderStyle-Font-Bold="false"/>
             <asp:BoundField HeaderText="表单名称" DataField="FormName" HeaderStyle-Font-Bold="false"/>
             <asp:TemplateField HeaderText="说明" HeaderStyle-Font-Bold="false" ItemStyle-CssClass="right">
                <ItemTemplate><%# PPFOR_getFormPrompt(Eval("FormPrompt"))%></ItemTemplate>
             </asp:TemplateField>
             <asp:TemplateField HeaderText="操作" HeaderStyle-Font-Bold="false">
                <ItemTemplate><a href="form_item_list.aspx?fid=<%#Eval("Id") %>">表单项管理</a> | <a href="form_data_list.aspx?fid=<%#Eval("Id") %>">表单数据管理</a> | <a href="#" onclick="openHtmlCodeOrLook(<%#Eval("Id") %>,2)" style="cursor:pointer;">HTML调用</a> | <a href="#" onclick="openHtmlCodeOrLook(<%#Eval("Id") %>,1)" style="cursor:pointer;">预览</a> | <a href="form_modify.aspx?fid=<%#Eval("Id") %>">修改</a> | <a href="/CustomAction/FormScriptCall.aspx?fid=<%#Eval("Id") %>">测试</a></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_deleteCustomForm" CssClass="inputbutton" runat="server" Text="删除" OnClick="PPFOR_deleteCustomFormClick" />
              <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_deleteCustomForm.ClientID %>","reset1");
                    }
                </script> 
              </td>
        </tr>
      </table>
      <br />
</form>        
</asp:Content>
