<%
    //-----------------------------------------------------------
    // 文件名称: Other_Menu_Manage.aspx
    // 页面名称: 菜单管理
    //
    // 描    述:
    //
    // 创建标识: Add By 吴建春 2008-05-27
    //-----------------------------------------------------------
%>

<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Other_Menu_Manage, V5Shop.Shop.Others" culture="auto" uiculture="auto" meta:resourcekey="PageResource1" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Src="control/ManageHeader.ascx" TagName="ManageHeader" TagPrefix="uc3" %>
<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<!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="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript" src="js/Common.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <uc3:ManageHeader ID="PageHead" runat="server" />
            <div id="search">
                <!-- 查询部 -->
                <div style="padding-right: 20px; padding-left: 20px; padding-bottom: 20px; padding-top: 20px; border-bottom: #f7f7f7 4px solid">
                    &nbsp;&nbsp;
                    <!-- 类别名 -->
                    <asp:Label ID="lblName" runat="server" Text="菜单名称：" meta:resourcekey="lblAdminNameResource" />
                    <asp:TextBox ID="txtName" runat="server" Width="80px" />
                    &nbsp;&nbsp; &nbsp;<asp:Label ID="lblCategory" runat="server" Text="菜单类别："></asp:Label>&nbsp;<asp:DropDownList ID="ddlCategory" runat="server" Width="120px">
                        <asp:ListItem Value="-1">全部</asp:ListItem>
                    </asp:DropDownList>&nbsp; &nbsp;
                    <!-- 是否可删除 -->
                    <asp:Label ID="lblIsDel" runat="server" Text="是否可删除：" meta:resourcekey="lblAdminNameResource" />
                    <asp:DropDownList ID="ddlIsDel" runat="server" meta:resourcekey="ddlDeptResource" Width="120px">
                        <asp:ListItem Value="-1">全部</asp:ListItem>
                        <asp:ListItem Value="1">可删除</asp:ListItem>
                        <asp:ListItem Value="0">不可删除</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;&nbsp; &nbsp;
                    <!-- 查询按钮 -->
                    <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="查询" meta:resourcekey="btnSearchResource" CssClass="button" />
                </div>
            </div>
            <div id="content">
                <!-- 明细数据编辑栏 -->
                <div style="padding-right: 25px; padding-left: 25px; padding-bottom: 3px; color: #4b6888; padding-top: 3px; border-bottom: #cccccc 1px solid">
                    <input id="CheckAllBox" onclick="CheckAll()" type="checkbox" class="checkbox" />全选
                    <asp:LinkButton ID="btnAdd" runat="server" ForeColor="#4B6888" meta:resourcekey="btnAddResource2" OnClick="btnAdd_Click" Width="60px"><img src="images/icon/key_add.gif" alt=""/> 添加</asp:LinkButton>
                    <asp:LinkButton ID="btnEdit" runat="server" ForeColor="#4B6888" meta:resourcekey="btnEditResource2" OnClick="btnEdit_Click" OnClientClick="return CheckEdit()" CausesValidation="False" Width="60px"><img src="images/icon/key_edit.gif" alt=""/>编辑</asp:LinkButton>
                    <asp:LinkButton ID="btnDel" runat="server"  ForeColor="#4B6888" meta:resourcekey="btnDelResource2" CausesValidation="False" OnClick="btnDel_Click" OnClientClick="return CheckDel()"> <img src="images/icon/key_delete.gif" alt=""/> 删除</asp:LinkButton>
                </div>
                <!-- 明细数据 -->
                <div class="listborder">
                    <cc1:V5ShopGridView ID="GridViewShow" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CssClass="datalist" PageSize="12" EmptyDataText="查询不到任何数据！" HeaderStyle-ForeColor="#000000">
                        <PagerSettings Mode="NumericFirstLast" />
                        <Columns>
                            <asp:TemplateField meta:resourcekey="DetilData" ItemStyle-Width="5%">
                                <itemtemplate>
                                    <input runat="server" class="checkbox" value='<%# Eval("ID") %>' id="CheckBoxID" type="checkbox"
                                        onmouseover="this.mouse='over'" onmouseout="this.mouse='out'"/>
                                </itemtemplate>
                                <itemstyle horizontalalign="Center" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="ID" HeaderText="ID" ItemStyle-Width="10%" />
                            <asp:BoundField DataField="Name" HeaderText="菜单内容/名称" SortExpression="Name" ItemStyle-Width="30%" />
                            <asp:BoundField DataField="Code" HeaderText="菜单代号" SortExpression="Code" ItemStyle-Width="20%" />
                            <asp:BoundField DataField="CategroyName" HeaderText="菜单类别" SortExpression="CategroyName" ItemStyle-Width="20%" />
                            <asp:BoundField DataField="OrderID" HeaderText="排序号" SortExpression="OrderID" ItemStyle-Width="5%" />
                            <asp:TemplateField meta:resourcekey="DetilData" HeaderText="状态" SortExpression="IsDel" ItemStyle-Width="10%">
                                <itemtemplate>
                                    <asp:Label ID="lblDelState" runat="server" Text='<%# FormatDelState(DataBinder.Eval(Container, "DataItem(IsDel)","{0}")) %>' />
                                </itemtemplate>
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle CssClass="category" />
                    </cc1:V5ShopGridView>
                </div>
                <asp:Panel runat="server" ID="PanelShow" Visible="False" Width="100%">
                    <div align="center" style="background: #f1f1f1">
                        <table cellpadding="0" cellspacing="0" width="500">
                            <!-- 类型代号 -->
                            <tr>
                                <td align="right" style="width: 20%; height: 30px;">
                                    <asp:Label runat="server" ID="lbl02" Text="菜单名称/内容：" />&nbsp;</td>
                                <td align="left" style="height: 30px">
                                    <asp:TextBox ID="txtNameAdd" runat="server" Width="300px" MaxLength="50" />
                                    <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="txtCodeAdd" Display="Dynamic" ErrorMessage="不能为空" OnServerValidate="ValidateTextBox" ValidateEmptyText="True">
                                    </asp:CustomValidator>
                                    <span class="NeedMsg">*</span>
                                </td>
                            </tr>
                            <!-- 类型名称 -->
                            <tr>
                                <td align="right" style="height: 30px">
                                    <asp:Label runat="server" ID="lbl03" Text="菜单代号：" />&nbsp;</td>
                                <td align="left" style="height: 30px">
                                    <asp:TextBox ID="txtCodeAdd" runat="server" Width="300px" MaxLength="50" />
                                    <asp:CustomValidator ID="CustomValidator2" runat="server" ControlToValidate="txtNameAdd" Display="Dynamic" ErrorMessage="不能为空" OnServerValidate="ValidateTextBox" ValidateEmptyText="True">
                                    </asp:CustomValidator>
                                    <span class="NeedMsg">*</span>
                                </td>
                            </tr>
                            <!-- 菜单类别描述 -->
                            <tr>
                                <td align="right" style="height: 30px">
                                    <asp:Label runat="server" ID="lbl04" Text="排序号：" />&nbsp;</td>
                                <td align="left" style="height: 30px">
                                    <cc1:NumberBox ID="txtOrderIDAdd" runat="server" IsInt="True" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" style="height: 30px">
                                    <asp:Label runat="server" ID="lbl05" Text="菜单类别：" />&nbsp;</td>
                                <td align="left" style="height: 30px">
                                    <asp:DropDownList ID="ddlCategoryAdd" runat="server" Width="150px">
                                        <asp:ListItem Selected="True" Value="-1">请选择</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:CustomValidator ID="CustomValidator3" runat="server" ControlToValidate="ddlCategoryAdd" Display="Dynamic" ErrorMessage="必须选择" OnServerValidate="ValidateTextBox" ValidateEmptyText="True">
                                    </asp:CustomValidator>
                                    <span class="NeedMsg">*</span></td>
                            </tr>
                            <tr>
                                <td style="height: 30px; text-align: right;">
                                    <asp:Label runat="server" ID="lbl06" Text="是否可删除：" />&nbsp;</td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlIsDelAdd" runat="server" Width="150px">
                                        <asp:ListItem Selected="True" Value="0">不可删除</asp:ListItem>
                                        <asp:ListItem Value="1">可删除</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <!-- 确定/更新/重置 -->
                            <tr>
                                <td align="center" style="height: 36px;" colspan="2">
                                    <asp:Button ID="btnAddSubmit" runat="server" meta:resourcekey="btnAddResource1" OnClick="btnAddSubmit_Click" Text="确定" CssClass="button" />
                                    <asp:Button ID="btnEditSubmit" runat="server" meta:resourcekey="btnEditResource1" OnClick="btnEditSubmit_Click" Text="更新" Visible="False" CssClass="button" />
                                    <input id="iptReset" runat="server" type="reset" value="重置" class="button" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:Panel>
            </div>
            <uc2:PageBottom ID="PageBottom" runat="server" />
            <div id="hiddenfield">
                <asp:HiddenField ID="CheckedIDS" runat="server" Value="0" />
                <asp:HiddenField ID="PageIndex" runat="server" Value="0" />
                <asp:HiddenField ID="MaxPageIndex" runat="server" Value="0" />
                <uc1:HiddenField ID="Alert" runat="server" />
            </div>
        </div>
    </form>
</body>
</html>
