Пример #1
0
        public static bool UpdateTemplate(ShipScheduleTemplate template)
        {
            //
            bool ret = false;

            try {
                _Client = new ShipScheduleServiceClient();
                ret     = _Client.UpdateTemplate(template);
                _Client.Close();
            }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException(te.Message, te.InnerException); }
            catch (FaultException <ShipScheduleFault> ssf) { throw new ApplicationException(ssf.Reason.ToString(), ssf.InnerException); }
            catch (FaultException fe) { throw new ApplicationException(fe.Message, fe.InnerException); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException(ce.Message, ce.InnerException); }
            return(ret);
        }