Beispiel #1
0
 public void query(string id)
 {
     Model.News news = new Model.News();
     news.id = id;
     BLL.NewsBLL newsBLL = new BLL.NewsBLL();
     if (newsBLL.QueryNews(news))
     {
         this.ttitle.Value           = news.title.ToString();
         this.author.Value           = news.author.ToString();
         this.txtEditorContents.Text = news.contents;
     }
     else
     {
         Response.Write("<script>alert('查询失败')</script>");
     }
 }
Beispiel #2
0
 public void chaxun(string id)
 {
     Model.News news = new Model.News();
     news.id = id;
     BLL.NewsBLL newsBLL = new BLL.NewsBLL();
     if (newsBLL.QueryNews(news))
     {
         this.Label1.Text = news.id.ToString();
         this.Label2.Text = news.title.ToString();
         Page.Title       = "匿名举报新闻 -" + news.title.ToString();
     }
     else
     {
         Response.Write("<script>alert('查询失败')</script>");
     }
 }
Beispiel #3
0
 public void chaxun(int id)
 {
     Model.News news = new Model.News();
     news.id = id.ToString();
     BLL.NewsBLL newsBLL = new BLL.NewsBLL();
     if (newsBLL.QueryNews(news))
     {
         this.Label1.Text = news.title.ToString();
         this.Label4.Text = news.author.ToString();
         this.Label3.Text = news.contents;
         this.Label2.Text = news.createTime.ToString();
         this.Label5.Text = news.category.ToString();
         this.Label7.Text = news.click.ToString();
         Page.Title       = news.title.ToString();
     }
     else
     {
         Response.Write("<script>alert('查询失败')</script>");
     }
 }