Example #1
0
        /// <summary>
        /// 删除关联商品
        /// </summary>
        /// <param name="pid">主商品id</param>
        /// <param name="relatePid">关联商品id</param>
        /// <returns></returns>
        public ActionResult DelRelateProduct(int pid = -1, int relatePid = -1)
        {
            bool result = AdminProducts.DeleteRelateProductByPidAndRelatePid(pid, relatePid);

            if (result)
            {
                AddMallAdminLog("删除关联商品", "删除关联商品品,商品ID为" + pid + "_" + relatePid);
                return(Content("1"));
            }
            else
            {
                return(Content("0"));
            }
        }
Example #2
0
        /// <summary>
        /// 删除关联商品
        /// </summary>
        /// <param name="pid">主商品id</param>
        /// <param name="relatePid">关联商品id</param>
        /// <returns></returns>
        public ActionResult DelRelateProduct(int pid = -1, int relatePid = -1)
        {
            PartProductInfo partProductInfo = AdminProducts.AdminGetPartProductById(pid);

            if (partProductInfo == null || partProductInfo.StoreId != WorkContext.StoreId)
            {
                return(Content("0"));
            }

            bool result = AdminProducts.DeleteRelateProductByPidAndRelatePid(pid, relatePid);

            if (result)
            {
                AddStoreAdminLog("删除关联商品", "删除关联商品品,商品ID为" + pid + "_" + relatePid);
                return(Content("1"));
            }
            else
            {
                return(Content("0"));
            }
        }