1 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AlbumManagement.aspx.cs" Inherits="PumpkinHouse.Admin.AlbumManagement" MasterPageFile="~/Admin/Admin.Master" %>
\r
3 <asp:Content ContentPlaceHolderID="MainPageHolder" ID="mainPage" runat="server">
\r
5 <form id="form1" runat="server">
\r
6 专辑总数:<asp:Label ID="lblCount" runat="server"></asp:Label><br />
\r
7 专辑名 <asp:TextBox ID="txtSearchAlbum" runat="server" />
\r
8 <asp:Button ID="btnSearchAlbum" runat="server" Text="搜索专辑"
\r
9 onclick="btnSearchAlbum_Click" />
\r
11 <asp:GridView ID="GridView1" runat="server" AllowPaging="True"
\r
12 AutoGenerateColumns="False" DataSourceID="SqlDataSource1" DataKeyNames="Id"
\r
13 AllowSorting="True" AutoGenerateEditButton="True"
\r
14 OnRowUpdating="OnUpdating"
\r
15 onpageindexchanged="PageIndexChanged" onrowediting="OnEditing"
\r
18 <asp:BoundField DataField="Id" HeaderText="Id" ReadOnly="True"
\r
19 SortExpression="Id"/>
\r
20 <asp:BoundField DataField="Nick_Name" HeaderText="用户昵称" ReadOnly="True"
\r
21 SortExpression="Nick_Name" />
\r
22 <asp:BoundField DataField="Name" HeaderText="专辑名"
\r
23 SortExpression="Name" />
\r
24 <asp:BoundField DataField="Description" HeaderText="专辑描述"
\r
25 SortExpression="Description" />
\r
26 <asp:BoundField DataField="Tags" HeaderText="标签"
\r
27 SortExpression="Tags" />
\r
28 <asp:BoundField DataField="Is_Recommended" HeaderText="推荐"
\r
29 SortExpression="Is_Recommended" />
\r
33 <asp:SqlDataSource ID="SqlDataSource1" runat="server"
\r
34 ConnectionString="<%$ ConnectionStrings:DatabaseConnectionString %>"
\r
35 SelectCommand="SELECT [Id], [Name], [Description], [Tags], [Nick_Name], a.[Is_Recommended] FROM [DB_Album] a, [DB_User] u where a.Username = u.Username"
\r
37 UpdateCommand="UPDATE [DB_Album] set Name=@Name, Description = @Description, Tags = @Tags, Is_Recommended=@Is_Recommended where Id=@Id" onselected="SqlDataSource1_Selected"
\r
39 </asp:SqlDataSource>
\r
43 <li>推荐:只有推荐不为0的专辑会显示在引导页。如果超过12个只显示前12个用户,不足12个不会自动补齐,请保证有12个用户置顶。推荐顺序由小到大依次排列(1在最顶部)。顺序数字可以相同,可以不连续。
\r