private void query() { try { QueryNewsDetailsParam param = new QueryNewsDetailsParam(); param.articleId = SysBLL.newsListInfoData.articleId; param.articlePath = SysBLL.newsListInfoData.articlePath; NewsDetailsInfo info = NewsAccess.QueryNewsDetailsInfo(param); string htmlText = info.data.content.Replace("body{", "body{ margin:20px;font-family:'微软雅黑';font-size: 20px;"); htmlText = htmlText.Insert(htmlText.IndexOf("<p"), "<p style=\"text-align:center; color: #17242A;font-family: '微软雅黑';font-size: 24px;margin-bottom: 15px;\">" + info.data.title + "</p>" + "<p style = \"text-align: center;font-family: '微软雅黑';margin-top:5px;\"><span style=\"color:#960C0F;margin-right: 30px;\">http://www.lzbs.com.cn</span>" + "<span style=\"margin-right:70px;color: #2F4C59\"> " + info.data.createTime + " </span><span style=\"color:#2F4C59\"> 来源:" + info.data.sourceName + "</span></p><p>"); webPage.Dispatcher.Invoke(new setWebHtmlDelegate(setWebHtml), htmlText); } catch (ThreadAbortException ae) { log.Write("error:FormNewsDetails:query:" + ae.Message); } catch (Exception e) { log.Write("error:FormNewsDetails:query:" + e.Message); } }
/// <summary> /// 查询 /// </summary> private void Query() { QueryNewsParam param = new QueryNewsParam(); param.conName = "政务信息列表查询"; newsListInfo = null; newsListInfo = NewsAccess.QueryNewsLists(param); if ("9999".Equals(newsListInfo.success)) { setShowinfo(newsListInfo.msg); hideTitle(); return; } int j = newsListInfo.data.Count; j--; int count = 0; for (int i = j; i >= 0; i--) { resultInfo.Add(count, new string[] { newsListInfo.data[i].pubTime, newsListInfo.data[i].title }); count++; } setPage(pageNo); if (newsListInfo.data.Count == 0) { hideTitle(); throw new Exception(); } else { showTitle(); showinfo.Dispatcher.Invoke(new setTextBlockVisibilityDelegate(setTextBlockVisibility), showinfo, false); } }