void bindC() { string sql = "select * from news_class where cparentid=20" + ";select top 10 id,title,dtt from news where titleimg='' and property=1 order by id desc" +";select top 5 id,title,titleImg from news where titleimg<>'' and property=1 order by id desc";
DataSet ds = DbHelperSQL.Query(sql); this.Repeater1.DataSource =ds.Tables[0]; this.Repeater1.DataBind();
this.RepeaterTopNews.DataSource = ds.Tables[1]; this.RepeaterTopNews.DataBind();
for (int i = 0; i < ds.Tables[2].Rows.Count; i++) { strpics += ds.Tables[2].Rows[i]["titleimg"]; if (i < 4) {strpics += "|"; } strlinks += "news_shows.aspx?Nid=" + ds.Tables[2].Rows[i]["id"] + "|"; strtitles += ds.Tables[2].Rows[i]["title"] + "|"; }
//this.Repeater2.DataSource = ds.Tables[2]; //this.Repeater2.DataBind(); //this.DataListimg.DataSource = DbHelperSQL.Query("select top 5 id,title,titleimg from news where titleimg<>'' order by id desc"); //this.DataListimg.DataBind(); }
|