Exemplo n.º 1
0
        public ActionResult DeleteVersion(int VersionId, int GoodsId)
        {
            var versions = goodsService.GetGoodsVersionsByGoodsId(GoodsId);

            if (versions.Count > 1)
            {
                goodsService.DeleteVersion(VersionId);
            }
            else
            {
                TempData["forbid_delete"] = "必须保证有一个版本!";
            }
            return(RedirectToAction("EditGoods", new { GoodsId }));
        }