<%@ Page Title="" Language="C#" MasterPageFile="~/Management/SiteManage.Master" AutoEventWireup="true"
    CodeBehind="ArticleList.aspx.cs" Inherits="Amr.SuperSiteGroup.Web.Management.ArticleList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="right" style="text-align: center; margin-top: 10px;">
        <div class="clear">
        </div>
        <table width="100%" border="0" cellspacing="1" cellpadding="1" class="edit">
            <tr>
                <td class="title_edit">
                    <h1 style="float: left">
                        文章列表</h1>
                </td>
            </tr>
            <tr>
                <td class="edit_main">
                <asp:Label ID="laSuccessInfo" runat="server" ForeColor="Green"></asp:Label>
                <br />
                <div><a href="Article.aspx" target="_blank">【添加新文章】</a><br />
                文章列表采用埋码形式在前台显示，格式为[*ArticleList(分类编号,列表模板编号,显示数量,内容模板编号)*]
                </div>
                    <div style="float:left">
                    文章分类：
                        <asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="ddlCategory_SelectedIndexChanged">
                        </asp:DropDownList>
                    </div>
                    <br />
                    <asp:GridView ID="gvList" runat="server" AutoGenerateColumns="False" GridLines="None"
                        CssClass="table_list" Width="100%" EnableModelValidation="True" 
                        AllowPaging="True" onpageindexchanging="gvList_PageIndexChanging" 
                        PageSize="40" onrowdatabound="gvList_RowDataBound">
                        <Columns>
                            <asp:TemplateField HeaderText="操作" ShowHeader="False">
                                <ItemTemplate>
                                    <asp:HyperLink ID="hlPreview" runat="server" Target="_blank" ToolTip="本预览将采用数据库中第一条内容模板，如果你想查看其它模板，请自行修改模板Id">【预览】</asp:HyperLink> &nbsp;
                                    <a href='Article.aspx?Id=<%# Eval("Id") %>' target="_blank">【编辑】</a> &nbsp;<asp:LinkButton
                                        ID="lbDelete" runat="server" CausesValidation="False" CommandArgument='<%# Bind("Id") %>'
                                        Text="【删除】" OnClick="lbDelete_Click" OnClientClick="if(confirm('确认删除记录?')){eval(this.attributes['href'].value)}else{return false}"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="Id" HeaderText="编号" SortExpression="Id" />
                            <asp:BoundField DataField="Title" HeaderText="标题" SortExpression="Title" />
                            <asp:BoundField DataField="CreatedOn" HeaderText="创建时间" SortExpression="CreatedOn" />
                            <asp:BoundField DataField="UpdatedOn" HeaderText="修改时间" SortExpression="UpdatedOn" />
                        </Columns>
                        <HeaderStyle CssClass="tr1" />
                        <RowStyle CssClass="tr_a" />
                        <AlternatingRowStyle CssClass="tr_b" />
                        <EmptyDataTemplate>
                            没有数据，请先添加！
                        </EmptyDataTemplate>
                        <FooterStyle CssClass="dg_header" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
    </div>
    <div class="clear" style="margin-top: 10px;">
    </div>
</asp:Content>
