Пример #1
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";
            if (context.Session["id"] != null)
            {
                int id = context.Request.QueryString["goods_id"] == null ? 0 : Int32.Parse(context.Request.QueryString["goods_id"]);
                //context.Response.Write("Hello World"+id);

                if (id > 0)
                {
                    int i = GoodsBLL.DeleteGoodsById(id);
                    if (i > 0)
                    {
                        context.Response.Write("删除成功!");
                    }
                    else
                    {
                        context.Response.Write("删除失败");
                    }
                    context.Response.Write("<a href='ProcessAdminProduct.ashx'>回到商品首页</a>");
                }
            }
            else
            {
                context.Response.Redirect("~/admin_login.html");
            }
        }