Esempio n. 1
0
        public void Delete(HttpContext context)
        {
            int?intParam = base.GetIntParam(context, "preSaleId", false);

            if (!intParam.HasValue)
            {
                throw new HidistroAshxException("错误的编号");
            }
            if (ProductPreSaleHelper.IsPreSaleHasOrder(intParam.Value))
            {
                throw new HidistroAshxException("该预售已产生订单,不能删除!");
            }
            if (ProductPreSaleHelper.DeletePreSale(intParam.Value))
            {
                base.ReturnSuccessResult(context, "删除成功", 0, true);
                return;
            }
            throw new HidistroAshxException("删除失败!");
        }