Exemple #1
0
        public OrderResponse RemoveOrder(int orderNumber, DateTime date)
        {
            OrderResponse response = new OrderResponse();
            Order         order    = repo.FindOrderByOrderNumber(orderNumber, date.ToString("MMddyyyy"));

            if (order == null)
            {
                response.Success = false;
                response.Message = "Order cannot be found.";
                return(response);
            }

            repo.RemoveOrder(orderNumber, date.ToString("MMddyyyy"));
            response.Success = true;

            return(response);
        }