示例#1
0
        protected void DownloadsBind(int number, int pagesize)
        {
            List <DownloadsModel> list = EispDownloadsBLL.GetDownloadsListByLang(lang, number, pagesize);

            this.GridView1.DataSource = list;
            this.GridView1.DataBind();
        }
示例#2
0
        //
        //绑定新闻
        protected void BindDownloads(int number, int pagesize, int recordcount)
        {
            List <DownloadsModel> list = EispDownloadsBLL.GetDownloadsListByLang(lang, number, pagesize);

            AspNetPager.RecordCount      = recordcount;
            AspNetPager.CurrentPageIndex = number;
            AspNetPager.PageSize         = pagesize;

            Records     = recordcount;
            RecordsPage = int.Parse(pages);
            StringBuilder sb = new StringBuilder();

            foreach (DownloadsModel n in list)
            {
                sb.Append("<div class=\"DownloadListRow\"><table width=\"100%\" height=\"100%\" valign=\"top\"><tr><td width='130'><a href=\"" + n.F_Content + "\"><img width='150px' height='204px' src=\"" + n.F_FileImage + "\"></a></td><td valign=\"top\"><div class=\"DownloadRowTitle\"><a href=\"" + n.F_Content + "\">" + n.F_Title + " </a>[" + n.F_Date.ToString("yyyy-MM-dd") + "]</div><div class=\"DownloadRowTitle\">" + n.F_Keywords + "</div><div class=\"DownloadRowTitle\">" + n.F_Desc + "</div></td></tr></table></div>");
            }
            NewsHtml = sb.ToString();
        }
示例#3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            List <DownloadsModel> list = EispDownloadsBLL.GetDownloadsListByLang(lang, 5, 5);

            StringBuilder sb = new StringBuilder();

            foreach (DownloadsModel d in list)
            {
                string TitleStr = string.Empty;
                TitleStr = d.F_Title;
                if (TitleStr.Length > 20)
                {
                    TitleStr = TitleStr.Substring(0, 18) + "...";
                }
                sb.Append("<div class=\"DownloadRow\"><a target=\"_blank\" alt=\"" + d.F_Title + "\" href=\"" + d.F_Content + "\">" + TitleStr + "</a></div>");
            }
            downloadlist = sb.ToString();
        }