protected void Page_Load(object sender, EventArgs e) { Model.t_news news = new BLL.t_news().GetNewsModel(newsID); newsDateTime.InnerText = "发布时间: " + news.new_creatDate.ToString(); newsContent.InnerHtml = Server.HtmlDecode(PageValidate.Decode(news.new_content)); newsImgs.ImageUrl = news.picture.pic_valid; newsTitle.InnerHtml = news.new_title + "<small > [" + news.newscategory.newc_name + "]</small>"; }
private void ShowInfo(int new_ID) { WalleProject.BLL.t_news bll = new WalleProject.BLL.t_news(); WalleProject.Model.t_news model = bll.GetModel(new_ID); this.lblnew_title.Text = model.new_title; this.lblnew_creatDate.Text = model.new_creatDate.ToString(); this.lblnew_cate_id.Text = model.new_cate_id.ToString(); this.lblnew_pic_id.Text = model.new_pic_id.ToString(); this.lblnew_content.Text = Server.HtmlDecode(PageValidate.Decode(model.new_content)); this.lblnew_valid.Text = model.new_valid; this.lblnew_ID.Text = model.new_ID.ToString(); }
private void ShowEditInfo(int new_ID) { WalleProject.BLL.t_news bll = new WalleProject.BLL.t_news(); WalleProject.Model.t_news model = bll.GetModel(new_ID); this.txtEditnew_title.Text = model.new_title; this.txtEditnew_cate_id.Text = model.new_cate_id.ToString(); this.lb_i_img.SelectedValue = model.new_pic_id.ToString(); this.content.InnerHtml = Server.HtmlDecode(PageValidate.Decode(model.new_content)); this.txtEditnew_valid.Text = model.new_valid; this.img_i_mo.Src = new BLL.t_picture().GetModel(int.Parse(model.new_pic_id.ToString())).pic_valid; this.imgID.Text = model.new_pic_id.ToString(); Label1.Text = model.new_ID.ToString(); }