コード例 #1
0
        private void DeleteNode()
        {
            string            id = DNTRequest.GetString("id").Trim();
            Goodscategoryinfo gc = GoodsCategories.GetGoodsCategoryInfoById(int.Parse(id));

            GoodsCategories.DeleteGoodsCategory(int.Parse(id));
            DataTable dt = DbProvider.GetInstance().GetAllCategoriesTable();

            if (gc.Parentid != 0)
            {
                Goodscategoryinfo parentgc = GoodsCategories.GetGoodsCategoryInfoById(gc.Parentid);
                parentgc.Haschild = dt.Select("parentid=" + gc.Parentid).Length > 0 ? 1 : 0;
                GoodsCategories.UpdateGoodsCategory(parentgc);
            }
            SetForumsTrade(gc.Fid);
            ResetStatus();
            this.RegisterStartupScript("PAGE", "window.location='mall_goodscategoriesmanage.aspx';");
        }