protected void ButtonEdit_Click(object sender, EventArgs e) { string fckstr = Request.Form["textareaItem"].Trim(); if (fckstr.Length > 5) { LearnSite.Model.Summary smodel = new LearnSite.Model.Summary(); LearnSite.BLL.Summary sbll = new LearnSite.BLL.Summary(); string sCid = Request.QueryString["Scid"].ToString(); smodel.Scid = Int32.Parse(sCid); smodel.Sclass = cook.Sclass; smodel.Scontent = HttpUtility.HtmlEncode(fckstr); smodel.Sdate = DateTime.Now; smodel.Sgrade = cook.Sgrade; smodel.Shid = cook.Rhid; smodel.Sshow = true; smodel.Syear = DateTime.Now.Year; string msg = "修改课堂活动总结成功!"; if (ButtonEdit.ToolTip != "") { smodel.Sid = Int32.Parse(ButtonEdit.ToolTip); sbll.Update(smodel); } else { sbll.Add(smodel); msg = "添加课堂活动总结成功!"; } LearnSite.Common.WordProcess.Alert(msg, this.Page); string surl = "~/Student/summary.aspx?Cid=" + sCid + "&Scid=" + sCid; Response.Redirect(surl); } else { string msg = "不能输入少于6个汉字!"; LearnSite.Common.WordProcess.Alert(msg, this.Page); } }