Exemple #1
0
        /// <summary>
        /// 获取公告公示信息
        /// </summary>
        public void LoadPublicNotice()
        {
            int           infoCategory = WebInfoLogic.GetCategoryID("通知公告");
            DataTable     dtNotice     = WebInfoLogic.GetPublicNotice(7, infoCategory);
            StringBuilder strNotice    = new StringBuilder(1000);

            if (dtNotice.Rows.Count > 0)
            {
                strNotice.Append("<ul>");
                for (int i = 0; i < dtNotice.Rows.Count; i++)
                {
                    strNotice.Append("<li><a style=\"display: block;overflow: hidden;white-space: pre-wrap;text-overflow: clip;width:180px;height:22px;\" href=\"Zfgk_Detail.aspx?InfoID=" + ConvertHelper.ConvertLong(dtNotice.Rows[i]["InfoID"].ToString()));
                    strNotice.Append("&InfoCategoryID=" + ConvertHelper.ConvertLong(dtNotice.Rows[i]["InfoCategoryID"].ToString()));
                    strNotice.Append("\" target=\"_blank\" title=\"标    题:" + dtNotice.Rows[i]["Title"].ToString() + "&#10;发布日期:");
                    strNotice.Append(ConvertHelper.ConvertDateTime(dtNotice.Rows[i]["PubDate"].ToString()).ToShortDateString() + "&#10;访问次数:");
                    strNotice.Append(dtNotice.Rows[i]["ClickRate"].ToString() + "\">" + dtNotice.Rows[i]["Title"].ToString() + "</a>");
                    strNotice.Append("&nbsp;&nbsp;&nbsp;&nbsp;");
                    strNotice.Append("[" + ConvertHelper.ConvertDateTime(dtNotice.Rows[i]["PubDate"].ToString()).Month.ToString() + "/");
                    strNotice.Append(ConvertHelper.ConvertDateTime(dtNotice.Rows[i]["PubDate"].ToString()).Day.ToString() + "]");
                }
                strNotice.Append("</ul>");
                divNotice.InnerHtml = strNotice.ToString();
            }
        }