using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace WebApplication1
{
    public partial class 新闻管理 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnAdd_Click(object sender, EventArgs e)
        {
            BLL.news Stu = new BLL.news();
            MODEL.news mStu = new MODEL.news();
            mStu.n_theme = txtTheme.Text;
            mStu.n_time = DateTime.Now.ToShortDateString();
            mStu.n_content = txtContent.Text;
            mStu.n_picture = txtPic.Text;
            Stu.insert(mStu);
            Response.Write("<script>alert('添加成功')</script>");

        }

        protected void btnDle_Click(object sender, EventArgs e)
        {
            //string nn = Request.QueryString["id"];
            //BLL.news bn = new BLL.news();
            //bn.delete(nn);
            //Response.Write("<script>alert('删除成功')</script>");
            //txtTheme.Text = "";
            //txtContent.Text = "";
            //txtPic.Text = "";

        }

        protected void btnRet_Click(object sender, EventArgs e)
        {

        }
    }
}
