コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         RepSelectNewS.DataSource = new SoundSongManager().selectNewSongs();
         RepSelectNewS.DataBind();
         BindRP();
     }
 }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!Page.IsPostBack)
                {
                    string id = Request.QueryString["id"];


                    if (id != null)
                    {
                        new SoundSongManager().clickCount(id);
                        SoundSong s = new SoundSongManager().selectSongById(id);
                        SoundMember m = new SoundMemberManager().selectMemById(s.MemId);
                        LBCategory.Text = s.Category;
                        LBClickCount.Text = s.ClickCount;
                        LBCreateTime.Text = s.CreateTime;
                        LBMenId.Text = m.UserId;
                        LBName.Text = s.Name;
                        RepSong.DataSource = new SoundSongManager().selectSongAddressById(id);
                        RepSong.DataBind();
                        RepSelectNewS.DataSource = new SoundSongManager().selectNewSongs();
                        RepSelectNewS.DataBind();//5^1^a^s^p^x
                        //DataTable dt = new SoundCommentManager().SelectBySongId(id);
                        //if (dt.Rows.Count == 0)
                        //{
                        //    // 无评论
                        //    //emptydata.Visible = true;
                        //}
                        //else
                        //{
                        //    // 有评论
                        //    //emptydata.Visible = false;
                        //    //RepComment.DataSource = dt;
                        //    //RepComment.DataBind();
                        //}

                    }
                    else
                    {
                        Response.Redirect("error.htm");
                    }
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
                // Response.Redirect("error.htm");
            }
        }
コード例 #3
0
ファイル: Default.aspx.cs プロジェクト: JohnToCoder/SkySound
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!Page.IsPostBack)
         {
             lbindexcon.Text      = "欢迎来到天籁网!本网站提供各种天然声音,希望您满足您的需要!";
             Repeater1.DataSource = new SoundSongManager().selectMember();
             Repeater1.DataBind();
             RepSelectNewS.DataSource = new SoundSongManager().selectNewSongs();
             RepSelectNewS.DataBind();
             RepSelectClickHotS.DataSource = new SoundSongManager().selectHotClickSongs();
             RepSelectClickHotS.DataBind();
             //RepSelectCommentHotS.DataSource = new SoundSongManager().selectHotContentSongs();
             //RepSelectCommentHotS.DataBind();
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message, ex);
         // Response.Redirect("error.htm");
     }
 }