计算机毕业设计系统论坛模块介绍:
(六)系统论坛
此模块显示鲜花论坛信息。包括信息主题、发布时间、客户名称。新主题、查看、发表回复操作。如图所示:
以下是引用片段:
相关代码如下: GridView1.DataSource = DataControl.GetDataTable("select * from 系统论坛"); GridView1.DataBind(); if (Session["User"] == null) { LinkButton2.Visible = false; GridView1.Columns[5].Visible = false; } else if (Session["User"].ToString() != "admin") { GridView1.Columns[5].Visible = false; } DataControl.ExecSql("insert into 系统论坛(主题标题,主题内容,会员帐号,发布时间) values('" + this.TextBox1.Text + "','" + this.Textbox3.Text + "','" + Session["User"].ToString() + "','" + DateTime.Now.Date.ToShortDateString() + "')"); tmpda = DataControl.GetDataTable("select * from 系统论坛 where 系统论坛.主题编号=" + Request.QueryString["ID"]); if (tmpda.Rows.Count > 0) { this.TZtbt.InnerH = "主题标题:" + tmpda.Rows[0]["主题标题"]; ,;&n,bsp; this.Tyhm.InnerH = "会员帐号:" + tmpda.Rows[0]["会员帐号"]; this.Tztnr.InnerH = "主题内容:" + tmpda.Rows[0]["主题内容"]; this.Tfbsj.InnerH = "发布时间:" + Convert.ToDateTime(tmpda.Rows[0]["发布时间"]).Date.ToShortDateString(); } //循环显示当前编号的主题回复信息列表 tmpda = DataControl.GetDataTable("select * from 论坛回复 where 论坛回复.主题编号=" + Request.QueryString["ID"]); strHfList = ""; for (int i = 0; i < tmpda.Rows.Count; i++) { strHfList = strHfList ; string strTmpHFList; strTmpHFList = " | 会员帐号:" + tmpda.Rows[i]["会员帐号"].ToString() + " | ";
strTmpHFList = strTmpHFList + " 回复内容:" + tmpda.Rows[i]["回复内容"].ToString().Replace("\r\n", " ") + " 回复时间:" + Convert.ToDateTime(tmpda.Rows[i]["回复时间"].ToString()).Date.ToShortDateString() + "
| ";
strHfList = strHfList + strTmpHFList + "
";
}
〖资料来源:计算机毕业论文 www.xiaoniu168.com〗
第12页为计算机毕业论文结论......