Exemple #1
0
        public static bool CloseZone(Zone zone)
        {
            //
            bool closed = false;
            ZoneClosingServiceClient client = new ZoneClosingServiceClient();

            try {
                closed = client.CloseZone(int.Parse(Program.TerminalCode), zone);
                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(closed);
        }