private string GetList(ART_DOCUMENT_SW sw) { var list = ART_DOCUMENTCls.getModelList(sw).ToList(); string str = ""; int newSCount = 0; foreach (var v in list) { newSCount++; str += "<li>\r\n"; str += "<div class=\"text\"><a href='/ArtDocument/DocShow?ID=" + v.ARTID + "' target=\"_blank\">" + v.ARTTITLE + "</a></div>"; str += "<div class=\"right\">" + v.ARTTIME + "</div>"; str += "</li>"; } for (int i = 0; i < Convert.ToInt16(ConfigCls.getTopNewsTopCount()) - newSCount; i++) { str += "<li>\r\n"; //str += "<p style=\"color:red;\">暂无消息</p>"; str += "<div class=\"text\"></div>"; str += "<div class=\"right\"></div>"; str += "</li>"; } return(str); }