Esempio n. 1
0
 public Order(string product, Supplier supplier, int volume, Customer customer)
 {
     this.Product = product;
     this.Supplier = supplier;
     this.Volume = volume;
     this.Customer = customer;
 }
Esempio n. 2
0
        public void Initialise()
        {
            Supplier ms = new Supplier("Microsoft", "Redmond");
            Supplier google = new Supplier("Google", "Mountain View");
            Supplier mcDonalds = new Supplier("McDonald's", "Everywhere");
            Customer jack = new Customer("Jack", "Cambridge");
            Customer david = new Customer("David", "Cambridge");
            Customer james = new Customer("James", "Cambridge");
            Customer brenda = new Customer("Brenda", "Aberdeen");
            Customer morag = new Customer("Morag", "Aberdeen");
            Customer will = new Customer("William Wallace", "Glasgow");

            Orders = new ObservableCollection<Order> {
                new Order("VS2012", ms, 57, jack),
                new Order("Happy meal", mcDonalds, 1, morag),
                new Order("Google car", google, 3, james),
                new Order("MS Word", ms, 1, david),
                new Order("Nexus 7", google, 1, brenda),
                new Order("Haggis", mcDonalds, 50, will)
            };
        }