Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 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;
     }
 }