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>)); }
public void UpdateOrder(Order order) { this.Orders[order.State - 1].Remove(order); this.Orders[order.State].Add(order); }
public void DeliverOrder(Order order) { order.Deliver(); this.UpdateOrder(order); }
public void AddOrder(Order order) { this.Orders[OrderState.UnderConstruction].Add(order); }
public void enterShop(Shop shop) { this.Shop = shop; this.Order = new Order(this, this.Shop); this.State = CustomerState.Shopping; }