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

📄 default.aspx

📁 网上书店 含用户注册
💻 ASPX
字号:
<%@ Page Language="C#" MasterPageFile="~/book.master" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="login" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div style="text-align: center; background-color: #009900;">
        <table style="height: 238px; background-color: #009900;" width="100%">
            <tr>
                    <td colspan="3" rowspan="1" style="height: 14px; vertical-align: top; text-align: center;">
                   
                        <div style="text-align: center">
                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tr>
                                    <td align="center" style="width: 26%; height: 10px; text-align: left">
                                    </td>
                                    <td align="center" style="width: 10%; height: 10px; text-align: left">
                                    </td>
                                    <td align="center" style="width: 30%; height: 10px; text-align: center">
                                    </td>
                                    <td align="center" style="width: 100%; height: 10px; text-align: right">
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center" style="width: 26%; height: 10px; text-align: left;">
                    </td>
                                    <td align="center" style="width: 10%; height: 10px; text-align: left;">
                                        &nbsp;<span style="font-size: 8pt">当前时间:</span></td>
                                    <td align="center" style="width: 30%; height: 10px; text-align: center;">
                                        <asp:Label ID="Lbltime" runat="server" Text="Label"></asp:Label></td>
                                    <td align="center" style="width: 100%; height: 10px; text-align: right;">
                                        &nbsp;
                                        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/picture/login.gif"
                                            PostBackUrl="~/login.aspx" />&nbsp;<asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/picture/reg.gif" PostBackUrl="~/register.aspx" />&nbsp;
                                        <asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl="~/admin_login.aspx">管理员登录</asp:LinkButton></td>
                                </tr>
                            </table>
                        </div></td>
            
            </tr>
                <tr>
                    <td rowspan="2" style="width: 198px; height: 391px; vertical-align: top; text-align: right; background-color: #009900;">
                        <br />
                        <asp:TreeView ID="twtype" runat="server" OnSelectedNodeChanged="twtype_SelectedNodeChanged"
                            Style="vertical-align: middle; text-align: left" Width="134px" ShowLines="True">
                            <Nodes>
                                <asp:TreeNode Text="图书" Value="1">
                                    <asp:TreeNode Text="教育" Value="2">
                                        <asp:TreeNode Text="英语" Value="7"></asp:TreeNode>
                                        <asp:TreeNode Text="数学" Value="8"></asp:TreeNode>
                                        <asp:TreeNode Text="语文" Value="9"></asp:TreeNode>
                                        <asp:TreeNode Text="物理" Value="10"></asp:TreeNode>
                                        <asp:TreeNode Text="化学" Value="11"></asp:TreeNode>
                                        <asp:TreeNode Text="政治" Value="12"></asp:TreeNode>
                                    </asp:TreeNode>
                                    <asp:TreeNode Text="科技" Value="3">
                                        <asp:TreeNode Text="计算机" Value="13"></asp:TreeNode>
                                        <asp:TreeNode Text="天文" Value="14"></asp:TreeNode>
                                    </asp:TreeNode>
                                    <asp:TreeNode Text="文学" Value="4">
                                        <asp:TreeNode Text="散文" Value="15"></asp:TreeNode>
                                        <asp:TreeNode Text="小说" Value="16"></asp:TreeNode>
                                    </asp:TreeNode>
                                    <asp:TreeNode Text="考试资料" Value="5">
                                        <asp:TreeNode Text="考研资料" Value="17"></asp:TreeNode>
                                        <asp:TreeNode Text="英语四、六资料" Value="18"></asp:TreeNode> 
                                        <asp:TreeNode Text="计算机等级考试" Value="23"></asp:TreeNode>
                                    </asp:TreeNode>
                                    <asp:TreeNode Text="社会百科" Value="6">
                                        <asp:TreeNode Text="体育" Value="19"></asp:TreeNode>
                                        <asp:TreeNode Text="生物" Value="20"></asp:TreeNode>
                                        <asp:TreeNode Text="地理" Value="21"></asp:TreeNode>
                                        <asp:TreeNode Text="历史" Value="22"></asp:TreeNode>
                                    </asp:TreeNode>
                                </asp:TreeNode>
                            </Nodes>
                        </asp:TreeView>
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues"
                            ConnectionString="<%$ ConnectionStrings:sqlBookshopConnectionString %>" DeleteCommand="DELETE FROM [tblBook] WHERE [bookID] = @original_bookID AND [typeID] = @original_typeID AND [bookName] = @original_bookName AND [bookAuthor] = @original_bookAuthor AND [bookPrice] = @original_bookPrice AND [publisher] = @original_publisher AND [publishDate] = @original_publishDate AND [bookImage] = @original_bookImage AND [IsSelling] = @original_IsSelling"
                            InsertCommand="INSERT INTO [tblBook] ([typeID], [bookName], [bookAuthor], [bookPrice], [publisher], [publishDate], [bookImage], [IsSelling]) VALUES (@typeID, @bookName, @bookAuthor, @bookPrice, @publisher, @publishDate, @bookImage, @IsSelling)"
                            OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [tblBook]"
                            UpdateCommand="UPDATE [tblBook] SET [typeID] = @typeID, [bookName] = @bookName, [bookAuthor] = @bookAuthor, [bookPrice] = @bookPrice, [publisher] = @publisher, [publishDate] = @publishDate, [bookImage] = @bookImage, [IsSelling] = @IsSelling WHERE [bookID] = @original_bookID AND [typeID] = @original_typeID AND [bookName] = @original_bookName AND [bookAuthor] = @original_bookAuthor AND [bookPrice] = @original_bookPrice AND [publisher] = @original_publisher AND [publishDate] = @original_publishDate AND [bookImage] = @original_bookImage AND [IsSelling] = @original_IsSelling">
                            <DeleteParameters>
                                <asp:Parameter Name="original_bookID" Type="Int32" />
                                <asp:Parameter Name="original_typeID" Type="Int32" />
                                <asp:Parameter Name="original_bookName" Type="String" />
                                <asp:Parameter Name="original_bookAuthor" Type="String" />
                                <asp:Parameter Name="original_bookPrice" Type="Decimal" />
                                <asp:Parameter Name="original_publisher" Type="String" />
                                <asp:Parameter Name="original_publishDate" Type="DateTime" />
                                <asp:Parameter Name="original_bookImage" Type="String" />
                                <asp:Parameter Name="original_IsSelling" Type="Boolean" />
                            </DeleteParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="typeID" Type="Int32" />
                                <asp:Parameter Name="bookName" Type="String" />
                                <asp:Parameter Name="bookAuthor" Type="String" />
                                <asp:Parameter Name="bookPrice" Type="Decimal" />
                                <asp:Parameter Name="publisher" Type="String" />
                                <asp:Parameter Name="publishDate" Type="DateTime" />
                                <asp:Parameter Name="bookImage" Type="String" />
                                <asp:Parameter Name="IsSelling" Type="Boolean" />
                                <asp:Parameter Name="original_bookID" Type="Int32" />
                                <asp:Parameter Name="original_typeID" Type="Int32" />
                                <asp:Parameter Name="original_bookName" Type="String" />
                                <asp:Parameter Name="original_bookAuthor" Type="String" />
                                <asp:Parameter Name="original_bookPrice" Type="Decimal" />
                                <asp:Parameter Name="original_publisher" Type="String" />
                                <asp:Parameter Name="original_publishDate" Type="DateTime" />
                                <asp:Parameter Name="original_bookImage" Type="String" />
                                <asp:Parameter Name="original_IsSelling" Type="Boolean" />
                            </UpdateParameters>
                            <InsertParameters>
                                <asp:Parameter Name="typeID" Type="Int32" />
                                <asp:Parameter Name="bookName" Type="String" />
                                <asp:Parameter Name="bookAuthor" Type="String" />
                                <asp:Parameter Name="bookPrice" Type="Decimal" />
                                <asp:Parameter Name="publisher" Type="String" />
                                <asp:Parameter Name="publishDate" Type="DateTime" />
                                <asp:Parameter Name="bookImage" Type="String" />
                                <asp:Parameter Name="IsSelling" Type="Boolean" />
                            </InsertParameters>
                        </asp:SqlDataSource>
                        </td>
                    <td colspan="2" rowspan="2" style="height: 391px; vertical-align: top; text-align: center; width: 806px;">
                        <br />
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="bookID"
                            DataSourceID="SqlDataSource1" AllowPaging="True" PageSize="3" Width="100%" Height="7px">
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <div style="text-align: left">
                                            <table border="0" cellpadding="0" cellspacing="0" style="width: 483px; height: 86px">
                                                <tr>
                                                    <td rowspan="4" style="width: 49px; text-align: center">
                                                        <asp:Image ID="Image2" runat="server" ImageUrl='<%# "~/picture/"+Eval("bookImage") %>' /></td>
                                                    <td style="width: 49px; height: 21px">
                                                        书名:</td>
                                                    <td colspan="2" style="height: 21px">
                                                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("bookName") %>' Width="231px"></asp:Label></td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 49px; height: 20px;">
                                                        作者:</td>
                                                    <td colspan="2" style="height: 20px">
                                                        <asp:Label ID="Label2" runat="server" Text='<%# Eval("bookAuthor") %>' Width="230px"></asp:Label></td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 49px; height: 24px;">
                                                        价格:</td>
                                                    <td colspan="2" style="height: 24px">
                                                        <asp:Label ID="Label3" runat="server" Text='<%# Eval("bookPrice") %>' Width="234px"></asp:Label></td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 49px">
                                                        <asp:HyperLink ID="HyperLink2" runat="server" Width="49px" NavigateUrl='<%# "bookinfo.aspx?bid="+Eval("bookID").ToString() %>'>详情</asp:HyperLink></td>
                                                    <td colspan="2">
                                                        &nbsp; &nbsp; &nbsp;<asp:HyperLink ID="HyperLink3" runat="server" Height="15px" NavigateUrl='<%# "Reviews.aspx?bid="+Eval("bookID").ToString() %>'
                                                            Width="38px">评论</asp:HyperLink>
                                                        &nbsp; &nbsp;
                                                        <asp:Button ID="Button1" runat="server" Text="查看电子书" OnClientClick="alert('请先登陆!')" /></td>
                                                </tr>
                                            </table>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                        <asp:Label ID="Label8" runat="server" ForeColor="Red" Text="对不起!没有你要找的书籍.或选择子节点."
                            Visible="False" Width="378px"></asp:Label>
                    </td>
                </tr>
                <tr>
                </tr>
            </table>
        <br />
        <br />
        &nbsp;<div style="text-align: center">
            &nbsp;</div>
    </div>
        <div style="text-align: center; background-color: #009900;">
            &nbsp;</div>

</asp:Content>

⌨️ 快捷键说明

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