/// <summary> /// 显示启示评论 /// </summary> protected void DisplayNoticeCmnt() { try { long id = GetNoticeId(); if (id == 0) { Response.Redirect("~/"); return; } DataTable data = NoticeCmntService.GetNoticeCmntById(id); if (data != null) { LvComment.DataSource = data; LvComment.DataBind(); } } catch (Exception ex) { PromptInfo.Text = ex.Message; } }
/// <summary> /// 显示动态评论 /// </summary> protected void DisplayCurrentCmnt() { try { Int64 currentId = GetCurrentId(); if (currentId == 0) { Response.Redirect(URL_HOME); return; } DataTable data = CurrentCmntService.GetCurrentCmntByCurrentId(currentId); // 通过评论 ID 查评论数据 if (data != null) { LvComment.DataSource = data; LvComment.DataBind(); } } catch (Exception ex) { PromptInfo.Text = ex.Message; } }