⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_insert.aspx

📁 功能齐全的图书管理系统
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Admin_insert.aspx.cs" Inherits="Admin_insert" %>

<!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>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table>
        <tr>
            <td>
                <asp:Image ID="image1" runat=server ImageUrl="~/3G.jpg" Width="960px" />
            </td>
        </tr>
        <tr>
            <td>
                <asp:LinkButton ID="LinkButton1" runat="server" Style="position: relative" OnClick="LinkButton1_Click">返回</asp:LinkButton></td>
        </tr>
        <tr bgcolor="#ffffcc">
            <td align=center><font size=8px color=blue>新书入库</font></td>
        </tr>
        <tr>
            <td align=center>
                <asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None"
                    Style="position: relative" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="book_id" DataSourceID="SqlDataSource1">
                    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                    <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                    <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                    <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:BoundField DataField="book_id" HeaderText="图书编号" ReadOnly="True" SortExpression="book_id" />
                        <asp:BoundField DataField="book_name" HeaderText="图书名字" SortExpression="book_name" />
                        <asp:BoundField DataField="book_author" HeaderText="图书作者" SortExpression="book_author" />
                        <asp:BoundField DataField="book_public" HeaderText="出版社" SortExpression="book_public" />
                        <asp:BoundField DataField="book_publictime" HeaderText="出版时间" SortExpression="book_publictime" />
                    </Columns>
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues"
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                    InsertCommand="INSERT INTO [book] ([book_id], [book_name], [book_author], [book_public], [book_publictime]) VALUES (@book_id, @book_name, @book_author, @book_public, @book_publictime)"
                    OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [book]">
                    <InsertParameters>
                        <asp:Parameter Name="book_id" Type="String" />
                        <asp:Parameter Name="book_name" Type="String" />
                        <asp:Parameter Name="book_author" Type="String" />
                        <asp:Parameter Name="book_public" Type="String" />
                        <asp:Parameter Name="book_publictime" Type="DateTime" />
                    </InsertParameters>
                </asp:SqlDataSource>
                <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Style="position: relative"
                    Width="125px" AllowPaging="True" AutoGenerateRows="False" CellPadding="4" DataKeyNames="book_id" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None">
                    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                    <CommandRowStyle BackColor="#FFFFC0" Font-Bold="True" />
                    <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                    <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                    <Fields>
                        <asp:BoundField DataField="book_id" HeaderText="图书编号" ReadOnly="True" SortExpression="book_id" />
                        <asp:BoundField DataField="book_name" HeaderText="图书名字" SortExpression="book_name" />
                        <asp:BoundField DataField="book_author" HeaderText="图书作者" SortExpression="book_author" />
                        <asp:BoundField DataField="book_public" HeaderText="出版社" SortExpression="book_public" />
                        <asp:BoundField DataField="book_publictime" HeaderText="出版时间" SortExpression="book_publictime" />
                        <asp:CommandField ShowInsertButton="True" CancelText="取消" InsertText="添加" NewText="添加图书" />
                    </Fields>
                    <FieldHeaderStyle BackColor="#FFFF99" Font-Bold="True" />
                    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:DetailsView>
            </td>
        </tr>
    </table>
    </div>
    </form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -