private void syncLDM()
        {
            try
            {
                FTPClient ftp = new FTPClient(_RemoteHost, _RemoteLogin, _RemotePassword);
                ftp.Download("LDM.txt", AppDomain.CurrentDomain.BaseDirectory + "LDM.txt");
            }
            catch (IOException copyError)
            {
                eventLog1.WriteEntry(copyError.Message);
                return;
            }

            List<LDM> buginLDM = new List<LDM>();

            Broker b = new Broker();
            String CsOG = "";
            buginLDM = b.FillListBoxLDM(b.LoadOccupation("LDM"));
            foreach (var item in buginLDM)
            {
                XNamespace am = "http://www.sita.aero/ams6-xml-api-messages";
                XNamespace ad = "http://www.sita.aero/ams6-xml-api-datatypes";
                XElement root = null;
                if (item.MessageIdentifier == "Departure")
                {
                    root = new XElement(am + "Envelope",
                        new XAttribute(XNamespace.Xmlns + "amsx-messages", "http://www.sita.aero/ams6-xml-api-messages"),
                        new XAttribute("apiVersion", "1.2"),
                        new XAttribute(XNamespace.Xmlns + "amsx-datatypes", "http://www.sita.aero/ams6-xml-api-datatypes"),
                        new XElement(am + "Content",
                            new XElement(am + "FlightUpdateRequest",
                                new XElement(am + "FlightId",
                                    new XElement(ad + "FlightKind", item.MessageIdentifier),
                                    new XElement(ad + "AirlineDesignator", item.FlightIdentifier.Substring(0, 2), new XAttribute("codeContext", "IATA")),
                                    new XElement(ad + "FlightNumber", item.FlightIdentifier.Substring(2, item.FlightIdentifier.Length - 2)),
                                    new XElement(ad + "ScheduledDate", b.LDMDayOfDepartureDate(item.DayOfOperation.ToString(), item.FlightIdentifier.Substring(2, item.FlightIdentifier.Length - 2)).ToString("yyyy-MM-dd")),
                                    new XElement(ad + "AirportCode", "TSE", new XAttribute("codeContext", "IATA"))
                                    ),
                                new XElement(am + "FlightUpdates",
                                    //new XElement(am + "Update", "2015-11-13T12:25:00", new XAttribute("propertyName", "ScheduledTime")),
                                    //new XElement(am + "Update", "FRU", new XAttribute("propertyName", "Route"), new XAttribute("codeContext", "IATA")),
                                    //new XElement(am + "Update", "", new XAttribute("propertyName", "Arr_Codeshares"), new XAttribute("codeContext", "IATA")),
                                    new XElement(am + "Update", item.PassengerAdults, new XAttribute("propertyName", "local_vzr_econom")),
                                    new XElement(am + "Update", item.PassengerChild, new XAttribute("propertyName", "local_rb_econom")),
                                    new XElement(am + "Update", item.Mail, new XAttribute("propertyName", "SOP Mail Departure")),
                                    new XElement(am + "Update", item.Freight, new XAttribute("propertyName", "SOP Cargo Weight Departure")),
                                    new XElement(am + "Update", item.Baggage, new XAttribute("propertyName", "local_vb_econom"))
                                )
                            )
                        )
                    );
                }
                else if (item.MessageIdentifier == "Arrival")
                {
                    root = new XElement(am + "Envelope",
                        new XAttribute(XNamespace.Xmlns + "amsx-messages", "http://www.sita.aero/ams6-xml-api-messages"),
                        new XAttribute("apiVersion", "1.2"),
                        new XAttribute(XNamespace.Xmlns + "amsx-datatypes", "http://www.sita.aero/ams6-xml-api-datatypes"),
                        new XElement(am + "Content",
                            new XElement(am + "FlightUpdateRequest",
                                new XElement(am + "FlightId",
                                    new XElement(ad + "FlightKind", item.MessageIdentifier),
                                    new XElement(ad + "AirlineDesignator", item.FlightIdentifier.Substring(0, 2), new XAttribute("codeContext", "IATA")),
                                    new XElement(ad + "FlightNumber", item.FlightIdentifier.Substring(2, item.FlightIdentifier.Length - 2)),
                                    new XElement(ad + "ScheduledDate", b.LDMDiffDate(item.DayOfOperation.ToString(), item.FlightIdentifier.Substring(2, item.FlightIdentifier.Length - 2)).ToString("yyyy-MM-dd")),
                                    new XElement(ad + "AirportCode", "TSE", new XAttribute("codeContext", "IATA"))
                                    ),
                                new XElement(am + "FlightUpdates",
                                    //new XElement(am + "Update", "2015-11-13T12:25:00", new XAttribute("propertyName", "ScheduledTime")),
                                    //new XElement(am + "Update", "FRU", new XAttribute("propertyName", "Route"), new XAttribute("codeContext", "IATA")),
                                    //new XElement(am + "Update", "", new XAttribute("propertyName", "Arr_Codeshares"), new XAttribute("codeContext", "IATA")),
                                    new XElement(am + "Update", item.PassengerAdults, new XAttribute("propertyName", "sop adults arrival")),
                                    new XElement(am + "Update", item.PassengerChild, new XAttribute("propertyName", "sop_arr_child")),
                                    new XElement(am + "Update", item.Mail, new XAttribute("propertyName", "SOP Mail Arrival")),
                                    new XElement(am + "Update", item.Freight, new XAttribute("propertyName", "SOP Cargo Weight Arrival")),
                                    new XElement(am + "Update", item.Baggage, new XAttribute("propertyName", "weight+lug_arr"))
                                )
                            )
                        )
                    );

                }
                messageQueue1.Path = queuePath;
                System.Messaging.Message testMgs = new System.Messaging.Message();
                testMgs.Body = root;
                if (emulationMode == "Real") messageQueue1.Send(testMgs);
                CsOG = CsOG + " " + root.ToString();
                //Мониторингке кажетти мәліметтер
                b.WriteMonitoring(item.FlightIdentifier + " " + (item.MessageIdentifier == "Arrival" ? b.LDMDiffDate(item.DayOfOperation.ToString(), item.FlightIdentifier.Substring(2, item.FlightIdentifier.Length - 2)).ToString("yyyy-MM-dd") + " Arrival" : b.LDMDayOfDepartureDate(item.DayOfOperation.ToString(), item.FlightIdentifier.Substring(2, item.FlightIdentifier.Length - 2)).ToString("yyyy-MM-dd") + " Departure"));

            }
            b.WriteMyLOG("Update LDM Flight: " + CsOG);

            b.CloseReader();
            this.timerKezegi = "FFM";
        }