<%@ Page Title="商铺导航管理" Language="C#" MasterPageFile="~/Others/AdminMasterPage.Master" AutoEventWireup="true" CodeBehind="ShopNavigationManage.aspx.cs" Inherits="Web.Admin.Contents.ShopNavigationManage" %>
 <%@ Register Assembly="BX.Common" Namespace="Common" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="AdminContentHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AdminContentCenter" runat="server">
       <form id="Form1" runat="server">
        <asp:ObjectDataSource ID="ObjectDataSource" runat="server" EnablePaging="False"
            SelectMethod="NavigationList" TypeName="Logic.Shop"  DeleteMethod="DeleteNavigation">
            <SelectParameters>
                <asp:QueryStringParameter DefaultValue="0" Name="UserID" QueryStringField="UserID" Type="Int32" />
            </SelectParameters>
            <DeleteParameters>
                <asp:Parameter DefaultValue="0" Name="ID" Type="Int32" />
            </DeleteParameters>
        </asp:ObjectDataSource>
        <div class="DivRightCenter">
            <div class="listdiv">
                <div class="grid-title">
                    <div class="grid-title-text">
                        <h4>
                            <span>商铺导航管理</span>
                        </h4>
                    </div>
                    <div class="grid-title-menu"></div>
                </div>
                <div class="grid-list">
                    <cc1:ExtendedGridView ID="ExtendedGridViewList" runat="server" AutoGenerateColumns="False" CheckBox="False" CssClass="grid" DataSourceID="ObjectDataSource" DataKeyNames="ID" ItemName="字段管理">
                        <Columns>
                            <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="IndustryID">
                                <ItemStyle Width="50px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Name" HeaderText="频道名称">
                                <ItemStyle Width="100px" Wrap="False" HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Directory" HeaderText="目录">
                                <ItemStyle Width="100px" Wrap="False" HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Link" HeaderText="链接地址">
                                <ItemStyle Width="100px" Wrap="False" HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="新窗口">
                                <ItemTemplate>
                                    <%#Eval("Target").ToString().Equals("1")?"是":"否" %>
                                </ItemTemplate>
                            </asp:TemplateField>
                           <asp:BoundField DataField="Sequence" HeaderText="顺序">
                                <ItemStyle Width="50px" Wrap="False" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="操作">
                                <ItemStyle Width="100px" Wrap="False" />
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Delete" OnClientClick='javascript:return confirm("确定删除？")' Text="删除" CausesValidation="false"></asp:LinkButton>&nbsp;
                                    <a href="ShopNavigationEdit.aspx?cmd=modify&id=<%#Eval("ID") %>&UserID=<%#Eval("UserID") %>">修改</a>&nbsp;
                                    <a href="ShopArticleManage.aspx?UserID=<%#Eval("UserID")%>&CategoryID=<%#Eval("ID")%>">内容管理</a>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </cc1:ExtendedGridView>
                </div>
            </div>
            <br />
            <div class="FormButtonArea">
                <asp:Button ID="btnAdd" runat="server" Text="添加字段" OnClientClick="AddNew();return false;" />&nbsp;&nbsp;
                        &nbsp;&nbsp;             
                   <script type="text/javascript">
                       function AddNew() {
                           location.href="ShopNavigationEdit.aspx?UserID=<%=Request.QueryString["UserID"]%>";
                       }
                   </script>
            </div>
        </div>
    </form>
</asp:Content>
