Exemplo n.º 1
0
        public static string AddTemplate(ShipScheduleTemplate template)
        {
            //
            string templateID = "";

            try {
                _Client    = new ShipScheduleServiceClient();
                templateID = _Client.AddTemplate(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(templateID);
        }