Exemple #1
0
        /// <summary>
        /// 文化动态
        /// </summary>
        public void LoadCultureTrends()
        {
            DataTable dtTrends = WebInfoLogic.GetWebInfoRoll(5);

            string sPicUrls = "";
            string sLinks   = "";
            string sTexts   = "";
            string url      = Request.Url.ToString().ToLower().Replace("index.aspx", "InfoDetail.aspx?InfoID=");

            foreach (DataRow dr in dtTrends.Rows)
            {
                sPicUrls += SystemParaLogic.GetSystemParam("MiniatureDummyPath") + dr["MiniatureFileName"].ToString() + "|";
                sLinks   += url + dr["InfoID"].ToString() + "|";
                sTexts   += dr["Title"].ToString() + "|";
            }

            if (dtTrends.Rows.Count > 0)
            {
                sPicUrls = sPicUrls.Substring(0, sPicUrls.Length - 1);
                sLinks   = sLinks.Substring(0, sLinks.Length - 1);
                sTexts   = sTexts.Substring(0, sTexts.Length - 1);
            }
            divPicNews.InnerHtml = "<script type=\"text/javascript\">getFlashNews(\"" + sPicUrls + "\",\"" + sLinks + "\",\"" + sTexts + "\");</script>";

            LoadCultureTrendsRight();
        }
Exemple #2
0
        /// <summary>
        /// 右边信息
        /// </summary>
        public void LoadCultureTrendsRight()
        {
            DataTable     dtRight  = WebInfoLogic.GetWebInfoRoll(8);
            StringBuilder strRight = new StringBuilder(1000);

            if (dtRight.Rows.Count > 0)
            {
                strRight.Append("<ul>");
                for (int i = 0; i < dtRight.Rows.Count; i++)
                {
                    strRight.Append("<li><a href=\"InfoDetail.aspx?InfoID=" + ConvertHelper.ConvertLong(dtRight.Rows[i]["InfoID"].ToString()));
                    strRight.Append("\" target=\"_blank\" title=\"标    题:" + dtRight.Rows[i]["Title"].ToString() + "&#10;发布日期:");
                    strRight.Append(ConvertHelper.ConvertDateTime(dtRight.Rows[i]["PubDate"].ToString()).ToShortDateString() + "&#10;访问次数:");
                    strRight.Append(dtRight.Rows[i]["ClickRate"].ToString() + "\">" + dtRight.Rows[i]["Title"].ToString() + "</a>");
                    strRight.Append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
                    strRight.Append("[" + ConvertHelper.ConvertDateTime(dtRight.Rows[i]["PubDate"].ToString()).Month.ToString() + "/");
                    strRight.Append(ConvertHelper.ConvertDateTime(dtRight.Rows[i]["PubDate"].ToString()).Day.ToString() + "]");
                }
                strRight.Append("</ul>");
            }
            divWhdtRight.InnerHtml = strRight.ToString();
        }