Example #1
0
        //首页轮播图
        protected void GetLunBoLst()
        {
            DataSet ds = bll.GetList(1, " category_id=96 ", "sort_id,add_time");

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                theFirstPhoto = " <img src=\"" + ds.Tables[0].Rows[0]["img_url"].ToString() + "\" width=\"1002\" height=\"230\" />";
            }
        }
Example #2
0
        //列表模板,分页
        protected void get_list_page()
        {
            int pageSize = 15;

            System.Data.DataSet       ds = bll.GetList(pageSize, page, " category_id=" + id + " and status=0 ", "sort_id asc,add_time desc", out totalCount);
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            //计算页数
            sb.Append("" + OS.Common.Utils.OutPageList(pageSize, this.page, this.totalCount, "info.aspx?top=" + id + "&page=__id__", 10) + "");
            if (ds != null)
            {
                if (TemplateId == 2)
                {
                    repLstNews.DataSource = ds;
                    repLstNews.DataBind();
                }
                else if (TemplateId == 3)
                {
                    repLstTuWen.DataSource = ds;
                    repLstTuWen.DataBind();
                }
                pageHtml.InnerHtml = " <ul>" + sb.ToString() + "</ul>";
            }
        }