<%@ Page Title="留言管理" Language="C#" MasterPageFile="~/Masters/Sys.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="yueyaCMS.Admin.Message.Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<ul class="breadcrumb">
<li><i class="icon-tags"></i> 您当前的位置：<a href="/Admin/Site/Default.aspx">系统首页</a></li>
<li><span class="divider">/</span> 留言管理</li>
</ul>


    <form id="form1" runat="server">
        
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1" GridLines="None"  CssClass="table table-bordered table-hover" CellPadding="0" HorizontalAlign="Right" AllowSorting="True" PageSize="20" >
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="编号" InsertVisible="False" ReadOnly="True" SortExpression="ID" />
                <asp:BoundField DataField="CreateDate" HeaderText="留言时间" SortExpression="CreateDate" />
                <asp:BoundField DataField="Name" HeaderText="姓名" SortExpression="Name" />
                <asp:BoundField DataField="Mobile" HeaderText="电话" SortExpression="Mobile" />
                <asp:BoundField DataField="Message" HeaderText="内容" SortExpression="Message" />
                <asp:CommandField HeaderText="操作" ShowDeleteButton="True">
                <ControlStyle CssClass="btn btn-mini" />
                </asp:CommandField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:yueyaCMS_Insert %>" DeleteCommand="DELETE FROM [yy_Message] WHERE [ID] = @ID" InsertCommand="INSERT INTO [yy_Message] ([Name], [Mobile], [Message], [CreateDate]) VALUES (@Name, @Mobile, @Message, @CreateDate)" SelectCommand="SELECT * FROM [yy_Message] ORDER BY [ID] DESC" UpdateCommand="UPDATE [yy_Message] SET [Name] = @Name, [Mobile] = @Mobile, [Message] = @Message, [CreateDate] = @CreateDate WHERE [ID] = @ID">
            <DeleteParameters>
                <asp:Parameter Name="ID" Type="Int64" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="Name" Type="String" />
                <asp:Parameter Name="Mobile" Type="String" />
                <asp:Parameter Name="Message" Type="String" />
                <asp:Parameter Name="CreateDate" Type="DateTime" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="Name" Type="String" />
                <asp:Parameter Name="Mobile" Type="String" />
                <asp:Parameter Name="Message" Type="String" />
                <asp:Parameter Name="CreateDate" Type="DateTime" />
                <asp:Parameter Name="ID" Type="Int64" />
            </UpdateParameters>
        </asp:SqlDataSource>
</form>
</asp:Content>
