Пример #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here

            SetContentView(Resource.Layout.CartView);

            _cartDataService      = new CartDataService();
            _cartListView         = FindViewById <ListView>(Resource.Id.cartListView);
            _cartItems            = _cartDataService.GetCart().CartItems;
            _cartListView.Adapter = new CartAdapter(this, _cartItems);
        }
Пример #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.CartView);

            cartDataService = new CartDataService();

            cartListView = FindViewById <ListView>(Resource.Id.cartListView);

            var orderButton = FindViewById <Button>(Resource.Id.placeOrderButton);

            orderButton.Click += OrderButton_Click;

            cartItems            = cartDataService.GetCart().CartItems;
            cartListView.Adapter = new CartAdapter(this, cartItems);
        }
Пример #3
0
        public CartViewPage()
        {
            InitializeComponent();

            cartDataService = new CartDataService();
            Items           = new ObservableCollection <Models.CartItem>();

            MyListView.ItemsSource = cartDataService.GetCart().CartItems;

            MyListView.HasUnevenRows = true;

            TotalLabel.Text = cartDataService.GetCartTotal().ToString("C2");

            CheckoutButton.Clicked += CheckoutButton_Clicked;

            ContinueOrderingButton.Clicked += ContinueOrderingButton_Clicked;
        }
Пример #4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.CartView);

            cartDataService = new CartDataService();

            FindViews();

            cartItems            = cartDataService.GetCart().CartItems;
            cartListView.Adapter = new CartAdapter(this, cartItems);

            BindData();

            HandleEvents();
        }
Пример #5
0
 public CartDataSource()
 {
     cartDataService = new CartDataService();
     cartItems       = cartDataService.GetCart().CartItems;
 }
Пример #6
0
 private void InitializeData()
 {
     CartItems = CartDataService.GetCart().CartItems.ToObservableCollection();
 }