コード例 #1
0
        protected void DeleteShop(int ShopID)
        {
            TShop shop = shopbll.GetShop(ShopID);

            if (shop.ShopPic.Trim() != "")
            {
                CommonLibrary.CommOperate.DeleteFile(Server.MapPath(shop.ShopPic));
            }
            ImageOperate.DeleteMemoImage(shop.ShopMemo);
            shopbll.DeleteShop(ShopID);
        }
コード例 #2
0
ファイル: Brand_List.aspx.cs プロジェクト: jishufangui/Sykam
        protected void DeleteBrand(int BrandID)
        {
            TBrand brand = brandbll.GetBrandByID(BrandID);

            if (brand.BrandPic.Trim() != "")
            {
                CommonLibrary.CommOperate.DeleteFile(Server.MapPath(brand.BrandPic.Trim()));
            }
            ImageOperate.DeleteMemoImage(brand.BrandPic.Trim());
            brandbll.DeleteBrand(BrandID);
        }
コード例 #3
0
        protected void DeleteInfo(int id)
        {
            TInformation tinfo = infobll.GetInfo(id);

            #region  逻辑删除  注释掉删除物理图片
            if (tinfo.InfoPic.Trim() != "")
            {
                if (tinfo.InfoPic.Trim().Substring(0, 4) != "http")
                {
                    CommonLibrary.CommOperate.DeleteFile(Server.MapPath(tinfo.InfoPic));
                }
            }
            ImageOperate.DeleteMemoImage(tinfo.InfoMemo);

            #endregion
            infobll.DeleteInfo(id, LoginUser.Admin_ID);
        }
コード例 #4
0
        protected void DeleteNode(int InfoID)
        {
            TBLL.NodeBLL NodeOperate = new NodeBLL();
            TModel.TNode tnode       = new TNode();
            tnode = NodeOperate.GetNode(InfoID);
            DataTable dt = NodeOperate.GetChildNode(InfoID);

            if (dt.Rows.Count > 0)
            {
                CommonLibrary.RunJs.AlertAndBack("请先删除该类别下的子类别再删除该类别");
            }
            else
            {
                if (tnode.NodePic.Trim() != "")
                {
                    CommonLibrary.CommOperate.DeleteFile(Server.MapPath(tnode.NodePic));
                }
                ImageOperate.DeleteMemoImage(tnode.NodeMemo);
                NodeOperate.DeleteNode(InfoID);
            }
        }