<%@ page language="C#" autoeventwireup="true" inherits="admin_newslist, webpages" %>

<!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 runat="server">
    <title>无标题页</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Author"  content="webpages CMS" />
<link rel="stylesheet" href="master.css" type="text/css">
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" CellPadding="4" DataSourceID="listdate1" ForeColor="#333333"
            GridLines="None" DataMember="DefaultView" DataKeyNames="ID">
            <RowStyle BackColor="#EFF3FB" />
            <Columns>
                <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"
                    SortExpression="id" />
                <asp:TemplateField HeaderText="新闻标题" SortExpression="titlenew" >
                    <ItemTemplate>
                    <asp:Label ID="newtitle" runat="server" Text=''  Width="210" ><a href="/news/viewshow.aspx?id=<%# Eval("id") %> " target="_blank"><%#strvalue( Eval("titlenew").ToString(), 12) %> </a></asp:Label>
                        
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="分类ID" SortExpression="classid">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("classid") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                
                <asp:BoundField DataField="hot" HeaderText="点击" SortExpression="hot" />
                <asp:BoundField DataField="zuozhe" HeaderText="作者" SortExpression="zuozhe" >
                    <ControlStyle Width="100px" />
                    <HeaderStyle Width="100px" />
                    <ItemStyle Width="100px" />
                </asp:BoundField>
                <asp:CheckBoxField DataField="tuijian" HeaderText="推荐" SortExpression="tuijian" />
                <asp:CheckBoxField DataField="shenghe" HeaderText="审核" SortExpression="shenghe" />
                <asp:BoundField DataField="titlecolor" HeaderText="标题色" SortExpression="titlecolor" >
                    <ControlStyle Width="100px" />
                    <HeaderStyle Width="100px" />
                    <ItemStyle Width="100px" />
                </asp:BoundField>
                <asp:TemplateField ShowHeader="False">
                    <ItemTemplate>
                    <asp:Label ID="xgms" runat="server" Text='' ><a href="editnews.aspx?id=<%# Eval("id") %> " target="_blank">修改 </a></asp:Label>
                    </ItemTemplate>
                    <ControlStyle Width="40px" />
                    <ItemStyle Width="40px" />
                </asp:TemplateField>
                <asp:CommandField EditText="审核推荐" ShowEditButton="True" UpdateText="确认" >
                    <ControlStyle Width="40px" />
                    <HeaderStyle Width="100px" />
                    <ItemStyle Width="90px" />
                </asp:CommandField>
                <asp:CommandField ShowDeleteButton="True" >
                    <ControlStyle Width="40px" />
                    <ItemStyle Width="40px" />
                </asp:CommandField>
            </Columns>
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
        <asp:SqlDataSource ID="listdate1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" >
            <DeleteParameters>
                <asp:ControlParameter ControlID="GridView1" Name="id" PropertyName="SelectedValue" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:ControlParameter ControlID="GridView1" Name="hot" PropertyName="SelectedValue" />
                <asp:ControlParameter ControlID="GridView1" Name="id" PropertyName="SelectedValue" />
                <asp:ControlParameter ControlID="GridView1" Name="zuozhe" PropertyName="SelectedValue" />
                <asp:ControlParameter ControlID="GridView1" Name="tuijian" PropertyName="SelectedValue" />
                <asp:ControlParameter ControlID="GridView1" Name="shenghe" PropertyName="SelectedValue" />
                <asp:ControlParameter ControlID="GridView1" Name="titlecolor" PropertyName="SelectedValue" />
                <asp:ControlParameter ControlID="GridView1" Name="Nkey" PropertyName="SelectedValue" />
                <asp:ControlParameter ControlID="GridView1" Name="laiyuan" PropertyName="SelectedValue" />
            </UpdateParameters>
        </asp:SqlDataSource>
    
    </div>
    </form>
</body>
</html>
