コード例 #1
0
        //---------------------------------------------------------------

        public Order(int customerId, DateTime orderDate, string address, string phoneNumber, ORDER_STATUS status = ORDER_STATUS.NEW)
        {
            CustomerId  = customerId;
            OrderDate   = orderDate;
            Address     = address;
            PhoneNumber = phoneNumber;
            Status      = status;
        }
コード例 #2
0
        public static string Convert(ORDER_STATUS status)
        {
            switch (status)
            {
            case ORDER_STATUS.NEW: return("Order received");

            case ORDER_STATUS.CHECKED: return("Processed");

            case ORDER_STATUS.DELIVERING: return("Shipping");

            case ORDER_STATUS.DELIVERED: return("Completed");

            case ORDER_STATUS.CANCELLED: return("Canceled");

            case ORDER_STATUS.CANCELLED_DELIVERY: return("Cancelled shipping");

            default: return("");
            }
        }
コード例 #3
0
 private void UpdateStatus(Order order, ORDER_STATUS status)
 {
     order.Status = status;
     this.Update(order);
 }