Inheritance: Enumeration
示例#1
0
        public void Place()
        {
            if (Status == OrderStatus.Shipped || Status == OrderStatus.Placed) return;

            PlaceDate = SystemTime.Now();
            Status = OrderStatus.Placed;
        }
示例#2
0
        public void Ship()
        {
            if (Status == OrderStatus.Shipped || Status == OrderStatus.Draft) return;

            ShipDate = SystemTime.Now();
            Status = OrderStatus.Shipped;
        }