新闻模块之新闻修改-使用FreeboxText模块修改新闻数据-页面表示层(Linq方式)-1...

----------------------最终效果---------------------------

 

 -----------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----------------------------

 

转载于:https://www.cnblogs.com/dzj007/archive/2012/02/13/2350135.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值