<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NavigationAdmin.aspx.cs"
    Inherits="Oykx.admin.NavigationAdmin" %>

<!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>导航设置 -
        <%=Resources.zhouxiang.adminTitle %></title>
    <link href="css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td class="td_title">
                    导航设置
                </td>
            </tr>
            <tr>
                <td class="tableTd">
                    <asp:GridView ID="GridView_Navigation" runat="server" Width="100%" 
                        AutoGenerateColumns="False" DataSourceID="ObjectData_Navigation" 
                        onrowcommand="GridView_Navigation_RowCommand" 
                        onrowdatabound="GridView_Navigation_RowDataBound" >
                        <Columns>
                            <asp:TemplateField HeaderText="导航ID" SortExpression="NID">
                                <ItemTemplate>
                                    <asp:Label ID="Label5" runat="server" Text='<%# Bind("NID") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="导航名称" SortExpression="Nname">
                                <ItemTemplate>
                                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("Nname") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="指向地址" SortExpression="Nurl">
                                <ItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("Nurl") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="排序ID" SortExpression="Npid">
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("Npid") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="是否显示" SortExpression="Visble">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# str(Eval("Visble").ToString()) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="编辑" ShowHeader="False">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="false" 
                                        CommandName="ed" ImageUrl="~/admin/image/edit.png" Text="编辑" CommandArgument='<%# Bind("NID") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="删除" ShowHeader="False">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ImageButton2" runat="server" CausesValidation="false" 
                                        CommandName="del" ImageUrl="~/admin/image/del.png" Text="删除" CommandArgument='<%# Bind("NID") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </td>
            </tr>
        </table>
    </div>
    <asp:Panel ID="Panel" runat="server" Visible="false">
     <table cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td class="td_title">
                    编辑导航
                </td>
            </tr>
            <tr>
                <td class="tableTd">
                 
                    当前ID:<asp:Label ID="lbldaohangid" runat="server" 
                        style="color: #CC0000; font-weight: 700"></asp:Label>
                    &nbsp; 导航名:
                    <asp:TextBox ID="txtname" runat="server"></asp:TextBox>
                    &nbsp; 导航地址:<asp:TextBox ID="txturl" runat="server"></asp:TextBox>
                    &nbsp; 排序ID:<asp:TextBox ID="txtid" runat="server"></asp:TextBox>
                    &nbsp;&nbsp; 是否显示:<asp:RadioButton ID="Radiokai" runat="server" Checked="True" 
                        GroupName="xianshi" Text="是" />
                    &nbsp;<asp:RadioButton ID="Radioguan" runat="server" GroupName="xianshi" Text="否" />
                    &nbsp;&nbsp;&nbsp;
                    <asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="提交" />
                 
                    </td>
            </tr>
        </table>
    </asp:Panel>
       <div>
     <table cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td class="td_title">
                    添加导航
                </td>
            </tr>
            <tr>
                <td class="tableTd">
                    导航名:<asp:TextBox ID="txtNavName" runat="server" Width="100px"></asp:TextBox>
&nbsp; 导航地址:<asp:TextBox ID="txtNavUrl" runat="server" Width="100px"></asp:TextBox>
&nbsp; 排序ID:<asp:TextBox ID="txtNavID" runat="server" Width="50px"></asp:TextBox>
&nbsp;
                    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="提交" />
                    </td>
            </tr>
        </table>
    </div>
    <div>
     <table cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td class="td_title">
                    友情提示
                </td>
            </tr>
            <tr>
                <td class="tableTd">
                    &nbsp;
                    1.可以自定义添加页面之后然后来添加该页面导航.</td>
            </tr>
            <tr>
                <td class="tableTd">
                    &nbsp;
                    2.导航可以进行排序,排序ID越靠前的,首页显示越靠前.</td>
            </tr>
            <tr>
                <td class="tableTd">
                    &nbsp;
                    3.编辑导航时,请不要填错链接地址 否则将会报错 并且打不开该指向.</td>
            </tr>
        </table>
    </div>
    <asp:ObjectDataSource ID="ObjectData_Navigation" runat="server" 
        SelectMethod="Navigationselect" TypeName="OykxBLL.NavigationManager">
    </asp:ObjectDataSource>
    </form>
</body>
</html>
