<%@ Page Language="C#" MasterPageFile="~/Admin/MainPage.Master" AutoEventWireup="true" CodeBehind="MemberFieldList.aspx.cs" Inherits="PPFOR.Admin.UserInfo.MemberFieldList" Title="会员注册项列表" %>
<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="MemberFieldList.aspx" method="post" runat="server">
    <div class="table-ppfor">
		<i></i><u></u>
		<ul>
		  <li><span><b></b><a href="MemberFieldAdd.aspx">添加注册项</a><s></s></span></li>
		</ul>
	</div>
    <asp:GridView ID="PPFOR_showMemberFieldList" runat="server" CssClass="forgridview" OnRowDataBound="PPFOR_gridViewRowDataBound" OnRowDeleting="PPFOR_showMemberFieldList_RowDeleting" 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_selectMemberField" runat="server"></asp:CheckBox>
                 </HeaderTemplate>
                 <ItemTemplate>
                     <asp:CheckBox ID="PPFOR_selectMemberField" runat="server"></asp:CheckBox>
                 </ItemTemplate>
             </asp:TemplateField>
             <asp:BoundField HeaderText="ID" DataField="Id" HeaderStyle-Font-Bold="false"/>
             <asp:BoundField HeaderText="注册项名" DataField="FieldName" HeaderStyle-Font-Bold="false"/>             
             <asp:TemplateField HeaderText="注册项类型" HeaderStyle-Font-Bold="false">
                <ItemTemplate><%# PPFOR_getMemberFieldTypeName(Eval("FieldType"))%></ItemTemplate>
             </asp:TemplateField>             
             <asp:BoundField HeaderText="注册项属性" DataField="FieldIsSystem" HeaderStyle-Font-Bold="false"/>
             <asp:TemplateField HeaderText="是否必填" HeaderStyle-Font-Bold="false">
                <ItemTemplate><asp:CheckBox ID="PPFOR_fieldNotNull" runat="server" Text='<%#Eval("FieldNotNull") %>'></asp:CheckBox></ItemTemplate>
             </asp:TemplateField>
             <asp:TemplateField HeaderText="是否启用" HeaderStyle-Font-Bold="false">
                <ItemTemplate><asp:CheckBox ID="PPFOR_fieldState" runat="server" Text='<%#Eval("FieldState") %>'></asp:CheckBox></ItemTemplate>
             </asp:TemplateField>
             <asp:TemplateField HeaderText="排列顺序" HeaderStyle-Font-Bold="false">
                <ItemTemplate><asp:TextBox ID="PPFOR_fieldOrder" runat="server" Text='<%#Eval("FieldOrder")%>' Width="50" MaxLength="4" ></asp:TextBox></ItemTemplate>
             </asp:TemplateField>
             <asp:TemplateField HeaderText="操作" HeaderStyle-Font-Bold="false">
                <ItemTemplate>
                <%# PPFOR_getLinkActions(Eval("ID"),Eval("FieldIsSystem"))%>
                <asp:LinkButton ID="PPFOR_deleteMemberField" 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 />
      <table width="100%" border="0" cellspacing="0" cellpadding="0" style="display:none;">
        <tr>
          <td>
              <asp:Button ID="PPFOR_updateMemberField" CssClass="inputbutton" runat="server" Text="全部更新" OnClick="PPFOR_updateMemberFieldClick"/>            
              <input name="reset" id="reset1" type="reset" 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_updateMemberField.ClientID %>","reset1");
                    }
                </script>
            </td>
        </tr>
      </table>
      <br />
</form>        
</asp:Content>
