Esempio n. 1
0
 private void GiftWrapCheck_Unchecked(object sender, RoutedEventArgs e)
 {
     Total             -= 10;
     OtherFeesValue    -= 10;
     OtherFees.Text     = OtherFeesValue.ToString("0.0#") + " " + Currency;
     OrderTotalPay.Text = Total.ToString("0.0#") + " " + Currency;
 }
Esempio n. 2
0
        private async void InitializeCheckout()
        {
            Currency = await api.GetCurrency();

            var CustomerTmp = await api.GetCustomersByEmail(Helpers.Helper.CurrentCustomer());

            Customer = CustomerTmp.First();
            var AddressesA = new List <AddressData>();

            foreach (AddressDTO a in Customer.Addresses)
            {
                AddressesA.Add(new AddressData {
                    Address = a.Firstname + " " + a.Lastname + "," + a.Phone + "," + a.Street + "," + a.City + "," + a.PostalCode + "," + a.Country, Id = a.Id
                });
            }

            var ShippingM = new List <string>(await api.GetShippingMethods()).Distinct();

            ShippingMethodPicker.ItemsSource = ShippingM;
            BillingPicker.ItemsSource        = AddressesA;
            ShippingPicker.ItemsSource       = AddressesA;
            PaymentPicker.ItemsSource        = await api.GetPaymentMethods();

            decimal SubTotalValue = 0;

            foreach (CartItemDTO c in Customer.ShoppingCart)
            {
                SubTotalValue += c.Product.Price * c.Quantity;
            }

            var ShipTmp = await api.GetShippingFees(Customer.Id);

            var TaxTmp = await api.GetTaxFees(Customer.Id);

            ShippingFees.Text  = ShipTmp.ToString("0.0");
            OtherFees.Text     = TaxTmp.ToString("0.0");
            SubTotal.Text      = SubTotalValue.ToString("0.0#") + " " + Currency;
            ShippingFees.Text  = ShippingFeesValue.ToString("0.0#") + " " + Currency;;
            OtherFees.Text     = OtherFeesValue.ToString("0.0#") + " " + Currency;
            Total              = SubTotalValue + ShippingFeesValue + OtherFeesValue;
            OrderTotalPay.Text = Total.ToString("0.0#") + " " + Currency;
            HideLoading();
        }