public static bool UpdateExportDate(DateTime lastUpdated) { //Update the latest delivery point LastUpdated date from the last export bool updated = false; try { _Client = new DeliveryPointsServiceClient(); updated = _Client.UpdateExportDate(lastUpdated); _Client.Close(); } catch (FaultException fe) { throw new ApplicationException("UpdateExportDate() service error.", fe); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("UpdateExportDate() timeout error.", te); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("UpdateExportDate() communication error.", ce); } return(updated); }
public static bool UpdateExportDate(DateTime lastUpdated) { //Update the latest delivery point LastUpdated date from the last export bool updated = false; DeliveryPointsServiceClient client = new DeliveryPointsServiceClient(); try { updated = client.UpdateExportDate(lastUpdated); 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(updated); }