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

<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Tool_Page_Manage, V5Shop.Shop.Tool" 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">
                    <div>
                        &nbsp;&nbsp;
                        <!-- 一级目录 -->
                        <asp:Label ID="lblFirstID" runat="server" Text="一级目录:" meta:resourcekey="lblFirstIDResource" Width="56px"></asp:Label>&nbsp;<asp:DropDownList ID="ddlFirstID" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlFirstID_SelectedIndexChanged"
                            Width="132px">
                        </asp:DropDownList>&nbsp;&nbsp;
                        <!-- 二级目录 -->
                        <asp:Label ID="lblSecondID" runat="server" Text="二级目录:" meta:resourcekey="lblSecondIDResource" Width="72px" Style="text-align: right"></asp:Label>&nbsp;<asp:DropDownList ID="ddlSecondID" runat="server"
                            Width="132px">
                        </asp:DropDownList>&nbsp;&nbsp;
                        <!-- 状态 -->
                        <asp:Label ID="lblIsDel" runat="server" Text="状态:" meta:resourcekey="lblDeptResource" Width="32px"></asp:Label>
                        <asp:DropDownList ID="ddlIsDel" runat="server" meta:resourcekey="ddlIsDelResource">
                            <asp:ListItem Value="-1">全部</asp:ListItem>
                            <asp:ListItem Value="0">未删除</asp:ListItem>
                            <asp:ListItem Value="1">已删除</asp:ListItem>
                        </asp:DropDownList>
                    </div>
                    <div>
                        &nbsp;&nbsp;
                        <!-- 页面名称   -->
                        <asp:Label ID="lblName" runat="server" Text="页面名称:" meta:resourcekey="lblNameResource" Width="56px"></asp:Label>
                        <asp:TextBox ID="txtName" runat="server"></asp:TextBox>&nbsp;&nbsp;
                        <!-- 源文件名称 -->
                        <asp:Label ID="lblFilePath" runat="server" Text="源文件名称:" meta:resourcekey="lblFilePathResource" Width="72px" Style="text-align: right"></asp:Label>
                        <asp:TextBox ID="txtFilePath" runat="server"></asp:TextBox>&nbsp;&nbsp;
                        <asp:Label ID="Label1" runat="server" meta:resourcekey="lblDeptResource" Text=" " Width="34px"></asp:Label>&nbsp;
                        <!-- 查询按钮 -->
                        <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="查询" meta:resourcekey="btnSearchResource" CssClass="button" /></div>
                    </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" CausesValidation="False"><img src="images/icon/key_add.gif" alt="read/write property"/> 添加</asp:LinkButton>
　
