Exemple #1
0
 public CartController()
 {
     itemColl     = new CartItemCollection();
     drinkColl    = new DrinkCollection();
     specificColl = new CartItemSpecificsCollection();
     DVM          = new List <CartItemViewModel>();
 }
        private void initialiseDrinks()
        {
            // DrinkCollection = new SeriesCollection();
            DrinkCollection.Clear();
            var drinks = context.drinks.ToList();
            var values = new ChartValues <int>();

            foreach (var drink in drinks)
            {
                values.Add(drink.orders.Count);
            }
            DrinkCollection.Add(
                new ColumnSeries
            {
                Title      = Application.Current.FindResource("Drinks") as string,
                Values     = values,
                DataLabels = true,
                Fill       = Brushes.Red
            }
                );

            List <String> drinkNames = new List <string>();

            foreach (var drink in drinks)
            {
                drinkNames.Add(Application.Current.FindResource(drink.name) as string);
            }
            DrinkLabels = null;
            DrinkLabels = drinkNames.ToArray();
            DataContext = SideLabels;
            DataContext = this;
        }
Exemple #3
0
 public CustomerController()
 {
     customerCollection = new CustomerCollection();
     itemColl           = new CartItemCollection();
     drinkColl          = new DrinkCollection();
     CIM      = new List <CartItemModel>();
     cartColl = new ShoppingCartCollection();
 }
 public AdminController()
 {
     cartColl     = new ShoppingCartCollection();
     itemColl     = new CartItemCollection();
     drinkColl    = new DrinkCollection();
     customerColl = new CustomerCollection();
     specificColl = new CartItemSpecificsCollection();
     CIVM         = new List <CartItemViewModel>();
     drinkVal     = new DrinkValidation();
 }
Exemple #5
0
 public AppController()
 {
     this.costumer        = new User();
     this.drinkCollection = new DrinkCollection();
 }
Exemple #6
0
 public DrinkController()
 {
     drinkcollection = new DrinkCollection();
 }