<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Product_Category_Operate, V5Shop.Shop.Category" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc1" %>
<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="uc1" %>
<!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 id="Head1" runat="server">
    <title>品牌添加/编辑</title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />
    <link href="js/calendar-system.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" language="javascript" src="js/Common.js"></script>

    <script type="text/javascript" language="javascript" src="Js/Calendar.js"></script>

    <script type="text/javascript" language="javascript" src="Js/Calendar-zh.js"></script>

    <script type="text/javascript" language="javascript" src="Js/Calendar-Setup.js"></script>

</head>
<body>
    <form id="form1" runat="server">
        <div class="OperateTitle">
            <div>
                <asp:Label ID="lblAdd" runat="server" Text="【 商品分类添加 】"></asp:Label>
                <asp:Label ID="lblEdit" runat="server" Text="【 商品分类编辑 】" Visible="false"></asp:Label>
                <a href="Product_Category_Manage.aspx" title="返回商品分类列表">返回列表</a>
            </div>
        </div>
        <div>
            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" id="OperateTable">
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        &nbsp;<asp:Label ID="lblName" runat="server" Text="分类名称："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px" colspan="3">
                        <asp:TextBox ID="txtName" runat="server" MaxLength="80" Width="300px"></asp:TextBox><span class="NeedMsg">*</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtName"
                            runat="server" ErrorMessage="不能为空" Display="Dynamic"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <uc1:HelpCtrl ID="HelpCtrl7" runat="server" FontColor="red" Header="所属分类" ImageURL="images/help.gif"
                            Text="该分类所隶属的分类，如果是根分类，请写0。如果不是根分类，请点 “选择上级分类” 按钮" />
                        <asp:Label ID="lblHeadCategory" runat="server" Text="所属大类："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 29px" colspan="3">
                        <asp:TextBox ID="txtHeadID" Enabled="false" runat="server" MaxLength="150" AutoPostBack="True" OnTextChanged="txtHeadId_TextChanged" Width="300px" ReadOnly="True">一级分类</asp:TextBox>
                        <asp:HiddenField ID="hftxtHeadID" runat="server" Value="0" />
                        <input id="btnGetCatagory" type="button" onclick="OpenDialogProductCategory('txtHeadID')"
                            value="选择上级分类" class="button" />&nbsp;<span style="color: #ff0000"></span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtHeadId"
                            Display="Dynamic" ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                        </td>
                </tr>
                                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <asp:Label ID="lblSrcDetail" runat="server" Text="分类大图："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 29px" colspan="3">
                        <asp:TextBox ID="txtSrcDetail" runat="server" MaxLength="200" Width="300px"></asp:TextBox>
                        <input type="button" value="选择图片" onclick="OpenDialog('txtSrcDetail')" class="button" />
                        <img src="" id="txtSrcDetailView" style="display: none;" />
                    </td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <asp:Label ID="lblSrcList" runat="server" Text="分类小图："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 29px" colspan="3">
                        <asp:TextBox ID="txtSrcList" runat="server" MaxLength="200" Width="300px"></asp:TextBox>
                        <input type="button" value="选择图片" onclick="OpenDialog('txtSrcList')" class="button" />
                        <img src="" id="txtSrcListView" style="display: none;" />
                    </td>
                </tr>

                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <uc1:HelpCtrl ID="HelpCtrl1" runat="server" FontColor="red" Header="关键字" HideSelects="False"
                            ImageURL="images/help.gif" Text="与分类相关的关键字，此项可用于前台搜索引擎优化。" />
                        <asp:Label ID="lblSearchKey" runat="server" Text="关键字："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 29px" colspan="3">
                        <asp:TextBox ID="txtKeywords" runat="server" MaxLength="300" TextMode="MultiLine" Height="60px" Width="300px"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtKeywords"
                            Display="Dynamic" ErrorMessage="长度必须在150字以内" ValidationExpression="^[\s\S]{0,150}$"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <uc1:HelpCtrl ID="HelpCtrl2" runat="server" FontColor="red" Header="描述" ImageURL="images/help.gif"
                            Text="与分类相关的简短描述，此项可用于前台搜索引擎优化。" />
                        <asp:Label ID="lblDescription" runat="server" Text="描述："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 29px" colspan="3">
                        <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" Height="60px" Width="300px"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtDescription"
                            Display="Dynamic" ErrorMessage="长度必须在300字以内" ValidationExpression="^[\s\S]{0,300}$"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <uc1:HelpCtrl ID="HelpCtrl3" runat="server" FontColor="red" Header="分类排序" ImageURL="images/help.gif"
                            Text="此项可用于控制前台分类显示顺序。" />
                        <asp:Label ID="lblOrderId" runat="server" Text="分类排序："></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 29px" colspan="3">
                        <asp:TextBox ID="txtOrderId" runat="server" MaxLength="150" Width="100px">0</asp:TextBox><span
                            style="color: #ff0000">*</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtOrderId"
                            Display="Dynamic" ErrorMessage="不能为空"></asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtOrderId"
                            Display="Dynamic" ErrorMessage="只能为数字" ValidationExpression="\d*"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#ffffff" style="width: 20%; height: 29px">
                        <uc1:HelpCtrl ID="HelpCtrl4" runat="server" FontColor="red" Header="绑定商品类型" ImageURL="images/help.gif"
                            Text="设置该分类下商品具有哪些共同属性。如绑定电脑网络。则此分类下的商品均具有电脑网络的属性。" HideSelects="true"/>
                        <asp:Label ID="lblProductType" runat="server" Text="绑定商品类型："></asp:Label></td>
                    <td align="left" bgcolor="#ffffff" colspan="3" style="height: 29px">
                        <asp:DropDownList ID="ddlProductType" runat="server">
                        </asp:DropDownList></td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <uc1:HelpCtrl ID="HelpCtrl5" runat="server" FontColor="red" Header="是否显示" ImageURL="images/help.gif"
                            Text="如果选中此项，则该分类将会在前台显示。反之，则不显示。" HideSelects="true"/>
                        <asp:Label ID="lblIsShow" runat="server" Text="是否显示：" Visible="False"></asp:Label>
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px" colspan="3">
                        <input id="cbIsShow" type="checkbox" value="1" runat="server" checked="checked" class="checkbox" visible="false" />
                    </td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="width: 20%; height: 30px;">
                        <uc1:HelpCtrl ID="HelpCtrl6" runat="server" FontColor="red" Header="相关品牌" ImageURL="images/help.gif"
                            Text="与分类相关的品牌。注意：只有一级分类可设置此项。" HideSelects="true" />
                        <asp:Label ID="lblRelatedBrand" runat="server" Text="相关品牌："></asp:Label></td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px; width: 8%;">
                        <asp:Label ID="lblNonSelectBrand" runat="server" Text="待选品牌"></asp:Label><br />
                        <asp:ListBox ID="lbNonSelectBrand" runat="server" Height="180px" Width="140px" SelectionMode="Multiple">
                        </asp:ListBox>
                    </td>
                    <td align="center" bgcolor="#ffffff" style="height: 30px; width: 12%;">
                        <asp:Button ID="btnAddBrand" runat="server" Text="添加>>" CssClass="button" CausesValidation="False"
                            OnClick="btnAddBrand_Click" /><br />
                        <br />
                        <asp:Button ID="btnDelBrand" runat="server" Text="<<移除" CssClass="button" CausesValidation="False"
                            OnClick="btnDelBrand_Click" />
                    </td>
                    <td align="left" bgcolor="#ffffff" style="height: 30px;">
                        <asp:Label ID="lblSelectBrand" runat="server" Text="已选品牌"></asp:Label><br />
                        <asp:ListBox ID="lbSelectBrand" runat="server" Height="180px" Width="140px" SelectionMode="Multiple">
                        </asp:ListBox>
                    </td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="width: 20%; height: 30px;">
                    </td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px" colspan="3">
                        <asp:Button ID="btnAdd" runat="server" Text="确定" OnClick="btnAdd_Click" meta:resourcekey="btnAddResource1"
                            CssClass="button" />
                        <asp:Button ID="btnEdit" runat="server" Text="更新" OnClick="btnEdit_Click" Visible="False"
                            meta:resourcekey="btnEditResource1" CssClass="button" />
                        <input id="iptReset" runat="server" type="reset" value="重置" class="button" />
                        <input id="btnReturn" runat="server" type="button" value="返回列表" onclick="window.location.href='Product_Category_Manage.aspx'"
                            class="button" />
                    </td>
                    <td align="left" bgcolor="#ffffff" style="height: 30px">
                    </td>
                </tr>
            </table>

            <script type="text/javascript">
            //加TABLE样式
            InitTrClass();
            </script>
    </form>
    <uc1:PageBottom ID="PageBottom" runat="server" />
</body>
</html>
