Esempio n. 1
0
        private async void RemoveCoupon_Tapped(object sender, EventArgs e)
        {
            try
            {
                string CouponId = null;
                if (CheckoutPage.coupon != null)
                {
                    CouponId = CheckoutPage.coupon.id.ToString();
                }
                if (!string.IsNullOrEmpty(CouponCodeId))
                {
                    CouponId = CouponCodeId;
                }

                Config.ShowDialog();
                var response = await CartLogic.RemoveCoupon(Application.Current.Properties["user_id"].ToString(), CouponId);

                if (response.status == 200)
                {
                    Config.HideDialog();
                    getData();
                    //Config.SnackbarMessage(response.message);
                }
                else
                {
                    Config.HideDialog();
                    //Config.ErrorSnackbarMessage(response.message);
                }
            }
            catch
            {
                Config.HideDialog();
            }
        }