<asp:LinkButton ID="btnEdit" runat="server" ForeColor="#4B6888" meta:resourcekey="btnEditResource2" OnClick="btnEdit_Click" OnClientClick="return CheckEdit()" CausesValidation="False"><img src="images/icon/key_edit.gif" alt="read/write property" /> 编辑</asp:LinkButton>
　
<asp:LinkButton ID="btnDelStatus" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClick="btnDelStatus_Click" OnClientClick="return CheckDel()" Enabled="False"><img src="images/icon/key_delete.gif" alt="read/write property"/> 删除</asp:LinkButton>
　
<asp:LinkButton ID="btnDel" runat="server" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClick="btnDel_Click" OnClientClick="return CheckDel()" Enabled="False"><img src="images/icon/key_cdelete.gif" alt="read/write property"/> 彻底删除</asp:LinkButton></div>
                <!-- 明细数据 -->
                <div class="listborder">
                    <cc1:V5ShopGridView ID="GridViewShow" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CssClass="datalist" PageSize="12" HeaderStyle-ForeColor="#000000">
                        <PagerSettings Mode="NumericFirstLast" />
                        <Columns>
                            <asp:TemplateField meta:resourcekey="DetilData" ItemStyle-Width="5%">
                                <itemtemplate>
                                <input runat="server" value='<%# Eval("ID") %>' id="CheckBoxID" type="checkbox" 
                                    onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" mouse="out" class="checkbox"/>
                                </itemtemplate>
                                <itemstyle horizontalalign="Center" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="ID" HeaderText="ID" ItemStyle-Width="5%" />
                            <asp:BoundField HeaderText="一级目录" DataField="FirstID" SortExpression="FirstID" ItemStyle-Width="6%" />
                            <asp:BoundField HeaderText="二级目录" DataField="SecondID" SortExpression="SecondID" ItemStyle-Width="6%" />
                            <asp:BoundField HeaderText="三级目录" DataField="ThirdID" ItemStyle-Width="6%" />
                            <asp:BoundField HeaderText="页面类别" DataField="CategoryName" ItemStyle-Width="6%" />
                            <asp:BoundField HeaderText="页面图标" DataField="Ico" ItemStyle-Width="6%" />
                            <asp:BoundField HeaderText="页面名称" DataField="Name" SortExpression="Name" ItemStyle-Width="10%" />
                            <asp:BoundField HeaderText="排序号" DataField="OrderID" SortExpression="OrderID" ItemStyle-Width="5%" />
                            <asp:BoundField HeaderText="描述" DataField="Description" ItemStyle-Width="20%" />
                            <asp:BoundField HeaderText="文件名称" DataField="FilePath" SortExpression="FilePath" ItemStyle-Width="15%" />
                            <asp:TemplateField meta:resourcekey="DetilData" HeaderText="状态" ItemStyle-Width="5%">
                                <itemtemplate>
                                    <asp:Label ID="lblDelState" runat="server" Text='<%# FormatDelState(DataBinder.Eval(Container, "DataItem(IsDel)","{0}")) %>'> id="lblDelState"></asp:Label>
                                </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 align="center" cellpadding="0" cellspacing="0" style="width: 450px">
                            <!-- 一级目录 -->
                            <tr>
                                <td align="right" style="width:20%; height: 30px">
                                    <asp:Label ID="lblFirstIDAdd" runat="server" Text="一级目录：" Width="88px">
                                    </asp:Label>
                                </td>
                                <td align="left" style="; height: 30px;">
                                    <asp:DropDownList ID="ddlFirstIDAdd" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlFirstIDAdd_SelectedIndexChanged" Width="205px" />
                                </td>
                            </tr>
                            <!-- 二级目录 -->
                            <tr runat="server" id="trSecondID" visible="false">
                                <td align="right" valign="middle" style="height: 30px">
                                    <asp:Label ID="lblSecondIDAdd" runat="server" Text="二级目录：" Width="88px">
                                    </asp:Label></td>
                                <td align="left" style="; height:30px">
                                    <asp:DropDownList ID="ddlSecondIDAdd" runat="server" Width="205px">
                                    </asp:DropDownList>
                                    <asp:TextBox ID="txtThirdID" runat="server" Visible="False" Width="1px">0</asp:TextBox></td>
                            </tr>
                            <!-- 页面图标 -->
                            <tr>
                                <td align="right" style="height: 30px">
                                    <asp:Label ID="lblCategoryCode" runat="server" Text="页面类别：" Width="88px" /></td>
                                <td align="left" style="; height: 30px">
                                    <asp:DropDownList ID="ddlCategoryCode" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                              <td align="right" style="height: 30px">
                                    <asp:Label ID="lblIcoAdd" runat="server" Text="页面图标：" Width="88px">
                                    </asp:Label></td>
                                <td align="left" style=";height: 30px;" id="imgIcoView">
                                    <asp:TextBox ID="txtIcoAdd" runat="server" Width="200px">
                                    </asp:TextBox>
                                    <input type="button" value="选择图标" onclick="OpenDialog('txtIcoAdd')" class="button" id="btnSelectPicture" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" style="height: 30px">
                                    <asp:Label ID="lblNameAdd" runat="server" Text="页面名称：" Width="88px" />
                                </td>
                                <td align="left" style="; height:30px">
                                    <asp:TextBox ID="txtNameAdd" runat="server" Width="200px" MaxLength="50"></asp:TextBox>
                                    <span class="NeedMsg">*</span>
                                    <asp:CustomValidator ID="cvNameAdd" runat="server" ControlToValidate="txtNameAdd" Display="Dynamic" ErrorMessage="不能为空" OnServerValidate="ValidateTextBox" ValidateEmptyText="True">
                                    </asp:CustomValidator>
                                </td>
                            </tr>
                            <!-- 描述 -->
                            <tr>
                                <td align="right" style="height: 30px">
                                    <asp:Label ID="lblDescriptionAdd" runat="server" Text="描述：" Width="88px">
                                    </asp:Label>
                                </td>
                                <td align="left" style="; height: 30px;">
                                    <asp:TextBox ID="txtDescriptionAdd" runat="server" Width="200px" MaxLength="250"></asp:TextBox>
                                </td>
                            </tr>
                            <!-- 源文件名称 -->
                            <tr>
                                <td align="right" style="height: 30px">
                                    <asp:Label ID="lblFilePathAdd" runat="server" Text="源文件名称：" Width="88px">
                                    </asp:Label>
                                </td>
                                <td align="left" style="; height:30px">
                                    <asp:TextBox ID="txtFilePathAdd" runat="server" Width="200px" MaxLength="250"></asp:TextBox>
                                </td>
                            </tr>
                            <!-- 确定/更新/重置 -->
                            <tr>
                                <td align="right" valign="middle" style="height: 30px">
                                    排序号：</td>
                                <td align="left" style="height: 30px; ">
                                    <cc1:NumberBox ID="txtOrderIDAdd" runat="server" IsInt="True" Width="80px" />
                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="2" style="height:36px">
                                    <asp:Button ID="btnAddSubmit" runat="server" meta:resourcekey="btnAddResource1" OnClick="btnAddSubmit_Click" Text="确定" CssClass="button" />&nbsp;
                                    <asp:Button ID="btnEditSubmit" runat="server" meta:resourcekey="btnEditResource1" OnClick="btnEditSubmit_Click" Text="更新" Visible="False" CssClass="button" />&nbsp;
                                    <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>