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