/// <summary> /// 公告 首页 /// </summary> public static StringBuilder listNotice1(DataTable dt, LayoutInfoLink li) { StringBuilder sb = new StringBuilder(); foreach (DataRow drw in dt.Rows) { sb.Append("<li>"); sb.Append("<a href=\"" + GetURL.News.Info(drw) + "\" " + li.target + " title=\"" + drw["Title"] + "\">" + FnData.GetNewsTitle(drw) + "</a>"); //sb.Append("<img src=\"/images/index/Notice_0" + FnData.GetNewsImg(drw) + ".gif\" />"); //sb.Append("<span><a href=\"" + GetURL.News.Info(drw) + "\" " + li.target + " title=\"" + drw["Title"] + "\">" + FnData.GetNewsTitle(drw) + "</a></span>"); sb.Append("</li>"); } return(sb); }
/// <summary> /// 新闻列表 需要 UrlType,Url,Title1,Title,NewsSN,EditDate /// </summary> /// <param name="dt"></param> /// <param name="li"></param> /// <returns></returns> public static StringBuilder list2(DataTable dt, LayoutInfoLink li) { StringBuilder sb = new StringBuilder(); foreach (DataRow drw in dt.Rows) { sb.Append("<li>"); sb.Append("<a href=\"" + GetURL.News.Info(drw) + "\" " + li.target + " title=\"" + drw["Title"] + "\">" + FnData.GetNewsTitle(drw) + "</a> <span class=\"newsdate\">" + Fn.IsDate(drw["EditDate"].ToString(), DateTime.Now).ToString("yyyy-MM-dd") + "</span>"); sb.Append("</li>"); } return(sb); }
/// <summary> /// 新闻列表 需要 UrlType,Url,Title1,Title,NewsSN /// </summary> /// <param name="dt"></param> /// <param name="li"></param> /// <returns></returns> public static StringBuilder list3(DataTable dt, LayoutInfoLink li) { StringBuilder sb = new StringBuilder(); foreach (DataRow drw in dt.Rows) { sb.Append("<li>"); sb.Append("<a href=\"" + GetURL.News.Info(drw) + "\" " + li.target + " title=\"" + drw["Title"] + "\">" + FnData.GetNewsTitle(drw) + "</a>"); sb.Append("</li>"); } return(sb); }
//新闻首页图文 private StringBuilder NewsHomePic(DataTable dt) { StringBuilder sb = new StringBuilder(); foreach (DataRow drw in dt.Rows) { sb.Append("<div class=\"left\">"); sb.Append("<a href=\"" + GetURL.News.Info(drw) + "\" target=\"_blank\">"); sb.Append("<img src=\"" + GetURL.News.Pic(drw["PicS"]) + "\" width=\"81\" height=\"79\" alt=\"" + drw["Title"] + "\" /></a>"); sb.Append("</div>"); sb.Append("<div class=\"right\">"); sb.Append("<dl class=\"plate-top\">"); sb.Append("<dt><a href=\"" + GetURL.News.Info(drw) + "\" target=\"_blank\">" + FnData.GetNewsTitle(drw) + "</a></dt>"); sb.Append("<dd>" + Fn.Left(Fn.ReplaceHTML(drw["Detail"].ToString()), 20, "...") + "</dd>"); sb.Append("</dl>"); sb.Append("</div>"); } return(sb); }