<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/Sys.Master" AutoEventWireup="true" CodeBehind="SinglePageList.aspx.cs" Inherits="yueyaCMS.Admin.Page.SinglePageList" %>
<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> <span>单页管理</span></li>
</ul>

    <form id="form1" runat="server">
        <div style="margin-bottom:10px">
        <div class="input-prepend input-append">
            <a href="SinglePageList.aspx" class="btn btn-warning">查看全部</a>
            <asp:TextBox ID="TextBox1" runat="server" placeholder="请输入页面名称" />
            <asp:Button ID="Button1" runat="server" CssClass="btn btn-success" Text="提交" OnClick="Button1_Click" />
        </div>
        </div>
    
        <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="PageName" HeaderText="页面名称" SortExpression="PageName" />
                <asp:BoundField DataField="CreateDate" HeaderText="创建时间" SortExpression="CreateDate" />
                <asp:TemplateField HeaderText="操作" ShowHeader="False" HeaderStyle-Width="150px">
                    <EditItemTemplate>
                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update" Text="更新"></asp:LinkButton>
                        &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel" Text="取消"></asp:LinkButton>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Edit" Text="编辑"></asp:LinkButton>
                        &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Delete" Text="删除"></asp:LinkButton>
                    </ItemTemplate>
                    <ControlStyle CssClass="btn btn-mini" />
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:yueyaCMS_Insert %>" DeleteCommand="DELETE FROM [yy_SinglePage] WHERE [ID] = @ID" InsertCommand="INSERT INTO [yy_SinglePage] ([PageName], [CreateDate]) VALUES (@PageName, @CreateDate)" SelectCommand="SELECT [ID], [PageName], [CreateDate] FROM [yy_SinglePage] ORDER BY [ID] DESC" UpdateCommand="UPDATE [yy_SinglePage] SET [PageName] = @PageName, [CreateDate] = @CreateDate WHERE [ID] = @ID">
            <DeleteParameters>
                <asp:Parameter Name="ID" Type="Int64" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="PageName" Type="String" />
                <asp:Parameter Name="CreateDate" Type="DateTime" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="PageName" Type="String" />
                <asp:Parameter Name="CreateDate" Type="DateTime" />
                <asp:Parameter Name="ID" Type="Int64" />
            </UpdateParameters>
        </asp:SqlDataSource>
</form>
</asp:Content>
