public static void WriteLogEntry(TraceMessage m) { //Get the operating enterprise terminal try { _Client = new InvoicingServiceClient(); _Client.WriteLogEntry(m); _Client.Close(); } catch (FaultException fe) { throw new ApplicationException("WriteLogEntry() service error.", fe); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("WriteLogEntry() timeout error.", te); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("WriteLogEntry() communication error.", ce); } }
public static Clients GetClients() { //Get client list Clients clients = null; try { _Client = new InvoicingServiceClient(); clients = _Client.GetClients(); _Client.Close(); } catch (FaultException fe) { throw new ApplicationException("GetClients() service error.", fe); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetClients() timeout error.", te); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetClients() communication error.", ce); } return(clients); }
public static TerminalInfo GetTerminalInfo() { //Get the operating enterprise terminal TerminalInfo terminal = null; try { _Client = new InvoicingServiceClient(); terminal = _Client.GetTerminalInfo(); _Client.Close(); } catch (FaultException fe) { throw new ApplicationException("GetTerminalInfo() service error.", fe); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetTerminalInfo() timeout error.", te); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetTerminalInfo() communication error.", ce); } return(terminal); }
public static Invoices GetClientInvoices(string clientNumber, string clientDivision, string startDate) { //Get invoices for the specified client Invoices invoices = null; try { _Client = new InvoicingServiceClient(); invoices = _Client.GetClientInvoices(clientNumber, clientDivision, startDate); _Client.Close(); } catch (FaultException fe) { throw new ApplicationException("GetClientInvoices() service error.", fe); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetClientInvoices() timeout error.", te); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetClientInvoices() communication error.", ce); } return(invoices); }
public static UserConfiguration GetUserConfiguration(string application, string[] usernames) { //Get the operating enterprise terminal UserConfiguration config = null; try { _Client = new InvoicingServiceClient(); config = _Client.GetUserConfiguration(application, usernames); _Client.Close(); } catch (FaultException fe) { throw new ApplicationException("GetUserConfiguration() service error.", fe); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetUserConfiguration() timeout error.", te); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetUserConfiguration() communication error.", ce); } return(config); }
public static void WriteLogEntry(TraceMessage m) { //Get the operating enterprise terminal InvoicingServiceClient client = null; try { client = new InvoicingServiceClient(); client.WriteLogEntry(m); 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); } }
public static UserConfiguration GetUserConfiguration(string application, string[] usernames) { //Get the operating enterprise terminal UserConfiguration config = null; InvoicingServiceClient client = null; try { client = new InvoicingServiceClient(); config = client.GetUserConfiguration(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; InvoicingServiceClient client = null; try { client = new InvoicingServiceClient(); terminal = client.GetServiceInfo(); 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 InvoicingDataset GetClients() { //Get client list InvoicingDataset clients = new InvoicingDataset(); InvoicingServiceClient client = null; try { client = new InvoicingServiceClient(); DataSet ds = client.GetClients(); if (ds.Tables["ClientTable"] != null && ds.Tables["ClientTable"].Rows.Count > 0) { clients.Merge(ds); } client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <InvoicingFault> 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(clients); }
public static InvoicingDataset GetClientInvoices(string clientNumber, string clientDivision, string startDate) { //Get invoices for the specified client InvoicingDataset invoices = new InvoicingDataset(); InvoicingServiceClient client = null; try { client = new InvoicingServiceClient(); DataSet ds = client.GetClientInvoices(clientNumber, clientDivision, startDate); if (ds.Tables["ClientInvoiceTable"] != null && ds.Tables["ClientInvoiceTable"].Rows.Count > 0) { invoices.Merge(ds); } client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <InvoicingFault> 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(invoices); }