Esempio n. 1
0
        //Interface
        static ReportsGateway()
        {
            //
            AgentLineHaulServiceClient client = new AgentLineHaulServiceClient();

            _state   = true;
            _address = client.Endpoint.Address.Uri.AbsoluteUri;
        }
Esempio n. 2
0
        public static DataSet InboundManifestRead(string manifestID)
        {
            //
            DataSet manifest = new DataSet();
            AgentLineHaulServiceClient client = new AgentLineHaulServiceClient();

            try {
                DataSet ds = client.InboundManifestRead(manifestID);
                if (ds != null)
                {
                    manifest.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(manifest);
        }
Esempio n. 3
0
        public static DataSet InboundManifestsView(string clientNumber, string clientDivision, DateTime startPickupDate, DateTime endPickupDate)
        {
            //
            DataSet manifests = new DataSet();
            AgentLineHaulServiceClient client = new AgentLineHaulServiceClient();

            try {
                DataSet ds = client.InboundManifestsView(clientNumber, clientDivision, startPickupDate, endPickupDate);
                if (ds != null)
                {
                    manifests.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(manifests);
        }