/// <summary> /// 展示数据 /// </summary> /// <param name="id">记录Id</param> private void ShowInfo(int id) { LAnnounceBB announceBB = new LAnnounceBB(); vLAnnounceData model = new vLAnnounceData(); try { model = announceBB.GetVModel(id); this.title.Text = model.title; this.content.Text = model.content; if (model.downFileNm != null) { this.fileNms.Text = model.downFileNm.Replace("|", "<br />"); } this.author.Text = model.author; if (model.isIndexShow) { this.isIndexShow.Text = "已发布"; } else { this.isIndexShow.Text = "未发布"; } } finally { announceBB.Dispose(); } }
/// <summary> /// 展示数据 /// </summary> /// <param name="id">记录Id</param> private void ShowInfo(int id) { LAnnounceBB announceBB = new LAnnounceBB(); vLAnnounceData model = new vLAnnounceData(); try { model = announceBB.GetVModel(id); this.title.Text = model.title; this.content.Text = model.content; this.fileIds.Value = model.fileIds; if (model.preFileNm != null) { this.fileNms.Text = model.preFileNm.Replace("|", "<br />"); } this.author.Text = model.author; if (model.isIndexShow) { this.isIndexShow.Text = "已发布"; this.btnRelease.Enabled = false; this.btnUnRelease.Enabled = true; } else { this.isIndexShow.Text = "未发布"; this.btnRelease.Enabled = true; this.btnUnRelease.Enabled = false; } } finally { announceBB.Dispose(); } }