protected void Btnedit_Click(object sender, EventArgs e) { string fckstr = mcontent.InnerText; if (fckstr != "") { if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null) { string Mcidstr = Request.QueryString["Cid"].ToString(); int myCid = Int32.Parse(Mcidstr); LearnSite.Model.Courses course = new LearnSite.Model.Courses(); course.Cid = myCid; course.Ctitle = Texttitle.Text.Trim(); course.Cclass = DDLclass.SelectedValue; course.Ccontent = HttpUtility.HtmlEncode(fckstr); course.Cdate = DateTime.Now; course.Cks = Int32.Parse(DDLCks.SelectedValue); course.Cobj = Int32.Parse(DDLcobj.SelectedValue); course.Cterm = Int32.Parse(DDLCterm.SelectedValue); course.Chid = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"].ToString()); course.Cpublish = CheckPublish.Checked; LearnSite.BLL.Courses coursebll = new LearnSite.BLL.Courses(); coursebll.UpdateCourse(course); System.Threading.Thread.Sleep(500); string msg = "更新学案内容成功!"; LearnSite.Common.MessageBox.Alert(msg, this.Page); string url = "~/Teacher/courseshow.aspx?Cid=" + myCid.ToString(); Response.Redirect(url, false); } } }
protected void Btnedit_Click(object sender, EventArgs e) { string fckstr = FCKeditor1.Value; if (fckstr != "") { if (Request.Cookies["TeacherCookies"] != null) { string serverUrl=LearnSite.Common.WordProcess.ServerUrl(); fckstr = fckstr.Replace(serverUrl, ""); LearnSite.Model.Courses course = new LearnSite.Model.Courses(); course.Cid = GetCid; course.Ctitle = Texttitle.Text.Trim(); course.Cclass = DDLclass.SelectedValue; course.Ccontent = HttpUtility.HtmlEncode(fckstr); course.Cdate = DateTime.Now; course.Cks = Int32.Parse(DDLCks.SelectedValue); course.Cobj = Int32.Parse(DDLcobj.SelectedValue); course.Cterm = Int32.Parse(DDLCterm.SelectedValue); course.Chid = Int32.Parse(Request.Cookies["TeacherCookies"].Values["Hid"].ToString()); course.Cpublish = CheckPublish.Checked; LearnSite.BLL.Courses coursebll = new LearnSite.BLL.Courses(); coursebll.UpdateCourse(course); System.Threading.Thread.Sleep(1500); string msg = "更新课程内容成功!"; LearnSite.Common.MessageBox.Alert(msg, this.Page); string Cid = Request.QueryString["Cid"].ToString(); string url = "~/Teacher/courseshow.aspx?Cid=" + Cid; Response.Redirect(url, false); } } }