Example #1
0
        public static InboundShipment GetInboundShipment(string freightID)
        {
            //Return the inbound shipment for the specified terminal and freightID
            InboundShipment            shipment = null;
            FreightAssignServiceClient client   = new FreightAssignServiceClient();

            try {
                shipment = client.GetInboundShipment(int.Parse(Program.TerminalCode), freightID);
                client.Close();
            }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); }
            catch (FaultException <TsortFault> 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(shipment);
        }