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

<!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" />
    <link href="js/skins/ZCMS/asyncbox.css" rel="stylesheet" type="text/css" />

    <script src="js/jQuery.v1.4.2.js" type="text/javascript"></script>

    <script src="js/AsyncBox.v1.4.js" type="text/javascript"></script>

    <script src="js/File.js" type="text/javascript"></script>

</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_Blog" runat="server" Width="100%" 
                        AutoGenerateColumns="False" DataSourceID="ObjectDataBlog" 
                        onrowdatabound="GridView_Blog_RowDataBound" 
                        onrowcommand="GridView_Blog_RowCommand" AllowPaging="True">
                        <Columns>
                            <asp:BoundField DataField="BID" HeaderText="日志ID" SortExpression="BID" />
                            <asp:TemplateField HeaderText="日志标题" SortExpression="BTitle">
                                <ItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("BTitle") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="BAuthor" HeaderText="日志作者" 
                                SortExpression="BAuthor" />
                            <asp:BoundField DataField="BTime" HeaderText="发表时间" SortExpression="BTime" />
                            <asp:TemplateField HeaderText="日志类型" SortExpression="TID">
                                <ItemTemplate>
                                    <asp:Label ID="lblTID" runat="server" Text='<%#  BlogTypeTID(Eval("TID").ToString()) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="是否推荐" SortExpression="DID">
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# BlogTypeDID(Eval("DID").ToString()) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="Tops" HeaderText="顶" SortExpression="Tops" />
                            <asp:BoundField DataField="Ons" HeaderText="踩" SortExpression="Ons" />
                            <asp:TemplateField HeaderText="查看评论" ShowHeader="False">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl='<%# Blogr(Eval("BID").ToString()) %>'>点击查看</asp:LinkButton>
                                </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("BID") %>'  />
                                </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("BID") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                   
                </td>
            </tr>
            <tr>
                <td class="tableTd">
                   
                    <asp:Button ID="Button1" runat="server" Text="类型管理" 
                        PostBackUrl="~/admin/BlogType.aspx" />
&nbsp;</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.点击编辑,可以进行日志内容编辑修改.</td>
            </tr>
            <tr>
                <td class="tableTd">
                    &nbsp; 3.点击删除,可以删除该日志,不过当删除该日志同时,会删除该日志的游客评论..</td>
            </tr>
        </table>
    </div>
    
    <asp:ObjectDataSource ID="ObjectDataBlog" runat="server" SelectMethod="get" 
        TypeName="OykxBLL.BlogManager">
    </asp:ObjectDataSource>
    
    </form>
</body>
</html>