<%@ page language="C#" autoeventwireup="true" inherits="admin_other_DictionaryList, DianCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>
<%@ Import Namespace="D.Common" %>
<!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="CssName" rel="stylesheet" type="text/css" runat="server" />
    <script src="../../js/Common.js" type="text/javascript"></script>
    <script src="../../js/lhgdialog/lhgcore.lhgdialog.min.js?self=true&skin=<%=Function.GetCssNameColor()%>" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <table class="dh" cellpadding="0" cellspacing="0" border="0" align="center">
        <tr>
            <td>
                <asp:Image ID="P_Go" runat="server" ImageAlign="AbsMiddle" />
                您现在的位置：<a href="../info.aspx">后台管理</a> >> <a href="DictionaryList.aspx">数据字典列表</a>
                <asp:Literal ID="Literal1" runat="server"></asp:Literal>
            </td>
        </tr>
    </table>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:GridView ID="GridView1" HeaderStyle-CssClass="title" runat="server" AutoGenerateColumns="False"
                CssClass="border" DataKeyNames="Id" RowStyle-CssClass="tdMoveTr" HorizontalAlign="Center"
                OnRowDataBound="GridView1_RowDataBound" OnRowCancelingEdit="GridView1_RowCancelingEdit"
                OnRowDeleting="GridView1_RowDeleting" OnRowEditing="GridView1_RowEditing" 
                OnRowUpdating="GridView1_RowUpdating" Font-Bold="False" 
                onrowcommand="GridView1_RowCommand">
                <RowStyle CssClass="tdMoveTr" />
                <Columns>
                    <asp:BoundField DataField="Id" HeaderText="ID" ReadOnly="True" />
                    <asp:TemplateField HeaderText="Text值">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Text") %>' CssClass="in1"></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Literal runat="server" Text='<%# Bind("Text") %>' ID="Literal1"></asp:Literal>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Value值">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Value") %>' CssClass="in1"></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label2" runat="server" Text='<%# Bind("Value") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="排序">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("OrderId") %>' CssClass="in1"></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label3" runat="server" Text='<%# Bind("OrderId") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:CommandField ShowEditButton="True" HeaderText="编辑" />
                    <asp:TemplateField HeaderText="导出" ShowHeader="False">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" 
                                CommandName="DaoChu" CommandArgument='<%# Bind("Id") %>' Text="导出"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:CommandField ShowDeleteButton="True" HeaderText="删除" />
                </Columns>
                <HeaderStyle CssClass="title" Font-Bold="True" />
                <EmptyDataTemplate>
                        <tr class="title">
                            <td class="t1">ID
                            </td>
                            <td>Text值
                            </td>
                            <td>Value值
                            </td>
                            <td>排序
                            </td>
                            <td>编辑
                            </td>
                            <td>导出
                            </td>
                            <td>删除
                            </td>
                        </tr>
                </EmptyDataTemplate>
            </asp:GridView>
            <table class="border" cellspacing="1" cellpadding="0" width="99%" border="0" align="center"
                style="margin-top: 5px">
                <tr>
                    <td width="30%" valign="top">
                        <table cellpadding="0" width="99%" border="0" align="center" style="margin-top: 5px">
                            <tr>
                                <td class="bqleft">
                                    Text值：
                                </td>
                                <td class="bqright">
                                    <asp:TextBox ID="txtText" runat="server" CssClass="in1"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="bqleft">
                                    Value值：
                                </td>
                                <td class="bqright">
                                    <asp:TextBox ID="txtValue" runat="server" CssClass="in1"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="bqleft">
                                    排序值：
                                </td>
                                <td class="bqright">
                                    <asp:TextBox ID="txtOrderId" runat="server" CssClass="in1"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="bqleft">
                                </td>
                                <td class="bqright" height="40">
                                    <asp:Button ID="Button1" runat="server" CssClass="btn radius30 pad_0_30" Text=" 确认 " OnClick="Button1_Click" />
                                </td>
                            </tr>
                            <tr>
                                <td class="bqright" colspan="2">
                                    <font color="red">
                                        1、如果设置的数据字典用于单选、多选项时，其选项的Value值为此处设置的【Value值】<br />
                                        2、如果设置的数据字典用于二级联动、三级联动等具有上下级关系时，其选项的Value值为数据字典的【Id值】</font>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="30%" valign="top">
                        <table cellpadding="0" width="99%" border="0" align="center" style="margin-top: 5px">
                            <tr>
                                <td class="bqleft">
                                    批量添加：
                                </td>
                                <td class="bqright">
                                    <asp:TextBox ID="txtMultLineName" runat="server" TextMode="MultiLine" Rows="6" Width="99%"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="bqleft">
                                </td>
                                <td class="bqright" height="40">
                                    <asp:Button ID="Button2" runat="server" CssClass="btn radius30 pad_0_30" Text=" 批量导入 " 
                                        onclick="Button2_Click"/>
                                </td>
                            </tr>
                            <tr>
                                <td class="bqright" colspan="2">
                                    <font color="red">
                                        1、批量添加格式，Text|Value。如：本科|1 、 研究生|研究生<br />
                                        2、Text和Value相同时，可以直接输入如：本科、研究生<br />
                                        3、回车换行，每行一个数据。</font>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="40%" valign="top">
                        <table cellpadding="0" width="99%" border="0" align="center" style="margin-top: 5px">
                            <tr>
                                <td class="bqleft">
                                    分类名称：
                                </td>
                                <td class="bqright">
                                    <asp:TextBox ID="txtImportName" runat="server" Width="99%" CssClass="in1"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="bqleft">
                                    选择模板：
                                </td>
                                <td class="bqright">
                                    <asp:TextBox ID="txtDicTemplate" runat="server" Columns="30" CssClass="in1" Style="float: left"></asp:TextBox><input
                                        id="Button4" type="button" value="选择模板" class="btn" onclick="WinOpenLhgDialog('选择模板','../template/SelectTemplate.aspx?ControlId=txtDicTemplate',650,450,'')"
                                        style="float: left" />
                                </td>
                            </tr>
                            <tr>
                                <td class="bqleft">
                                </td>
                                <td class="bqright" height="50">
                                    <asp:Button ID="Button5" runat="server" Text=" 使用模板导入 " CssClass="btn radius30 pad_0_30" 
                                        onclick="Button5_Click" />
                                </td>
                            </tr>
                            <tr>
                                <td class="bqright" colspan="2">
                                    <font color="red">1、请从官方网站下载数据字典Excel模板<br />2、如下载全国三级地区模板，请在分类处输入“全国三级地区”<br />3、新的分类将会在当前分类下创建</font>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
