资源简介

在线音乐网站源代码,无BIN文件,代码完整,使用SQL 2000数据库,内附完整安装使用说明。

资源截图

代码片段和文件信息

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class index : System.Web.UI.Page
{
    protected void Page_Load(object sender EventArgs e)
    {
        if (!IsPostBack)
        {
            //调用自定义bindAudition方法,显示试听排行帮
            bindAudition();
            //调用自定义bindFashion方法,显示流行金曲
            bindFashion();
            //调用自定义bindOld方法,显示经典老歌
            bindOld();
            //调用自定义bindOccident方法,显示欧洲经典
            bindOccident();
            //调用自定义bindCampus方法,显示校园民谣
            bindCampus();
        }
    }
    //绑定GridView控件显示试听排行榜
    protected void bindAudition()
    {
        string sqlSel = “select top 10 * from tb_musicInfo order by auditionSum desc“;
        gvAudition.DataSource = dataOperate.getRows(sqlSel);
        gvAudition.DataKeyNames = new string[] { “id“ };
        gvAudition.DataBind();
    }
    //绑定GridView控件显示流行金曲
    protected void bindFashion()
    {
        string sqlSel = “select top 7 * from tb_musicInfo where musicType=1 order by id desc “;
        gvFashion.DataSource = dataOperate.getRows(sqlSel);
        gvFashion.DataKeyNames = new string[] { “id“ };
        gvFashion.DataBind();
    }
    //绑定GridView控件显示经典老歌
    protected void bindOld()
    {
        string sqlSel = “select top 7 * from tb_musicInfo where musicType=2  order by id desc “;
        gvOld.DataSource = dataOperate.getRows(sqlSel);
        gvOld.DataKeyNames = new string[] { “id“ };
        gvOld.DataBind();
    }
    //绑定GridView控件显示欧洲经典
    protected void bindOccident()
    {
        string sqlSel = “select top 7 * from tb_musicInfo where musicType=3 order by id desc “;
        gvOccident.DataSource = dataOperate.getRows(sqlSel);
        gvOccident.DataKeyNames = new string[] { “id“ };
        gvOccident.DataBind();
    }
    //绑定GridView控件显示校园民谣
    protected void bindCampus()
    {
        string selSel = “select top 7 * from tb_musicInfo where musicType=4 order by id desc “;
        gvCampus.DataSource = dataOperate.getRows(selSel);
        gvCampus.DataKeyNames = new string[] { “id“ };
        gvCampus.DataBind();

    }




    /// 
    /// 全选或全部取消GridView控件中的所有复选框
    /// 

    /// GridView对象,需要设置的GridView控件
    /// 布尔值变量,设置选中还是取消
    protected void allSelect(GridView gv bool bl)
    {
        //判断传入的复选框对象是否为选中状态
        if (bl)
        {
            //遍历传入的GridView对象
            foreach (GridViewRow gvr in gv.Rows)
            {
                //设置GridView控件中的所有复选框为选中状态
                ((CheckBox)gvr.FindControl(“CheckBox1“)).Checked = false;
            }
        }
        else
        {
            foreach (GridViewRow gvr in gv.Rows)
        

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-11-20 13:37  playMusic\
     目录           0  2012-11-08 17:00  playMusic\App_Code\
     文件        4154  2010-09-15 15:35  playMusic\App_Code\dataOperate.cs
     目录           0  2012-11-08 17:00  playMusic\App_Data\
     文件     1048576  2010-01-28 10:55  playMusic\App_Data\db_music_Data.MDF
     文件     1048576  2010-01-28 10:55  playMusic\App_Data\db_music_Log.LDF
     文件        5901  2008-08-09 11:31  playMusic\MasterPage.master
     文件         923  2008-08-09 11:28  playMusic\MasterPage.master.cs
     文件        7813  2010-01-28 10:07  playMusic\Web.Config
     目录           0  2012-11-08 17:00  playMusic\css\
     文件        3797  2008-05-26 09:42  playMusic\css\css.css
     目录           0  2012-11-08 17:00  playMusic\images\
     文件        4087  2008-08-06 17:08  playMusic\images\000.gif
     文件       11434  2008-08-07 10:08  playMusic\images\001.GIF
     文件        6468  2008-08-06 16:18  playMusic\images\01.gif
     文件       69329  2008-08-06 16:36  playMusic\images\banner.jpg
     文件       43664  2008-08-07 09:33  playMusic\images\bbanner.GIF
     文件       13352  2008-08-06 16:18  playMusic\images\bg.jpg
     文件        4801  2008-08-06 16:26  playMusic\images\bg1.gif
     文件        2538  2008-08-07 09:20  playMusic\images\bof.GIF
     文件       10894  2008-08-09 09:09  playMusic\images\bt.jpg
     文件       62083  2008-08-06 16:20  playMusic\images\daoh.jpg
     文件        1212  2008-08-08 14:38  playMusic\images\daohang_01.gif
     文件        2657  2008-08-08 14:38  playMusic\images\daohang_02.gif
     文件        3068  2008-08-08 14:38  playMusic\images\daohang_03.gif
     文件        3377  2008-08-08 14:38  playMusic\images\daohang_04.gif
     文件        3211  2008-08-08 14:38  playMusic\images\daohang_05.gif
     文件        3098  2008-08-08 14:38  playMusic\images\daohang_06.gif
     文件        2905  2008-08-08 14:38  playMusic\images\daohang_07.gif
     文件        1990  2008-08-08 14:38  playMusic\images\daohang_08.gif
     文件        3348  2008-08-08 14:38  playMusic\images\daohang_09.gif
............此处省略33个文件信息

评论

共有 条评论