Exemple #1
0
        public Checkout(MyHome myHome1)
        {
            InitializeComponent();
            myHome = myHome1;
            this.BindingContext = myHome;

            foreach (Product prod in myHome1.Cart)
            {
                totalPrice += prod.Price;
            }

            total.Text    = String.Format("Total: {0:0.00}", (totalPrice).ToString());
            tax.Text      = String.Format("Total: {0:0.00}", (totalPrice * 0.07).ToString());
            totalTax.Text = String.Format("Total: {0:0.00}", (totalPrice * 1.07).ToString());
        }
Exemple #2
0
        public CartSelectionPage(ObservableCollection <Product> p, Product product, double number, MyHome home)
        {
            InitializeComponent();

            cartName.Text        = product.Name;
            cartPrice.Text       = "Price: $" + product.PriceSingle;
            onCart.Text          = "On cart: " + number.ToString();
            cartDescription.Text = product.Description;
            sliderC.Minimum      = 1;
            sliderC.Maximum      = (int)number;
            sliderCart.Text      = "Selected: 1";
            pr   = p;
            prod = product;
            Home = home;
        }
Exemple #3
0
        public SelectionPage(string Name, double Price, string Description, int ID, double units_ounces, Product product, ObservableCollection <Product> p, MyHome home)
        {
            InitializeComponent();

            testName.Text        = product.Name;
            testPrice.Text       = "Price: $" + product.PriceSingle;
            testInventory.Text   = "Inventory: " + units_ounces.ToString();
            testDescription.Text = Description;
            slider.Minimum       = 1;
            slider.Maximum       = units_ounces;
            sliderNumber.Text    = "Value: 1";
            pr   = p;
            Home = home;

            prod = product;
        }
Exemple #4
0
 public MyCart(MyHome myHome1)
 {
     InitializeComponent();
     myHome = myHome1;
     this.BindingContext = myHome;
 }