BBSDel.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:1k
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- public partial class BBS_BBSDel : System.Web.UI.Page
- {
- /// <summary>
- /// 论坛模板
- /// </summary>
- Model.BBS MB = new Model.BBS();
- /// <summary>
- /// 论坛业务
- /// </summary>
- BLL.BBS BB = new BLL.BBS();
- protected void Page_Load(object sender, EventArgs e)
- {
- LoginLogic.MatchLoad("../", "BBS_BBSDel");
- if (!IsPostBack)
- {
-
- if(Request.QueryString["id"]!=null)
- {
- string IDStr = Request.QueryString["id"].ToString();
- BB.Delete(int.Parse(IDStr));
- DBUtility.SqlHelper DS = new DBUtility.SqlHelper();
- DS.ExecuteQuery(System.Configuration.ConfigurationManager.ConnectionStrings["DB"].ConnectionString, CommandType.Text, "delete from BBSBack where ZTID=" + IDStr, null);
- MessageBox.Show("删除成功!","MyBBS.aspx");
- }
-
- }
- }
- }