/// <summary> /// 各类型信息 /// </summary> public void LoadData(long InfoCategory) { strTitle = new StringBuilder(500); strContent = new StringBuilder(500); strImg = new StringBuilder(200); strNews = new StringBuilder(2000); DataTable dtNews = WebInfoLogic.GetCulumnInfo(InfoCategory, 5); if (dtNews.Rows.Count > 0) { strNews.Append("<table border=\"0\" style=\"width: 100%;\">"); for (int i = 0; i < dtNews.Rows.Count; i++) { if (i == 0) { strTitle.Append("<a href=\"InfoDetail.aspx?InfoID=" + ConvertHelper.ConvertLong(dtNews.Rows[i]["InfoID"].ToString())); strTitle.Append("\" target=\"_blank\" title=\"标 题:" + dtNews.Rows[i]["Title"].ToString() + " 发布日期:"); strTitle.Append(ConvertHelper.ConvertDateTime(dtNews.Rows[i]["PubDate"].ToString()).ToShortDateString() + " 访问次数:"); strTitle.Append(dtNews.Rows[i]["ClickRate"].ToString() + "\">"); strTitle.Append(SelectInfo(dtNews.Rows[0]["Title"].ToString().Trim(), 13) + "</a>"); strContent.Append("<span class=\"hidetext\">"); strContent.Append(Server.HtmlDecode(dtNews.Rows[0]["InfoContent"].ToString())); strContent.Append("</span>"); if (CheckImageUrl(dtNews.Rows[0]["MiniatureFileName"].ToString())) { strImg.Append("<img width=\"105\" height=\"72\" src=\"" + SelectImage(InfoCategory)); strImg.Append("\" />"); } else { strImg.Append("<img width=\"105\" height=\"72\" src=\"" + SystemParaLogic.GetSystemParam("MiniatureDummyPath") + dtNews.Rows[0]["MiniatureFileName"].ToString() + "\"/>"); } } else { strNews.Append("<tr><td style=\"width:60%;\"><ul>"); strNews.Append("<li><a class=\"hideText\" style=\"width:200px;\" href=\"InfoDetail.aspx?InfoID=" + ConvertHelper.ConvertLong(dtNews.Rows[i]["InfoID"].ToString())); strNews.Append("\" target=\"_blank\" title=\"标 题:" + dtNews.Rows[i]["Title"].ToString() + " 发布日期:"); strNews.Append(ConvertHelper.ConvertDateTime(dtNews.Rows[i]["PubDate"].ToString()).ToShortDateString() + " 访问次数:"); strNews.Append(dtNews.Rows[i]["ClickRate"].ToString() + "\">"); strNews.Append(dtNews.Rows[i]["Title"].ToString().Trim() + "</a></li></ul>"); strNews.Append("</td><td style=\"width:40%;\">"); strNews.Append("[" + dtNews.Rows[i]["PubDate"].ToString() + "]</td></tr>"); } } strNews.Append("</table>"); } else { strTitle.Remove(0, strTitle.Length); strContent.Remove(0, strContent.Length); strNews.Remove(0, strNews.Length); } }
/// <summary> /// 文化专题 /// </summary> public void LoadCultureTopic() { DataTable dtTopic = WebInfoLogic.GetCulumnInfo((long)Common.PageEnum.ColumnCategory.CultureTopic, 5); StringBuilder strTopic = new StringBuilder(500); if (dtTopic.Rows.Count > 0) { strTopic.Append("<marquee style=\"padding: 1px;\" scrollamount=\"1\" scrolldelay=\"5\" behavior=\"alternate\""); strTopic.Append(" height=\"155\" width=\"670\" loop=\"-1\" onmouseover=\"javascript:this.stop();\" onmouseout=\"javascript:this.start();\">"); for (int i = 0; i < dtTopic.Rows.Count; i++) { strTopic.Append("<div class=\"pp\"><img width=\"184\" height=\"129\" src=\"" + dtTopic.Rows[i]["MiniatureFileName"].ToString()); strTopic.Append("\" /><a href=\"InfoDetail.aspx?InfoID=" + dtTopic.Rows[i]["InfoID"].ToString() + "\">"); strTopic.Append("<div class=\"name\">" + dtTopic.Rows[i]["Title"] + "</div></a></div>"); } strTopic.Append("</marquee>"); divTopic.InnerHtml = strTopic.ToString(); } }