コード例 #1
0
 private void btnDeleteAll_Click(object sender, System.EventArgs e)
 {
     if (SubsitePromoteHelper.DeletePromotionProducts(this.activityId, null))
     {
         base.Response.Redirect(System.Web.HttpContext.Current.Request.Url.ToString(), true);
     }
 }
コード例 #2
0
 private void grdPromotionProducts_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e)
 {
     if (SubsitePromoteHelper.DeletePromotionProducts(this.activityId, new int?((int)this.grdPromotionProducts.DataKeys[e.RowIndex].Value)))
     {
         base.Response.Redirect(System.Web.HttpContext.Current.Request.Url.ToString(), true);
     }
 }
コード例 #3
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 (SubsitePromoteHelper.DeletePromotionProducts(activeId, item))
            {
                BindPromoteProducts();
            }
        }
コード例 #4
0
 private void btnClear_Click(object sender, EventArgs e)
 {
     ProductIds = null;
     SubsitePromoteHelper.DeletePromotionProducts(activeId);
     ReBind(false);
 }