//--------------------------------------------------------------- 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; }
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(""); } }
private void UpdateStatus(Order order, ORDER_STATUS status) { order.Status = status; this.Update(order); }