<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Fields.aspx.cs" Inherits="SWTraining.Admin.Fields"
    Title="系统设置-自定义字段管理" %>

<%@ Import Namespace="SWTraining" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link id="linkStyle" runat="server" href="../Themes/Blue/css.css" rel="stylesheet"
        type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="tool_Search">
        <asp:DropDownList ID="ddlFieldType" runat="server">
            <asp:ListItem Value="">全部</asp:ListItem>
            <asp:ListItem Value="Student">学员报名(Student)</asp:ListItem>
            <asp:ListItem Value="Class">开设班级(Class)</asp:ListItem>
            <asp:ListItem Value="Potential">潜在登记(Potential)</asp:ListItem>
            <asp:ListItem Value="Users">增加员工(Users)</asp:ListItem>
        </asp:DropDownList>
        <label class="lab_buttom">
<asp:Button ID="btnGoto" runat="server" Text="转到" OnClick="btnGoto_Click"></asp:Button>
</label></div>
    <div class="both">
    </div>
    <div class="divpanel">
        <asp:GridView ID="GridView1" runat="server" CssClass="gridview" AutoGenerateColumns="False"
            DataKeyNames="CustomID" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowEditing="GridView1_RowEditing"
            OnRowUpdating="GridView1_RowUpdating" OnRowDataBound="GridView1_RowDataBound">
            <Columns>
                <asp:TemplateField HeaderText="隶属表">
                    <ItemTemplate>
                        <%# Eval("TableName")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="字段名称">
                    <ItemTemplate>
                        <%# "Custom" + Eval("CustomIndex")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="CustomName" HeaderText="显示名称" />
                <asp:TemplateField HeaderText="宽度">
                    <ItemTemplate>
                        <%# Eval("CustomWidth")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="tbxCustomWidth" runat="server" Text='<%# Eval("CustomWidth")%>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="显示">
                    <ItemTemplate>
                        <%# Rs.Items.GetYN((int)Eval("CustomState"))%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:DropDownList runat="server" ID="ddlCustomState" SelectedIndex='<%# Eval("CustomState") %>'>
                            <asp:ListItem Value="0" Selected="True" Text="否"></asp:ListItem>
                            <asp:ListItem Value="1" Text="是"></asp:ListItem>
                        </asp:DropDownList>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:CommandField HeaderText="编辑" EditText="编辑" CancelText="取消" UpdateText="更新" ShowEditButton="true" />
            </Columns>
        </asp:GridView>
    </div>
    <div class="divpanel">
        <b>注意事项：</b><br />
        1、“隶属表”表示数据库中的表名。<br />
        2、“字段名称”表示字段在数据表中的实际名称。<br />
        3、“显示名称”表示字段出现在表单界面上的名称。<br />
        4、“宽度”表示字段呈现的文本控件的宽度，单位为“像素”。<br />
    </div>
    </form>
</body>
</html>
