public static DeliveryDS GetDeliveries(int companyID, int storeNumber, DateTime from, DateTime to) { //Get a list of store locations DeliveryDS deliveries = null; try { _Client = new IssueMgtServiceClient(); deliveries = _Client.GetDeliveries(companyID, storeNumber, from, to); _Client.Close(); } catch (FaultException fe) { throw new ApplicationException("GetDeliveries() service error.", fe); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetDeliveries() timeout error.", te); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetDeliveries() communication error.", ce); } return(deliveries); }