public ActionResult DeleteGoods(int deleteGoodsId)
        {
            string phone = Session["mem_phone"].ToString();

            ShopBusinessLogic.SellerSell sellerSell = new ShopBusinessLogic.SellerSell();

            sellerSell.deleteGoods(phone, deleteGoodsId);

            string nowpath = savepath + phone + @"\" + deleteGoodsId.ToString();

            if (Directory.Exists(nowpath))
            {
                Directory.Delete(nowpath, true);
            }

            return(Redirect("/SellHome"));
        }
        public ActionResult DeleteGoods(int deleteGoodsId)
        {
            string phone = Session["mem_phone"].ToString();

            ShopBusinessLogic.SellerSell     sellerSell = new ShopBusinessLogic.SellerSell();
            ShopBusinessLogic.MemberPurchase purchase   = new ShopBusinessLogic.MemberPurchase();

            sellerSell.deleteGoods(phone, deleteGoodsId);

            string nowpath = savepath + phone + @"\" + deleteGoodsId.ToString();

            if (Directory.Exists(nowpath))
            {
                Directory.Delete(nowpath, true);
            }

            var sell_goods_list = sellerSell.getAllSellGoods(phone).Select(goods_info => new SellGoodsViewModel()
            {
                goods_id       = goods_info.goods_id,
                goods_name     = goods_info.goods_name,
                goods_tag      = goods_info.goods_tag,
                goods_img_path = goods_info.goods_img_path,
                goods_price    = goods_info.goods_price,
                sell_stock     = goods_info.goods_stock,
                sell_volume    = goods_info.goods_volume,
            }).ToList();
            var tag_list = purchase.getAllTags().Select(tag => new GoodsTag()
            {
                goods_tag = tag.tag,
            }).ToList();
            var resView = new SellGoodsViewModel()
            {
                total_sell_goods = sell_goods_list,
                total_goods_tags = tag_list,
            };

            return(PartialView("SellHomePart1", resView));
        }