//语音排行榜 public void soundP() { dataOperate mydo = new dataOperate(); string sql = "select top 10 * from(select * from tb_sound as a inner join tb_Type as b on a.SoundType=b.TypeID order by [ClickSum] desc)"; gvSoundP.DataSource = mydo.rows(sql, "tb_Sound").DefaultView; gvSoundP.DataBind(); }
//视频排行榜 public void videoP() { dataOperate mydo = new dataOperate(); string sql = "SELECT top 10 * from (select * from tb_Video as a inner join tb_Type as b on a.VideoType=b.TypeID order by [ClickSum] desc )"; gvVideoP.DataSource = mydo.rows(sql, "tb_Video").DefaultView; gvVideoP.DataBind(); }
//公告信息 protected void createBulletin() { dataOperate mydo = new dataOperate(); try { string sql = "select * from tb_Bulletin order by Date DESC"; this.gvBulletin.DataSource = mydo.rows(sql, "tb_Bullentin").DefaultView; this.gvBulletin.DataBind(); } catch (Exception error) { Response.Redirect(error.Message.ToString()); } }