Пример #1
0
        private ErpService.ShippingInfo ErpProcessOrder(Order order)
        {
            ErpService.ShippingInfo info = ErpService.ProcessOrder(order);
            if (info.Status == ErpService.ShippingStatus.Success)
            {
                return(info);
            }

            throw new ErpService.ErpException("Info status = " + info.Status);
        }
Пример #2
0
        private Result <ErpService.ShippingInfo> ErpProcessOrder(Order order)
        {
            return(Result <ErpService.ShippingInfo> .ToResult(() =>
            {
                ErpService.ShippingInfo info = ErpService.ProcessOrder(order);
                if (info.Status == ErpService.ShippingStatus.Success)
                {
                    return info;
                }

                throw new ErpService.ErpException("Info status = " + info.Status);
            }));
        }