Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     LoadNewsCat();
     if (IsPostBack)
     {
         MODEL.News model = new MODEL.News();
         model.Ntitle = Request.Form["title"];
         model.Ncontent = Request.Form["editor01"];
         model.Catid = Convert.ToInt32(Request.Form["selNewsCate"]);
         BLL.News bllNews = new BLL.News();
         if (bllNews.AddNews(model))
         {
             Response.Write("<script>alert('添加成功!')</script>");
         }
         else
         {
             Response.Write("失败!请重试!");
         }
     }
 }