public static TemplateDataset GetTemplates()
        {
            //Get templates list
            TemplateDataset templates = new TemplateDataset();
            ShipScheduleTemplatesServiceClient client = new ShipScheduleTemplatesServiceClient();

            try {
                DataSet ds = client.GetTemplates();
                if (ds != null)
                {
                    templates.Merge(ds);
                }
                client.Close();
            }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message, te.InnerException); }
            catch (FaultException <ShipScheduleFault> ssf) { client.Abort(); throw new ApplicationException(ssf.Detail.Message); }
            catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); }
            catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); }
            return(templates);
        }