<%@ Page Title="类别下表字段管理" StylesheetTheme="AdminSkin" Language="C#" MasterPageFile="~/Others/AdminMasterPage.Master" AutoEventWireup="true" CodeBehind="FieldManage.aspx.cs" Inherits="Solution.Admin.Contents.FieldManage" %>
  <%@ Register Assembly="BX.Common" Namespace="Common" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="AdminContentHead" runat="server">
  
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AdminContentCenter" runat="server">
    <form id="Form1" runat="server">
        <asp:ObjectDataSource ID="ObjectDataSourceFieldList" runat="server" EnablePaging="False"
            SelectMethod="ListFormElement" TypeName="Logic.HtmlForm"
            OldValuesParameterFormatString="original_{0}">
            <SelectParameters>
                <asp:QueryStringParameter DefaultValue="0" Name="templateid" QueryStringField="templateid" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <div class="DivRightCenter">
            <div class="listdiv">
                <div class="grid-title">
                    <div class="grid-title-text">
                        <h4>
                            <span>表单字段管理</span>
                        </h4>
                    </div>
                    <div class="grid-title-menu"></div>
                </div>
                <div class="grid-list">
                    <cc1:ExtendedGridView ID="ExtendedGridViewFieldList" runat="server" AutoGenerateColumns="False" CheckBox="False" CssClass="grid" DataSourceID="ObjectDataSourceFieldList" ItemName="字段管理">
                        <Columns>
                            <asp:BoundField DataField="FormID" HeaderText="ID" SortExpression="IndustryID">
                                <ItemStyle Width="50px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="TemplateName" HeaderText="类别">
                                <ItemStyle Width="100px" Wrap="False" HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="HtmlName" HeaderText="控件名">
                                <ItemStyle Width="100px" Wrap="False" HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="PropertyName" HeaderText="字段名称" />
                            <asp:BoundField DataField="Property" HeaderText="字段别名" />
                            <asp:TemplateField HeaderText="为空">
                                <ItemTemplate>
                                    <%#Eval("IsNull").ToString().Equals("1")?"是":"否" %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="Sequence" HeaderText="顺序">
                                <ItemStyle Width="50px" Wrap="False" />
                            </asp:BoundField>

                            <asp:TemplateField HeaderText="状态">
                                <ItemTemplate>
                                    <%#Eval("Status").ToString().Equals("1")?"有效":"隐藏" %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="操作">
                                <ItemStyle Width="100px" Wrap="False" />
                                <ItemTemplate>
                                    <a href="FieldEdit.aspx?cmd=modify&fieldid=<%#Eval("FormID") %>&templateid=<%#Eval("TemplateID") %>">修改</a>
                                    &nbsp;<a href="FieldManage.aspx?cmd=delete&fieldid=<%#Eval("FormID") %>&templateid=<%#Eval("TemplateID") %>" onclick="return confirm('确定删除?')">删除</a>

                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </cc1:ExtendedGridView>
                </div>
            </div>
            <br />
            <div class="FormButtonArea">
                <asp:Button ID="btnAddField" runat="server" Text="添加字段" OnClick="btnAddField_Click" />&nbsp;&nbsp;
                        &nbsp;&nbsp;             
                   <asp:Button ID="Button1" runat="server" Text="返回表单模板列表" OnClientClick="window.location.href='FormTemplateManage.aspx';return false;" />
            </div>
        </div>
    </form>
</asp:Content>
