//评论add by xf 2011-11-19 protected void Button_PinglunSave_Click(object sender, EventArgs e) { if (this.txtpinglun.Text.Trim() == "") { Response.Write("<script>alert('评论内容不能为空!');</script>"); return; } else { //保存评论记录 HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global(); HyoaClass.Hyoa_pinglun Hyoa_pinglun = new HyoaClass.Hyoa_pinglun(); Hyoa_pinglun.plid = Hyoa_global.GetRandom(); Hyoa_pinglun.hy_tableid = this.hy_tableid.Text; Hyoa_pinglun.hy_fatherid = this.txtdocid.Value; Hyoa_pinglun.hy_pluserid = Session["hyuid"].ToString(); Hyoa_pinglun.hy_plusername = Session["hyuname"].ToString(); Hyoa_pinglun.hy_pldeptid = Session["hydeptid"].ToString(); Hyoa_pinglun.hy_pldeptname = Session["hydeptname"].ToString(); Hyoa_pinglun.hy_pltime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); this.txtpinglun_hidden.Text = ReplaceString_Tszf(this.txtpinglun_hidden.Text); Hyoa_pinglun.hy_plbody = this.txtpinglun_hidden.Text; Hyoa_pinglun.hy_plip = HttpContext.Current.Request.UserHostAddress; Hyoa_pinglun.hy_plifshow = ""; Hyoa_pinglun.Insert(); Response.Write("<script>alert('评论成功!');window.location='" + this.Request.Url.ToString() + "'</script>"); //这个返回路径的页面,点返回按钮会有问题.已办转在办用的返回到了列表 } }