private void _addToCartButton_Click(object sender, EventArgs e)
        {
            ShoppingCartRepository.AddToShoppingCart(_selectedPie, int.Parse(this._amountEditText.Text));
            Toast.MakeText(Application.Context, "Pie added to the cart", ToastLength.Long).Show();

            //this.Finish() will remove the current activity from the stack.
            this.Finish();
        }
Example #2
0
        private void AddToCartButton_Click(object sender, EventArgs e)
        {
            var amount = int.Parse(_amountEditText.Text);
            ShoppingCartRepository cartRepository = new ShoppingCartRepository();

            cartRepository.AddToShoppingCart(_selectedPie, amount);
            Toast.MakeText(Application.Context, "Pie added to cart", ToastLength.Long).Show();
            this.Finish();
        }