Exemple #1
0
        public DataResponse GetOrder(Order order)
        {
            var orderResult = _blackstonePosService.GetItem(_orderRepository, order.Id);

                var status = orderResult != null ? 200 : 201;

                var message = orderResult != null ? string.Empty : "Order Not Found";

                var data = orderResult;

                return new DataResponse
                {
                    Data = data,
                    Status = status,
                    ErrorMessage = message
                };
        }
Exemple #2
0
        public BaseResponse AddOrder(Order order)
        {
            var addingOrderResult = _blackstonePosService.AddItem(_orderRepository, order);

            var status = addingOrderResult != null ? 200 : 201;

            var message = addingOrderResult != null ? string.Empty : "Erros trying to add an order.";

            return new BaseResponse
            {
                Status = status,
                ErrorMessage = message
            };
        }