public static int GetWeekday(string weekdayName)
        {
            //Get weekday as a number
            int weekday = 0;
            ShipScheduleTemplatesServiceClient client = new ShipScheduleTemplatesServiceClient();

            try {
                weekday = client.GetWeekday(weekdayName);
                client.Close();
            }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); }
            catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); }
            catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); }
            return(weekday);
        }