protected void GetNews(Guid newsId) { QJVRMS.Business.News news = QJVRMS.Business.News.GetNews(newsId); this.lbTitle.Text = news.Title; this.lbContent.Text = news.Content; this.lbPubDate.Text = news.CreateDate.ToString("yyyy-MM-dd HH-mm-ss"); this.lbPubUser.Text = news.UserName; }
protected void ReadyToUpdate() { QJVRMS.Business.News news = QJVRMS.Business.News.GetNews(new Guid(this.hiSelNewsId.Value)); this.txtTitle.Text = news.Title; this.txtContent.Text = news.Content.Replace("<br/>", "\r\n").Replace(" ", " "); this.ddlVal.SelectedIndex = -1; ListItem aimItem = this.ddlVal.Items.FindByValue(news.IsVal.ToString()); if (aimItem != null) { aimItem.Selected = true; } this.ddlType.SelectedIndex = -1; aimItem = this.ddlType.Items.FindByValue(news.NType.ToString()); if (aimItem != null) { aimItem.Selected = true; } this.chkTop.Checked = news.IsTop == '1'; }