<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="newsManager.aspx.cs" Inherits="LoveWeb.Admin.newsManager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div>
    
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="odsNews">
            <Columns>
                <asp:BoundField DataField="Newsid" HeaderText="新闻编号" SortExpression="Newsid" />
                <asp:BoundField DataField="Title" HeaderText="新闻标题" SortExpression="Title" />
                <asp:BoundField DataField="News_contents" HeaderText="新闻内容" 
                    SortExpression="News_contents" />
                <asp:BoundField DataField="News_author" HeaderText="作者" 
                    SortExpression="News_author" />
                <asp:BoundField DataField="Newstime" HeaderText="发布时间" 
                    SortExpression="Newstime" />
                <asp:BoundField DataField="NewsCote" HeaderText="新闻类别" 
                    SortExpression="NewsCote" />
                <asp:HyperLinkField HeaderText="查看" NavigateUrl="~/Admin/NewsView.aspx?id={0}" 
                    Text="详细" DataNavigateUrlFields="newsid" 
                    DataNavigateUrlFormatString="~/Admin/NewsView.aspx?id={0}" />
                <asp:CommandField HeaderText="删除新闻" ShowDeleteButton="True" />
            </Columns>
        </asp:GridView>
        <asp:ObjectDataSource ID="odsNews" runat="server" SelectMethod="GetAllNews" 
            TypeName="LoveBLL.NewsManager" DataObjectTypeName="Models.News" 
            DeleteMethod="DelNews" InsertMethod="AddNews" UpdateMethod="UpdateNews"></asp:ObjectDataSource>
    
    </div>

</asp:Content>
