<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ProductClassSet.aspx.cs"
    Inherits="Admin_Product_ProductClassSet" EnableViewState="true" %>

<%@ Register Src="../Controls/EditionItem.ascx" TagName="EditionItem" TagPrefix="uc2" %>
<!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="../Stylesheet/Main.css" rel="stylesheet" type="text/css" />
    <link href="../Stylesheet/PopDropDownList.css" rel="stylesheet" type="text/css" />
<script src="../Javascript/Common.js" type="text/javascript" language="JavaScript"></script>
    <script src="../Javascript/PopDropDownList.js" type="text/javascript" language="JavaScript"></script>

</head>
<body>
    <form id="form1" runat="server">
        <div id="toolItem">
            <ul class="tool">
                <li class="tool_li_ac">
                    <img src="../Images/icon_add.gif" width="14" height="14" align="absmiddle" />
                    <a href="ProductClass.aspx" title="添加产品分类">添 加</a></li>
                <li>
                    <div class="tool_back">
                        <a href="javaScript:history.back(-1)">返回上一步</a></div>
                </li>
            </ul>
        </div>
        <div class="main_body">
            <h1>
                <asp:Literal ID="litTitle" runat="server"></asp:Literal>产品分类设置</h1>
            <uc2:EditionItem ID="EditionItem1" runat="server" />
            <div class="ht2">
            </div>
            <div class="divbox2" id="boxQuickAdd" style="display: none;">
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tbbox">
                    <tr>
                        <th>
                            分类名称
                        </th>
                        <th width="28%">
                            所属上级
                        </th>
                        <th width="15%">
                            分类标识
                        </th>
                        <th width="2%">
                            最子级
                        </th>
                        <th width="2%">
                            默认
                        </th>
                        <th width="2%">
                            显示
                        </th>
                        <th width="10%" runat="server" id="boxUser1">
                            会员查看权限
                        </th>
                        <th width="8%">
                            状态
                        </th>
                        <th width="5%">
                            排序
                        </th>
                        <th width="15%">
                            操作
                        </th>
                    </tr>
                    <tr>
                        <td align="center">
                            <asp:TextBox ID="txtClassName" runat="server" Width="96%"></asp:TextBox>
                        </td>
                        <td align="center">
                            <asp:DropDownList ID="dropClass" runat="server" Width="96%" DataTextField="TreeMode"
                                DataValueField="ID">
                            </asp:DropDownList>
                        </td>
                        <td align="center">
                            <asp:TextBox ID="txtClassKey" runat="server" Width="96%"></asp:TextBox>
                        </td>
                        <td align="center" class="input_no">
                            <asp:CheckBox ID="chkIsChild" runat="server" ToolTip="该分类没有下级分类，而直接做为最终产品分类" />
                        </td>
                        <td align="center" class="input_no">
                            <asp:CheckBox ID="chkIsDefault" runat="server" ToolTip="分类当在没有指定产品分类时优先取此分类的数据及产品" />
                        </td>
                        <td align="center" class="input_no">
                            <asp:CheckBox ID="chkIsMenuView" Checked="true" runat="server" ToolTip="该分类是否显示在前台的分类菜单列表中" />
                        </td>
                        <td align="center" style="position: fixed" id="boxUser2" runat="server">
                            <div class="PopDropDownList_Box" onclick="PopDropDownList_Down(PopDropDownList_List_Value)"
                                style="float: right;">
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td>
                                            <label id="PopDropDownList_Text" class="PopDropDownList_Text">
                                                请选择...</label></td>
                                        <td align="right" width="12">
                                            <div onmouseup="this.className='PopDropDownList_Arrow'" class="PopDropDownList_Arrow"
                                                onmousedown="this.className='PopDropDownList_Arrow_Ac'" onmouseout="this.className='PopDropDownList_Arrow'">
                                                6</div>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div class="PopDropDownList_List_Box" style="margin-top: 20px; width: auto;" id="PopDropDownList_List_Value">
                                <asp:Repeater ID="rptUserLevel" runat="server">
                                    <ItemTemplate>
                                        <div class="PopDropDownList_List_Item input_no" onmouseover="HidDropDownListLight(this)">
                                            <asp:Literal ID="litID" runat="server" Text='<%#Eval("ID")%>' Visible="false"></asp:Literal><asp:CheckBox
                                                ID="chkIsSelect" runat="server" /><%#Eval("LevelName") %></div>
                                    </ItemTemplate>
                                </asp:Repeater>
                                <div onclick="PopDropDownList_DownHide()" style="text-align: right; cursor: pointer;
                                    padding: 2px;">
                                    收起↑</div>
                            </div>
                        </td>
                        <td align="center">
                            <asp:DropDownList ID="dropState" runat="server">
                                <asp:ListItem Value="1">启用</asp:ListItem>
                                <asp:ListItem Value="0">不启用</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td align="center">
                            <asp:TextBox ID="txtSortOrder" runat="server" Width="96%"></asp:TextBox>
                        </td>
                        <td align="center">
                            <asp:LinkButton ID="lbtnAdd" runat="server" CssClass="btn_bg" OnClick="lbtnAdd_Click">快速添加</asp:LinkButton>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="ht">
            </div>
            <div class="item">
                <ul class="item_list">
                    <li class="item_list_cell_ac margin_left_2px">
                        <div>
                            <asp:Literal ID="litTitle3" runat="server"></asp:Literal>产品分类列表
                        </div>
                    </li>
                    <li><span class="float_right">
                        <img src="../Images/icon_add.gif" width="14" height="14" align="absmiddle" border="0" />
                        <a href="javaScript:void(0)" onclick="ShowObjectBox('boxQuickAdd')">快速增加分类</a>&nbsp;&nbsp;&nbsp;<img
                            src="../Images/icon_add.gif" width="14" height="14" align="absmiddle" />
                        <a href="ProductClass.aspx">高级增加分类</a></span></li>
                </ul>
            </div>
            <div class="ht2">
            </div>
            <div class="divbox2">
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tbbox">
                    <tr>
                        <th>
                            分类名称
                        </th>
                        <th width="28%">
                            所属上级
                        </th>
                        <th width="15%">
                            分类标识
                        </th>
                        <th width="2%">
                            最子级
                        </th>
                        <th width="2%">
                            默认
                        </th>
                        <th width="2%">
                            显示
                        </th>
                        <th width="10%" id="boxUser3" runat="server">
                            会员查看权限
                        </th>
                        <th width="8%">
                            状态
                        </th>
                        <th width="5%">
                            排序
                        </th>
                        <th width="9%">
                            操作
                        </th>
                    </tr>
                    <asp:Repeater ID="rptList" runat="server" OnItemCommand="rptList_ItemCommand" OnItemDataBound="rptList_ItemDataBound">
                        <ItemTemplate>
                            <tr>
                                <td>
                                    <%#Eval("TreeMode")%>
                                </td>
                                <td>
                                    <asp:Literal ID="litClass" runat="server" Text="根级"></asp:Literal>
                                </td>
                                <td>
                                    <%#Eval("ClassKey")%>
                                </td>
                                <td>
                                    <%#Eval("IsChild") != DBNull.Value && Eval("IsChild").ToString().ToLower() == "true" ? "是" : "否"%>
                                </td>
                                <td>
                                    <%#Eval("IsDefault") != DBNull.Value && Eval("IsDefault").ToString().ToLower() == "true" ? "是" : "否"%>
                                </td>
                                <td>
                                    <%#Eval("IsMenuView") != DBNull.Value && Eval("IsMenuView").ToString().ToLower() == "true" ? "是" : "否"%>
                                </td>
                                <td id="boxUser4" runat="server" visible="<%#SnSee.Config.ModuleConfig.SystemModuleUserOpen %>">
                                    <asp:Literal ID="litUserLevelList" runat="server"></asp:Literal>&nbsp;
                                </td>
                                <td>
                                    <%#Eval("State") != DBNull.Value && Eval("State").ToString()=="1" ? "启用" : "未启用"%>
                                </td>
                                <td>
                                    <%#Eval("SortOrder")%>
                                </td>
                                <td align="center">
                                    <a href="ProductClass.aspx?ID=<%#Eval("ID")%>&EditionID=<%#Eval("EditionID")%>&AC=Edit"
                                        title="编辑当前信息">
                                        <img src="../images/icon_bj.gif" border="0" align="absmiddle" /></a>
                                    <asp:LinkButton ID="lbtnDel" runat="server" CommandArgument='<%#Eval("ID")%>' CommandName="Del_CommandName"
                                        OnClientClick="return confirm('确认删除当前项？')" ToolTip="删除当前项"><img src="../images/icon_sc.gif" border="0" align="absmiddle" /></asp:LinkButton>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </table>
            </div>
            <div class="ht">
            </div>
            <div class="ht">
            </div>
            <ul class="ac_intro" runat="server" id="boxPageExplain">
                <li class="ac_intro_title">说明：</li>
                <li class="ac_intro_item">1. 便于系统的灵活性，每个语言版本产品分类需要单独增加。</li>
                <li class="ac_intro_item">2. 删除一个产品分类时，必须先删除分类的中的所有的相关产品(包括回收站中的产品)。</li>
                <li class="ac_intro_item">3. 分类“最子级”是指该分类没有下级分类，而直接做为最终产品分类。</li>
                <li class="ac_intro_item">4. 分类“默认”是指该分类当在没有指定产品分类时优先取此分类的数据及产品。</li>
                <li class="ac_intro_item">5. 分类“显示”是指该分类是否显示在前台的分类菜单列表中。</li>
                <li class="ac_intro_item">6. 分类“会员查看权限”如果为空则表示任何会员包括游客都可以查看。</li>
            </ul>
        </div>
    </form>
</body>
</html>
