    
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace KuGo.Web.Admin
{
    public partial class CategoriesDel : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                KuGo.BLL.CategoriesBLL bll = new KuGo.BLL.CategoriesBLL();
    if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
                {
                    string strId = Request.Params["id"];                   
                    
                    int id = Convert.ToInt32(strId);                   
                    
                    if (bll.Delete(id)){
                      Response.Write("<script>alert('删除成功！');window.location.href='CategoriesList.aspx';</script>");
                    }else{
                      // bll.GetLastError();
                      Response.Write("<script>alert('删除失败！');window.location.href='CategoriesList.aspx';</script>");
                    }
                }
            }
        }
    }
}
  