Пример #1
0
        public static string GetAirlines(bool csv = false)
        {
            using (AMSIntegrationServiceClient client = new AMSIntegrationServiceClient(AMSTools.GetWSBinding(), AMSTools.GetWSEndPoint())) {
                try {
                    XmlElement res = client.GetAirlines(Parameters.TOKEN);
                    if (csv)
                    {
                        return(ConvertToCSV(res));
                    }
                    else
                    {
                        return(res.OuterXml);
                    }
                } catch (Exception e) {
                    Console.WriteLine(e.Message);
                }
            }

            return(null);
        }
Пример #2
0
        public static string GetAircraftTypes()
        {
            using (AMSIntegrationServiceClient client = new AMSIntegrationServiceClient(AMSTools.GetWSBinding(), AMSTools.GetWSEndPoint())) {
                try {
                    XmlElement res = client.GetAircraftTypes(Parameters.TOKEN);
                    return(res.OuterXml);
                } catch (Exception e) {
                    Console.WriteLine(e.Message);
                }
            }

            return(null);
        }