//绑定学院动态 protected void bindAcademicDongtai() { //取到第一条 AUTO.Model.YouthNews model = news_bll.GetFirstList(" news_father_id=" + news_xueyuan_id + " and is_check='Y' ", " publish_time desc "); if (model != null) { xueyuan_id = Convert.ToInt32(model.News_id); xueyuan_title = model.News_title.Length > 16 ? model.News_title.Substring(0, 15) + "..." : model.News_title.ToString(); xueyuan_time = FormatTime(model.Publish_time); } //取到剩余几条数据 DataSet ds = news_bll.GetOtherFirstList(8, " news_id ", " news_father_id=" + news_xueyuan_id + " and is_check='Y' ", " publish_time desc "); rptXueyuan.DataSource = ds; rptXueyuan.DataBind(); }
//绑定共青之声 protected void bindZaiXian() { //取到第一条 AUTO.Model.YouthNews model = news_bll.GetFirstList(" news_father_id=" + news_zaixian_id + " and is_check='Y' ", " publish_time desc "); if (model != null) { zaixian_id = Convert.ToInt32(model.News_id); zaixian_title = model.News_title.Length > 16 ? model.News_title.Substring(0, 15) + "..." : model.News_title.ToString(); zaixian_time = FormatTime(model.Publish_time); zaixian_content = model.News_content.Length > 40 ? model.News_content.Substring(0, 39) : model.News_content; } //取到剩余的几条数据 DataSet ds = news_bll.GetOtherFirstList(8, " news_id ", "news_father_id=" + news_zaixian_id + " and is_check='Y'", " publish_time desc "); rptZaiXian.DataSource = ds; rptZaiXian.DataBind(); }