public GetEstimatedDeliveryTimeResponse GetEstimatedDeliveryTime(GetEstimatedDeliveryTimeRequest request) { GetEstimatedDeliveryTimeResponse response = new GetEstimatedDeliveryTimeResponse(); ProductBusinessComponent bc = DependencyInjectionHelper.GetProductBusinessComponent(); int unitsAvailable = default(int); int estimatedDeliveryTime = -1; bc.GetEstimatedDeliveryTime(request.Id, out unitsAvailable, out estimatedDeliveryTime); response.EstimatedDeliveryTime = estimatedDeliveryTime; response.UnitsAvailable = unitsAvailable; return(response); }
public void GetEstimatedDeliveryTime(int productId, out int unitsAvailable, out int estimatedDeliveryTime) { unitsAvailable = default(int); estimatedDeliveryTime = -1; try { GetEstimatedDeliveryTimeRequest request = new GetEstimatedDeliveryTimeRequest(); request.Id = productId; GetEstimatedDeliveryTimeResponse response = Service.GetEstimatedDeliveryTime(request); unitsAvailable = response.UnitsAvailable; estimatedDeliveryTime = response.EstimatedDeliveryTime; } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, "PL Policy")) { throw; } } }