----------------------最终效果---------------------------
-----------FreeTextBox使用方式---------------------
-----------中文汉化FreeTextBox相册-----------------
----------CS代码-----------------------------------------
1 protected void Page_Load(object sender, EventArgs e)
2 {
3 if (!IsPostBack)
4 {
5 int aritcleId = int.Parse(Request.QueryString["articleId"]);
6 ArticleBLL artsystem = new ArticleBLL();
7 Article artdata = artsystem.GetNewInfo(aritcleId);
8 this.lblId.Text = artdata.ArticleId.ToString();
9 this.txtTitle.Text = artdata.Title;
10 this.txtClassId.Text = artdata.ClassId.ToString();
11 this.FreeTextBox1.Text = artdata.Content;
12 this.lblDateTime.Text = artdata.DateTime.ToString();
13 }
14 }
15
16 protected void btnEdit_Click(object sender, EventArgs e)
17 {
18 Article artdata = new Article();
19 artdata.ArticleId = int.Parse(this.lblId.Text);
20 artdata.Title = this.txtTitle.Text;
21 artdata.ClassId = int.Parse(this.txtClassId.Text);
22 artdata.Content = this.FreeTextBox1.Text;
23 artdata.DateTime = DateTime.Now;
24 ArticleBLL artsystem = new ArticleBLL();
25 artsystem.Edit(artdata);
26 this.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('修改成功!')</script>");
27 }
-----------BLL-----------------------------
-----------DAL----------------------------