<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="booklistmgr.aspx.cs" Inherits="Book.Admin.booklistmgr" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
   <div id=sm>
预定列表
</div>


 <asp:GridView ID="GridView1" runat="server" PageSize="20" DataSourceID="SqlDataSource1" 
        AutoGenerateColumns="False" DataKeyNames="id" AllowPaging="True"  Width="900px">
        <Columns>
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
            <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" 
                ReadOnly="True" SortExpression="id" />
            <asp:BoundField DataField="username" HeaderText="预订人" 
                SortExpression="username" />
            <asp:BoundField DataField="createdate" HeaderText="建立时期" 
                SortExpression="createdate" />
            <asp:BoundField DataField="begintime" HeaderText="开始时间" 
                SortExpression="begintime" />
            <asp:BoundField DataField="endtime" HeaderText="结束时间" 
                SortExpression="endtime" />
            <asp:BoundField DataField="contactname" HeaderText="联系人" 
                SortExpression="contactname" />
            <asp:BoundField DataField="contactdept" HeaderText="联系人部门" 
                SortExpression="contactdept" />
            <asp:BoundField DataField="contacttel" HeaderText="联系人电话" 
                SortExpression="contacttel" />
            <asp:BoundField DataField="contactemail" HeaderText="联系人邮件" 
                SortExpression="contactemail" />
            <asp:BoundField DataField="numbers" HeaderText="会议人数" 
                SortExpression="numbers" />
            <asp:BoundField DataField="intro" HeaderText="简介" SortExpression="intro" />
            <asp:BoundField DataField="roomname" HeaderText="会议室名称" 
                SortExpression="roomname" />
            <asp:BoundField DataField="pcname" HeaderText="PC名称" 
                SortExpression="pcname" />
            <asp:BoundField DataField="projectorname" HeaderText="投影仪名称" 
                SortExpression="projectorname" />
            <asp:BoundField DataField="specialrequire" HeaderText="特别需求" 
                SortExpression="specialrequire" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1"
    
    ConnectionString='<%$ ConnectionStrings:connectionstring %>'
     runat="server" DeleteCommand="DELETE FROM [book_booklist] WHERE [id] = @id" 
        InsertCommand="INSERT INTO [book_booklist] ([username], [createdate], [begintime], [endtime], [contactname], [contactdept], [contacttel], [contactemail], [numbers], [intro], [roomname], [pcname], [projectorname], [specialrequire]) VALUES (@username, @createdate, @begintime, @endtime, @contactname, @contactdept, @contacttel, @contactemail, @numbers, @intro, @roomname, @pcname, @projectorname, @specialrequire)" 
        ProviderName="System.Data.SqlClient" 
        SelectCommand="SELECT [id], [username], [createdate], [begintime], [endtime], [contactname], [contactdept], [contacttel], [contactemail], [numbers], [intro], [roomname], [pcname], [projectorname], [specialrequire] FROM [book_booklist] order by id desc " 
        UpdateCommand="UPDATE [book_booklist] SET [username] = @username, [createdate] = @createdate, [begintime] = @begintime, [endtime] = @endtime, [contactname] = @contactname, [contactdept] = @contactdept, [contacttel] = @contacttel, [contactemail] = @contactemail, [numbers] = @numbers, [intro] = @intro, [roomname] = @roomname, [pcname] = @pcname, [projectorname] = @projectorname, [specialrequire] = @specialrequire WHERE [id] = @id">
        <DeleteParameters>
            <asp:Parameter Name="id" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="username" Type="String" />
            <asp:Parameter Name="createdate" Type="DateTime" />
            <asp:Parameter Name="begintime" Type="DateTime" />
            <asp:Parameter Name="endtime" Type="DateTime" />
            <asp:Parameter Name="contactname" Type="String" />
            <asp:Parameter Name="contactdept" Type="String" />
            <asp:Parameter Name="contacttel" Type="String" />
            <asp:Parameter Name="contactemail" Type="String" />
            <asp:Parameter Name="numbers" Type="String" />
            <asp:Parameter Name="intro" Type="String" />
            <asp:Parameter Name="roomname" Type="String" />
            <asp:Parameter Name="pcname" Type="String" />
            <asp:Parameter Name="projectorname" Type="String" />
            <asp:Parameter Name="specialrequire" Type="String"  DefaultValue=""  ConvertEmptyStringToNull="false"  />
            <asp:Parameter Name="id" Type="Int32" />
        </UpdateParameters>
     
    </asp:SqlDataSource>
</asp:Content>
