Exemplo n.º 1
0
        public static bool UnassignTL(string tlNumber)
        {
            //Unassign an open TL from this trip
            bool unassigned = false;
            ZoneClosingServiceClient client = new ZoneClosingServiceClient();

            try {
                unassigned = client.UnassignTL(int.Parse(Program.TerminalCode), tlNumber);
                client.Close();
                RefreshTrips();
            }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); }
            catch (FaultException <ShipScheduleFault> 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(unassigned);
        }