public static void UpdateCouponUserRecord(CouponSession coupon, int storeID, int portalID, string userName, int orderID)
 {
     try
     {
         List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >();
         parameter.Add(new KeyValuePair <string, object>("@CouponCode", coupon.Key));
         parameter.Add(new KeyValuePair <string, object>("@StoreID", storeID));
         parameter.Add(new KeyValuePair <string, object>("@PortalID", portalID));
         parameter.Add(new KeyValuePair <string, object>("@UserName", userName));
         parameter.Add(new KeyValuePair <string, object>("@CouponUsedCount", coupon.AppliedCount));
         parameter.Add(new KeyValuePair <string, object>("@OrderID", orderID));
         SQLHandler sqlH = new SQLHandler();
         sqlH.ExecuteNonQuery("usp_Aspx_UpdateCouponUserRecord", parameter);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public static void ReduceCouponUsed(CouponSession coupon, int storeID, int portalID, string userName, int orderID)
 {
     AspxCouponManageController.UpdateCouponUserRecord(coupon, storeID, portalID, userName, orderID);
 }
        ////-------------------Verify Coupon Code-----------------------------
        //[WebMethod]
        //public CouponVerificationInfo VerifyCouponCode(decimal totalCost, string couponCode, string itemIds, string cartItemIds, AspxCommonInfo aspxCommonObj, int appliedCount)
        //{
        //    try
        //    {
        //        CouponVerificationInfo objCoupVeri = AspxCouponManageController.VerifyUserCoupon(totalCost, couponCode, itemIds, cartItemIds, aspxCommonObj, appliedCount);
        //        return objCoupVeri;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}

        //--------update wherever necessary after coupon verification is successful----------

        public void UpdateCouponUserRecord(CouponSession coupon, int storeID, int portalID, string userName, int orderID)
        {
            try
            {
                AspxCouponManageController.UpdateCouponUserRecord(coupon, storeID, portalID, userName, orderID);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 public static void ReduceCouponUsed(CouponSession coupon, int storeID, int portalID, string userName, int orderID)
 {
     AspxCouponManageController.UpdateCouponUserRecord(coupon, storeID, portalID, userName, orderID);
 }
        public static void UpdateCouponUserRecord(CouponSession coupon, int storeID, int portalID, string userName, int orderID)
        {
            try
            {
                List<KeyValuePair<string, object>> parameter = new List<KeyValuePair<string, object>>();
                parameter.Add(new KeyValuePair<string, object>("@CouponCode", coupon.Key));
                parameter.Add(new KeyValuePair<string, object>("@StoreID", storeID));
                parameter.Add(new KeyValuePair<string, object>("@PortalID", portalID));
                parameter.Add(new KeyValuePair<string, object>("@UserName", userName));
                parameter.Add(new KeyValuePair<string, object>("@CouponUsedCount", coupon.AppliedCount));
                parameter.Add(new KeyValuePair<string, object>("@OrderID", orderID));
                SQLHandler sqlH = new SQLHandler();
                sqlH.ExecuteNonQuery("usp_Aspx_UpdateCouponUserRecord", parameter);

            }
            catch (Exception ex)
            {

                throw ex;
            }

        }