Beispiel #1
0
        //Interface
        static AgentLineHaulGateway()
        {
            //
            ISDExportServiceClient client = new ISDExportServiceClient();

            _state   = true;
            _address = client.Endpoint.Address.Uri.AbsoluteUri;
        }
Beispiel #2
0
        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); }
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        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);
        }
Beispiel #6
0
        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);
        }
Beispiel #7
0
        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);
        }