Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string newsid = Request.QueryString["newsId"]; //从地址栏获取传过来的值

            if (!IsPostBack)                               //回传提交,如果不是第一次执行,则不走这段代码
            {
                mdlnews                = bllnews.GetModel(int.Parse(newsid));
                UserId.Value           = newsid;
                TBnewsContent.Text     = mdlnews.newsContent;
                TBnewType.Text         = mdlnews.typeId.ToString();
                TBnewsTitle.Text       = mdlnews.newsTitle;
                TBnewsUser.Text        = mdlnews.userId.ToString();
                TBnewsReleaseTime.Text = mdlnews.newsReleaseTime.ToString();
            }
        }
Exemple #2
0
 private void ShowInfo(int newsId)
 {
     rr2.BLL.newsInfo   bll   = new rr2.BLL.newsInfo();
     rr2.Model.newsInfo model = bll.GetModel(newsId);
     this.lblnewsId.Text          = model.newsId.ToString();
     this.lbluserId.Text          = model.userId.ToString();
     this.lblTypeId.Text          = model.typeId.ToString();
     this.lblnewsTitle.Text       = model.newsTitle;
     this.lblnewsContent.Text     = model.newsContent;
     this.lblnewsCount.Text       = model.newsCount.ToString();
     this.lblnewsReleaseTime.Text = model.newsReleaseTime.ToString();
     this.lblext1.Text            = model.ext1;
     this.lblext2.Text            = model.ext2;
     this.lblext3.Text            = model.ext3;
 }