Example #1
0
 protected void grid_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "DeleteCoupon")
     {
         CouponService.DeleteCoupon(Convert.ToInt32(e.CommandArgument));
     }
 }
Example #2
0
 protected void grid_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "DeleteCoupon")
     {
         CouponService.DeleteCoupon(SQLDataHelper.GetInt(e.CommandArgument));
     }
 }
Example #3
0
        public void DeleteCoupon()
        {
            var couponCommand = new CouponDeleted()
            {
                CouponID = 5
            };
            var response = couponService.DeleteCoupon(couponCommand);

            Assert.AreEqual(response.Type, Common.ServiceResponseTypes.Success);
        }
Example #4
0
 protected void lbDeleteSelected_Click(object sender, EventArgs e)
 {
     if ((_selectionFilter != null) && (_selectionFilter.Values != null))
     {
         if (!_inverseSelection)
         {
             foreach (var id in _selectionFilter.Values)
             {
                 CouponService.DeleteCoupon(Convert.ToInt32(id));
             }
         }
         else
         {
             var itemsIds = _paging.ItemsIds <int>("CouponID as ID");
             foreach (int couponeId in itemsIds.Where(cId => !_selectionFilter.Values.Contains(cId.ToString(CultureInfo.InvariantCulture))))
             {
                 CouponService.DeleteCoupon(couponeId);
             }
         }
     }
 }