<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Class.aspx.cs" Inherits="KZS.Web.Manage.Setting.Class" %>

<%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %>
<!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 href="../Template/Images/global.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" type="text/javascript">
        function del() {
            if (confirm("真的要删除这条记录吗？删除后将无法恢复！")) {
                return true;
            }
            else {
                return false;
            }
        }
      
    </script>
</head>
<body>
    <div id="topitem">
    </div>
    <form id="form1" runat="server">
    <div id="newOrders" runat="server" visible="false">
        <ul>
            <%classOrders();%>
            <li>
                <input type="button" value="返回" onclick="location.href='Class.aspx?Class=<%Response.Write(GetClassType());%>'" />
            </li>
        </ul>
    </div>
    <div id="addForm" runat="server">
        <table border="1" width="80%" class="lsttab" style="border-collapse: collapse" bordercolor="#C0C0C0">
            <tr>
                <td style="width: 150px;">
                    分类名称：
                </td>
                <td>
                    <asp:TextBox ID="txt_clsName" Width="400px" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="ref_add_clsName" runat="server" ControlToValidate="txt_clsName"
                        Display="Dynamic" ErrorMessage="分类名称不能为空"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    上级分类：
                </td>
                <td>
                    <asp:DropDownList ID="ddl_cls" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label1" runat="server" Text=" 分类别名："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txt_Alias" runat="server"></asp:TextBox> <asp:Label ID="Labeledits" ForeColor="Red" B runat="server" Text=" 注:'别名'是在URL中使用的别称，建议用小写，只能包含字母，数字(但不能为纯数字)。"></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                    自定义分类页面标题：
                </td>
                <td>
                    <asp:TextBox ID="txt_Page_title" Width="400px" MaxLength="64" runat="server"></asp:TextBox><span
                        style="color: Red;">&nbsp;&nbsp;注:32个汉字以内</span>
                </td>
            </tr>
            <tr>
                <td>
                    自定义分类页面关键字：
                </td>
                <td>
                    <asp:TextBox ID="txt_Page_key" Width="400px" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    自定义分类页面说明：
                </td>
                <td>
                    <asp:TextBox ID="txt_Page_directions" Width="400px" MaxLength="160" Height="60px"
                        TextMode="MultiLine" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Button ID="btn_Add" runat="server" Text="添加" OnClick="btn_Add_Click" />
                    &nbsp;<input type="button" value="返回" onclick="location.href='Class.aspx?Class=<%Response.Write(GetClassType());%>'" />
                </td>
            </tr>
        </table>
    </div>
    <div id="editForm" runat="server">
        <table border="1" width="80%" class="lsttab" style="border-collapse: collapse" bordercolor="#C0C0C0">
            <tr>
                <td style="width: 150px;">
                    分类名称：
                </td>
                <td>
                    <asp:TextBox ID="txt_edit_clsName" Width="400px" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="ref_edit_clsName" runat="server" ControlToValidate="txt_edit_clsName"
                        Display="Dynamic" ErrorMessage="分类名称不能为空"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    上级分类：
                </td>
                <td>
                    <asp:DropDownList ID="ddl_edit_cls" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            
                <tr>
                    <td>
                        <asp:Label ID="Labeledit" runat="server" Text=" 分类别名："></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txt_Alias_edit" runat="server"></asp:TextBox>
                       
                    </td>
                </tr>
             
            <tr>
                <td>
                    自定义分类页面标题：
                </td>
                <td>
                    <asp:TextBox ID="txt_Page_title_edit" MaxLength="64" Width="400px" runat="server"></asp:TextBox><span
                        style="color: Red;">&nbsp;&nbsp;注:64个字符内</span>
                </td>
            </tr>
            <tr>
                <td>
                    自定义分类页面关键字：
                </td>
                <td>
                    <asp:TextBox ID="txt_Page_key_edit" Width="400px" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    自定义分类页面说明：
                </td>
                <td>
                    <asp:TextBox ID="txt_Page_directions_edit" MaxLength="160" Width="400px" Height="60px"
                        TextMode="MultiLine" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Button ID="btn_Edit" runat="server" Text="修改" /><input type="button" onclick="location.href='Class.aspx?Class=<%Response.Write(GetClassType());%>'"
                        value="返回" />
                </td>
            </tr>
        </table>
    </div>
    <div id="classList" runat="server">
        <div id="show_MSG" runat="server">
        </div>
        <table border="1" width="100%" class="lsttab" cellspacing="0" cellpadding="5" style="border-collapse: collapse"
            bordercolor="#C0C0C0">
            <tr>
                <td colspan="4" class="Pager">
                    <a href="?Action=Add&Class=<%Response.Write(GetClassType());%>">添加分类</a> <a href="?Action=classOrders&Class=<%Response.Write(GetClassType());%>"
                        title="除顶级之外的其他级的排序">子级排序</a>
                </td>
            </tr>
            <tr class="tit">
                <td style="width: 10%;">
                    Id
                </td>
                <td>
                    一级排序
                </td>
                <td>
                    分类名称
                </td>
                <td>
                    操作
                </td>
            </tr>
            <%=strList %>
            <%--<asp:Repeater ID="retList" runat="server" OnItemCommand="retList_ItemCommand">
                <ItemTemplate>
                    <tr>
                        <td>
                            <%#Eval("Id")%>
                        </td>
                        <td>
                            <%#checkFirstOrder(Convert.ToInt32(Eval("Id")), Convert.ToInt32(Eval("parentid")), Convert.ToInt32(Eval("rootid")))%>
                        </td>
                        <td>
                            <%#checkCityName(Convert.ToString(Eval("className")),Convert.ToInt32(Eval("Depth")))%>
                        </td>
                        <td>
                            <asp:Button ID="edit" runat="server" Text="修改" CommandName="edit" CommandArgument='<%#Eval("Id") %>' /> 
                           <asp:Button ID="del" runat="server"   Text="删除" CommandName="del" CommandArgument='<%#Eval("id") %>' /> 
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>--%>
             

            <tr>
                <td>
                    <asp:Button ID="btn_SaveTopOrders" runat="server" Text="保存排序" OnClick="btn_SaveTopOrders_Click" />
                </td>
                <td colspan="3" id="Pager" runat="server" class="Pager">
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
