コード例 #1
0
        public static DateTime FindShipSchedule(string tlNumber)
        {
            //Find a ship schedule that contains the specified TL
            DateTime scheduleDate           = DateTime.MinValue;
            ZoneClosingServiceClient client = new ZoneClosingServiceClient();

            try {
                scheduleDate = client.FindShipSchedule(int.Parse(Program.TerminalCode), tlNumber);
                client.Close();
            }
            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(scheduleDate);
        }