<%@ Page Language="C#" MasterPageFile="~/AdminMasterPage.master" AutoEventWireup="true" CodeFile="UserManage.aspx.cs" Inherits="Admin_BlogManage" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    &nbsp;
    <table style="width: 578px; height: 350px">
        <tr>
            <td style="width: 82px; height: 20px">
            </td>
            <td style="width: 100px; height: 20px">
            </td>
        </tr>
        <tr>
            <td style="width: 82px; height: 26px">
                <asp:Label ID="Label2" runat="server" Text="审核博客" Width="66px"></asp:Label></td>
            <td style="width: 100px; height: 26px">
            </td>
        </tr>
        <tr>
            <td colspan="2" style="height: 2px">
                <hr />
            </td>
        </tr>
        <tr>
            <td style="width: 82px; height: 305px;">
            </td>
            <td style="width: 100px; height: 305px;" align="left">
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" CellPadding="4" DataSourceID="SqlDataSource1" ForeColor="#333333"
        GridLines="None" Height="10px" Width="405px" AutoGenerateColumns="False" DataKeyNames="bloger_name" OnRowUpdated="GridView1_RowUpdated" OnRowUpdating="GridView1_RowUpdating" PageSize="8">
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <Columns>
            <asp:BoundField DataField="bloger_name" HeaderText="博主账号" ReadOnly="True" SortExpression="bloger_name" />
            <asp:BoundField DataField="bloger_title" HeaderText="博客名" SortExpression="bloger_title" ReadOnly="True" />
            <asp:CheckBoxField DataField="bloger_enable" HeaderText="通过审核" SortExpression="bloger_enable" />
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
        </Columns>
        <SelectedRowStyle BackColor="#E2DED6" ForeColor="#333333" Font-Bold="True" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />       
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <EditRowStyle BackColor="#999999" />
    </asp:GridView>
            </td>
        </tr>
    </table>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DesertEagleConnectionString %>"
        OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [DE_bloger] WHERE ([bloger_enable] = @bloger_enable)" ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [DE_bloger] WHERE [bloger_name] = @original_bloger_name" InsertCommand="INSERT INTO [DE_bloger] ([bloger_name], [college_id], [bloger_title], [description], [pub_date], [click_count], [bloger_enable], [is_top], [is_forbid]) VALUES (@bloger_name, @college_id, @bloger_title, @description, @pub_date, @click_count, @bloger_enable, @is_top, @is_forbid)" UpdateCommand="UPDATE [DE_bloger] SET [bloger_enable] = @bloger_enable WHERE [bloger_name] = @original_bloger_name">
        <DeleteParameters>
            <asp:Parameter Name="original_bloger_name" Type="String" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="bloger_enable" Type="Boolean" />
            <asp:Parameter Name="original_bloger_name" Type="String" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="bloger_name" Type="String" />
            <asp:Parameter Name="college_id" Type="Int32" />
            <asp:Parameter Name="bloger_title" Type="String" />
            <asp:Parameter Name="description" Type="String" />
            <asp:Parameter Name="pub_date" Type="DateTime" />
            <asp:Parameter Name="click_count" Type="Int32" />
            <asp:Parameter Name="bloger_enable" Type="Boolean" />
            <asp:Parameter Name="is_top" Type="Boolean" />
            <asp:Parameter Name="is_forbid" Type="Boolean" />
        </InsertParameters>
        <SelectParameters>
            <asp:Parameter DefaultValue="False" Name="bloger_enable" Type="Boolean" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>

