private void btnDeleteAll_Click(object sender, System.EventArgs e)
 {
     if (PromoteHelper.DeletePromotionProducts(this.activityId, null))
     {
         base.Response.Redirect(System.Web.HttpContext.Current.Request.Url.ToString(), true);
     }
 }
 private void grdPromotionProducts_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e)
 {
     if (PromoteHelper.DeletePromotionProducts(this.activityId, new int?((int)this.grdPromotionProducts.DataKeys[e.RowIndex].Value)))
     {
         base.Response.Redirect(System.Web.HttpContext.Current.Request.Url.ToString(), true);
     }
 }
Exemple #3
0
 public void Clear(HttpContext context)
 {
     if (PromoteHelper.DeletePromotionProducts(this.activityId, null))
     {
         base.ReturnSuccessResult(context, "成功清空了促销活动的所有商品", 0, true);
         return;
     }
     throw new HidistroAshxException("清空失败");
 }
Exemple #4
0
        private void dlstSearchProducts_DeleteCommand(object source, DataListCommandEventArgs e)
        {
            IList <int> productIds = ProductIds;
            int         itemIndex  = e.Item.ItemIndex;
            int         item       = int.Parse(dlstSearchProducts.DataKeys[itemIndex].ToString());

            productIds.Remove(item);
            ProductIds = productIds;
            if (PromoteHelper.DeletePromotionProducts(activeId, item))
            {
                BindPromoteProducts();
            }
        }
Exemple #5
0
        public void Delete(HttpContext context)
        {
            int value = base.GetIntParam(context, "id", false).Value;

            if (value < 1)
            {
                throw new HidistroAshxException("错误的商品编号");
            }
            if (PromoteHelper.DeletePromotionProducts(this.activityId, value))
            {
                base.ReturnSuccessResult(context, "成功删除了选择的促销活动商品", 0, true);
                return;
            }
            throw new HidistroAshxException("删除失败");
        }
Exemple #6
0
 private void btnClear_Click(object sender, EventArgs e)
 {
     ProductIds = null;
     PromoteHelper.DeletePromotionProducts(activeId);
     ReBind(false);
 }