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 GeyanCharge : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnAdd_Click(object sender, EventArgs e)
        {
            BLL.geyan Stu = new BLL.geyan();
            MODEL.geyan mStu = new MODEL.geyan();
            mStu.a_theme = geyanTheme.Text;
            mStu.a_content = geyanContent.Text;
            mStu.a_time = DateTime.Now.ToShortDateString();
            Stu.insert(mStu);
            Response.Write("<script>alert('添加成功')</script>");

        }

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

        }
    }
}
