Example #1
0
        public static DateTime GetExportDate()
        {
            //Get the latest delivery point LastUpdated date from the last export
            DateTime date = DateTime.Now;

            try {
                _Client = new DeliveryPointsServiceClient();
                date    = _Client.GetExportDate();
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetExportDate() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetExportDate() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetExportDate() communication error.", ce); }
            return(date);
        }
Example #2
0
        public static DateTime GetExportDate()
        {
            //Get the latest delivery point LastUpdated date from the last export
            DateTime date = DateTime.Now;
            DeliveryPointsServiceClient client = new DeliveryPointsServiceClient();

            try {
                date = client.GetExportDate();
                client.Close();
            }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); }
            catch (FaultException <TerminalsFault> dfe) { client.Abort(); throw new ApplicationException(dfe.Detail.Message); }
            catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); }
            catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); }
            return(date);
        }