private async void BtnAddToCart_Clicked(object sender, EventArgs e) { var addToCart = new AddToCart(); addToCart.CustomerId = Preferences.Get("user_id", 0); addToCart.Qty = LblQty.Text; addToCart.Price = LblPrice.Text; addToCart.TotalAmount = LblTotalPrice.Text; addToCart.ProductId = _productId; var response = await APIService.AddItemsToCart(addToCart); if (response) { await DisplayAlert("", "Your items has been added to the cart", "OK"); } else { await DisplayAlert("Oops", "Something went wrong", "Cancel"); } }