<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="Admin_navegate_link, WebApp_deploy" title="导航栏管理" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <asp:GridView ID="gv_navegate" runat="server" AutoGenerateColumns="False" OnRowCancelingEdit="gv_navegate_RowCancelingEdit"
            CssClass="adminlist" OnRowEditing="gv_navegate_RowEditing" OnRowUpdating="gv_navegate_RowUpdating"
            CellPadding="4" GridLines="None" EmptyDataText="没有导航，请添加…" OnRowDeleting="gv_navegate_RowDeleting">
            <Columns>
                <asp:TemplateField ItemStyle-Width="100px">
                    <HeaderTemplate>
                        链接文字</HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Labeltitle" runat="server" Style="margin-left: 10px;" Width="100px"
                            Text='<%#Eval("Title") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txttitle" runat="server" Style="margin-left: 10px;" Width="100px"
                            Text='<%#Eval("Title") %>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        链接地址</HeaderTemplate>
                    <ItemTemplate>
                        <asp:HyperLink ID="hlinkLink" runat="server" Style="margin-left: 10px;" Width="300px"
                            NavigateUrl='<%#Eval("Link") %>' Target="_blank"><%#Eval("Link")%></asp:HyperLink>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtLink" runat="server" Text='<%#Eval("Link") %>' Style="margin-left: 10px;"
                            Width="300px"></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        页面显示位置</HeaderTemplate>
                    <ItemTemplate>
                        <center>
                            <asp:Label ID="LabelPosition" runat="server" Text='<%#Eval("Position") %>' Style="margin-left: 10px;"
                                Width="100px"></asp:Label></center>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtPosition" runat="server" Text='<%#Eval("Position") %>' Style="margin-left: 10px;"
                            Width="100px"></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        相对排列顺序</HeaderTemplate>
                    <ItemTemplate>
                        <center>
                            <asp:Label ID="LabelOrderNumber" runat="server" Text='<%#Eval("OrderNumber") %>'
                                Style="margin-left: 10px;" Width="30px"></asp:Label></center>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtOrderNumber" runat="server" Text='<%#Eval("OrderNumber") %>'
                            Style="margin-left: 10px;" Width="30px"></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        &nbsp;&nbsp;编辑&nbsp;&nbsp;</HeaderTemplate>
                    <ItemTemplate>
                        <center>
                            <asp:Button ID="edit" runat="server" Text="编辑" CommandName="edit" /></center>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:Button ID="update" runat="server" Text="更新" CommandName="Update" />
                        <asp:Button ID="cancel" runat="server" Text="取消" CommandName="Cancel" />
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        &nbsp;删除&nbsp;</HeaderTemplate>
                    <ItemTemplate>
                        <center>
                            <asp:Button ID="delete" runat="server" Text="删除" CommandName="delete" OnClientClick="return confirm('确认要删除吗？\n删除不可恢复');" /></center>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <center>
                            <asp:Button ID="delete" runat="server" Text="删除" CommandName="delete" /></center>
                    </EditItemTemplate>
                </asp:TemplateField>
            </Columns>
            <%--<FooterStyle BackColor="LightGray" Font-Bold="True" ForeColor="White" />
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333"  HorizontalAlign="Left" />
                <EditRowStyle BackColor="#999999" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <HeaderStyle BackColor="SkyBlue" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />--%>
        </asp:GridView>
        <br />


            <table class="adminlist" cellspacing="0" cellpadding="4" border="0" 
                style="border-collapse: collapse;">
                <tr>
                    <th >链接文字</th>
                    <th >链接地址</th>
                    <th >页面显示位置</th>
                    <th >相对排列顺序</th>
                    <th >添加</th>
                </tr>
                <tr>
                    <td style="width: 10%; margin-left: 10px;">
                        <asp:TextBox ID="TextBoxTitle" runat="server" Style="width: 100px;"></asp:TextBox>
                    </td>
                    <td style="width:40%; "><asp:TextBox ID="TextBoxLink" runat="server" Style="width: 300px;"></asp:TextBox>
                    </td>
                    <td style="width: 10%;">
                        <center><asp:TextBox ID="TextBoxPosition" runat="server"></asp:TextBox>
                        </center>
                    </td>
                    <td style="width: 10%; "><asp:TextBox ID="TextBoxOrderNumber" runat="server"></asp:TextBox>
                    </td>
                    <td style="width:30%"><asp:Button ID="btn_addLink" runat="server" Text="添加" OnClick="btn_addLink_Click" />
                    </td>
                </tr>
            </table>
        <br />
        <br />
    </div>
</asp:Content>
