public static void WriteLogEntry(TraceMessage m) { //Get the operating enterprise terminal ISDExportServiceClient client = new ISDExportServiceClient(); try { client.WriteLogEntry(int.Parse(Program.TerminalCode), m); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); } }
public static UserConfiguration GetUserConfiguration(string application, string[] usernames) { //Get the operating enterprise terminal UserConfiguration config = null; ISDExportServiceClient client = new ISDExportServiceClient(); try { config = client.GetUserConfiguration(int.Parse(Program.TerminalCode), application, usernames); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <ConfigurationFault> cfe) { client.Abort(); throw new ApplicationException(cfe.Detail.Message); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); } return(config); }
public static ServiceInfo GetServiceInfo() { //Get the operating enterprise terminal ServiceInfo terminal = null; ISDExportServiceClient client = new ISDExportServiceClient(); try { terminal = client.GetServiceInfo(int.Parse(Program.TerminalCode)); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <ConfigurationFault> cfe) { client.Abort(); throw new ApplicationException(cfe.Detail.Message); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); } return(terminal); }
public static bool DeleteISDClient(ISDClient isdClient) { // bool deleted = false; ISDExportServiceClient client = new ISDExportServiceClient(); try { deleted = client.DeleteISDClient(int.Parse(Program.TerminalCode), isdClient); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <AgentLineHaulFault> afe) { client.Abort(); throw new ApplicationException(afe.Detail.Message); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); } return(deleted); }
public static string GetExportFilename(string counterKey) { // string filename = ""; ISDExportServiceClient client = new ISDExportServiceClient(); try { filename = client.GetExportFilename(int.Parse(Program.TerminalCode), counterKey); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <AgentLineHaulFault> afe) { client.Abort(); throw new ApplicationException(afe.Detail.Message); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); } return(filename); }
public static ISDExportDataset GetPickups(DateTime pickupDate) { // ISDExportDataset pickups = new ISDExportDataset(); ISDExportServiceClient client = new ISDExportServiceClient(); try { DataSet ds = client.GetPickups(int.Parse(Program.TerminalCode), pickupDate); if (ds != null) { pickups.Merge(ds); } client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <AgentLineHaulFault> afe) { client.Abort(); throw new ApplicationException(afe.Detail.Message); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); } return(pickups); }