/// <summary> /// 初始化 /// </summary> private void InitData() { Hashtable ht = articleManager.GetArticleInfoByID(_key); if (ht.Count > 0 && ht != null) { ControlBindHelper.SetWebControls(this.Page, ht); } }
private void InitPage() { ArticleManager articleManager = new ArticleManager(); Hashtable article = articleManager.GetArticleInfoByID(id); if (article != null && article.Count > 0) { divTitle.InnerHtml = article["ARTICLENAME"].ToString(); DateTime dt = DateTime.Parse(SiteHelper.GetHashTableValueByKey(article, "ReleaseTime")); divDate.InnerHtml = dt.ToString("yyyy-MM-dd HH:mm"); divContent.InnerHtml = article["ARTICLECONTENT"].ToString(); } }