<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AreaList.aspx.cs" Inherits="admin_Area_AreaList" %>

<%@ Register Src="../../Control/PageNo.ascx" TagName="PageNo" 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 runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>添加关键词</title>
<link rel="stylesheet" href="../skin/style.css" type="text/css" />
<script type="text/javascript" src="../../js/jquery.js"></script>
</head>
<body>
    <form id="form1" runat="server">
	 <div class="itemtitle">
            <h3>
                操作提示</h3>
        </div>
	<div class="itemtitle_tect">
            <ul>
                <li>通过地区分类管理，您可以对网站地区分类进行排序、编辑、删除，添加及生成地区分类JS等操作;</li>
				<li>地区分类可以添加至三级分类</li>
            </ul>
        </div>
        <div class="clr">
        </div>
        <asp:Panel ID="pnlArea" runat="server" Visible="False">
            <div class="itemtitle">
                <h3>
                    添加地区分类</h3>
            </div>
            <div class="itemtitle_tect">
                <p>
                    行业地区名称：
                    <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                    排序：
                    <asp:TextBox ID="txtSequence" runat="server" onblur="IsNum(this);"></asp:TextBox>
                    <asp:Button ID="btnInsert" runat="server" OnClick="btnInsert_Click" Text="添加" />
                    <asp:Button ID="btnReturn" runat="server" OnClick="btnReturn_Click" Text="取消" />
                    <asp:Label ID="lblError" runat="server" ForeColor="red"></asp:Label>
                </p>
            </div>
            <div class="clr">
            </div>
        </asp:Panel>
		<div class="partition"> 
            <div class="Option">
                <span><strong>快捷操作</strong></span>
                <span><asp:LinkButton ID="Button1" runat="server" OnClick="ButJS_Click" Text="生成分类JS">生成分类JS</asp:LinkButton></span>
				<span><asp:LinkButton ID="btnAreaAdd" runat="server" OnClick="btnAreaAdd_Click">添加地区</asp:LinkButton></span>
            </div>
			</div>
        <div class="talbe_border">
            <asp:GridView ID="grdArea" runat="server" AutoGenerateColumns="False" CellPadding="0" GridLines="None" AllowPaging="False" OnRowCancelingEdit="grdArea_RowCancelingEdit" OnRowEditing="grdArea_RowEditing" OnRowUpdating="grdArea_RowUpdating" DataKeyNames="ID" OnRowDeleting="grdArea_RowDeleting" CssClass="talbe_list" OnRowDataBound="grdArea_RowDataBound">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="th20 tou" />
                        <ItemStyle CssClass="nolet" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="排序">
                        <ItemTemplate>
                            <asp:TextBox ID="txtSequence" runat="server" Text='<%# Eval("Sequence") %>' onblur="IsNum(this);"
                                CssClass="i_corp"></asp:TextBox>
                            <asp:Label ID="Lb_id" runat="server" Text='<%#Eval("ID")%>' Visible="false"></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle CssClass="th30" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="地区名称">
                        <ItemTemplate>
                            <a href='AreaList.aspx?ParentID=<%# Eval("ID") %>' style="text-decoration: none">
                                <%# Eval("Name") %>
                            </a>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox ID="txtName" runat="server" Text='<%# Eval("Name") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemStyle CssClass="left2" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="地区目录">
                        <ItemTemplate>
                            <%# Eval("Grade") %>
                            级目录
                        </ItemTemplate>
						<ItemStyle CssClass="th80" />
                    </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False" HeaderText="操作选项">
                        <EditItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update"
                                Text="更新"></asp:LinkButton>
                            <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
                                Text="取消"></asp:LinkButton>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Edit"
                                Text="编辑"></asp:LinkButton>
                            |
                            <asp:LinkButton ID="lbtnUpdate" Text="删除" CommandName="delete" OnClientClick="return confirm('您确认删除该记录吗?');"
                                runat="server"></asp:LinkButton>
                        </ItemTemplate>
                        <HeaderStyle CssClass="th80" />
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle CssClass="header" />
            </asp:GridView>
            <div class="Paging">
                <p>
                    <asp:LinkButton ID="LinkButton1" runat="server" Text="排序" OnClick="LinkButton1_Click"></asp:LinkButton><asp:Label
                        ID="lblMessage" runat="server" Text="Label" Visible="False"></asp:Label>
                    <uc1:PageNo ID="PageNo1" runat="server" />
                </p>
                <input id="CheckBox2" name="CheckBox2" onclick="SelectAll();" type="checkbox" />全选
                <asp:Button ID="btnDelete" runat="server" Font-Size="9pt" OnClick="btnDelete_Click"
                    Text="批量删除" CssClass="i_button" />
            </div>
        </div>
    </form>
</body>
</html>
