Пример #1
0
        public void newsupdate()
        {
            Model.News news = new Model.News();
            news.category   = DropDownList1.SelectedItem.Text;
            news.title      = Request["ttitle"].ToString();
            news.author     = Request["author"].ToString();
            news.contents   = this.txtEditorContents.Text;
            news.createTime = DateTime.Now.ToLocalTime().ToString();
            int click = 0;

            news.click = click.ToString();
            BLL.NewsBLL newsBLL = new BLL.NewsBLL();
            newsBLL.AddNews(news);
        }
Пример #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Model.News news = new Model.News();
            news.category   = DropDownList1.SelectedItem.Text;
            news.title      = Request["title"].ToString();
            news.author     = Request["author"].ToString();
            news.contents   = this.txtEditorContents.Text;
            news.createTime = DateTime.Now.ToLocalTime().ToString();
            int click = 0;

            news.click = click.ToString();
            BLL.NewsBLL newsBLL = new BLL.NewsBLL();
            newsBLL.AddNews(news);
        }