protected void Page_Load(object sender, EventArgs e) { newstableweibo = bllnewsinfo.GetList(2, "typeId=1", "newsReleaseTime desc").Tables[0]; //准备好数据,前端使用 newstableweixin = bllnewsinfo.GetList(2, "typeId=2", "newsReleaseTime desc").Tables[0]; //准备好数据,前端使用 newstableruanwen = bllnewsinfo.GetList(2, "typeId=3", "newsReleaseTime desc").Tables[0]; //准备好数据,前端使用 newstablemeiti = bllnewsinfo.GetList(2, "typeId=4", "newsReleaseTime desc").Tables[0]; //准备好数据,前端使用 }
rr2.BLL.newsInfo bllnewsinfo = new rr2.BLL.newsInfo();//实例化业务逻辑,以便抽取数据到newsinfotable protected void Page_Load(object sender, EventArgs e) { //计算总页数 pi = pageCount(); if (Request.QueryString["page"] == null) { pi.pageindex = 1; } else { pi.pageindex = int.Parse(Request.QueryString["page"]); } newsinfotable = bllnewsinfo.GetList(pi.pagesize, pi.pageindex, "").Tables[0]; //控件显示页数 for (int i = 1; i <= pi.pagecount; i++) { DropDownList1.Items.Add(i.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { newsinfotable = bllnewsinfo.GetList(4, "", "newsReleaseTime asc").Tables[0];//准备好数据,前端使用 }