/// <summary> /// 删除商品属性 /// </summary> /// <param name="pid">商品id</param> /// <param name="attrId">属性id</param> /// <returns></returns> public ActionResult DelProductAttribute(int pid = -1, int attrId = -1) { bool result = AdminProducts.DeleteProductAttributeByPidAndAttrId(pid, attrId); if (result) { AddMallAdminLog("删除商品属性", "删除商品属性,商品属性ID:" + pid + "_" + attrId); return(Content("1")); } else { return(Content("0")); } }
/// <summary> /// 删除商品属性 /// </summary> /// <param name="pid">商品id</param> /// <param name="attrId">属性id</param> /// <returns></returns> public ActionResult DelProductAttribute(int pid = -1, int attrId = -1) { PartProductInfo partProductInfo = AdminProducts.AdminGetPartProductById(pid); if (partProductInfo == null || partProductInfo.StoreId != WorkContext.StoreId) { return(Content("0")); } bool result = AdminProducts.DeleteProductAttributeByPidAndAttrId(pid, attrId); if (result) { AddStoreAdminLog("删除商品属性", "删除商品属性,商品属性ID:" + pid + "_" + attrId); return(Content("1")); } else { return(Content("0")); } }