Exemplo n.º 1
0
        private void grdPromoteSales_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e)
        {
            int activityId = (int)this.grdPromoteSales.DataKeys[e.RowIndex].Value;

            if (PromoteHelper.DeletePromotion(activityId))
            {
                this.ShowMsg("成功删除了选择的促销活动", true);
                this.BindProductPromotions();
                return;
            }
            this.ShowMsg("删除失败", false);
        }
Exemplo n.º 2
0
        private void grdPromoteSales_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            int activityId = (int)grdPromoteSales.DataKeys[e.RowIndex].Value;

            if (PromoteHelper.DeletePromotion(activityId))
            {
                ShowMsg("成功删除了选择的促销活动", true);
                BindPromoteSales();
            }
            else
            {
                ShowMsg("删除失败", false);
            }
        }
Exemplo n.º 3
0
        public void Delete(HttpContext context)
        {
            int value = base.GetIntParam(context, "id", false).Value;

            if (value < 1)
            {
                throw new HidistroAshxException("错误的活动编号");
            }
            if (PromoteHelper.DeletePromotion(value))
            {
                base.ReturnSuccessResult(context, "成功删除了选择的促销活动", 0, true);
                return;
            }
            throw new HidistroAshxException("删除失败");
        }