Esempio n. 1
0
 public Customer(SerializationInfo info, StreamingContext ctxt)
 {
     this.Uid = (int)info.GetValue("Uid", typeof(int));
     this.State = (CustomerState)info.GetValue("State", typeof(CustomerState));
     this.Name = (string)info.GetValue("Name", typeof(string));
     this.Order = (Order)info.GetValue("Order", typeof(Order));
     this.Shop = (Shop)info.GetValue("Shop", typeof(Shop));
     this.OrderHistory = (List<Order>)info.GetValue("OrderHistory", typeof(List<Order>));
 }
Esempio n. 2
0
 public void UpdateOrder(Order order)
 {
     this.Orders[order.State - 1].Remove(order);
     this.Orders[order.State].Add(order);
 }
Esempio n. 3
0
 public void DeliverOrder(Order order)
 {
     order.Deliver();
     this.UpdateOrder(order);
 }
Esempio n. 4
0
 public void AddOrder(Order order)
 {
     this.Orders[OrderState.UnderConstruction].Add(order);
 }
Esempio n. 5
0
 public void enterShop(Shop shop)
 {
     this.Shop = shop;
     this.Order = new Order(this, this.Shop);
     this.State = CustomerState.Shopping;
 }