public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            MyArirvalActivities.Hidden = true;

            Title = FlightNumber;


            RefServiceTSE.Service1 proxy = new RefServiceTSE.Service1();

            RefServiceTSE.Order[] ordersF = proxy.getFlightOrdersArrivals(Convert.ToInt32(Flight_ID), true);


            RefServiceTSE.Order orderF = new RefServiceTSE.Order();

            Order order;

            foreach (var item in ordersF)
            {
                order           = new Order();
                order.Name      = item.Name;
                order.Status    = item.Status;
                order.Flight_id = item.Flight_id;
                order.Order_ID  = item.Order_id;
                order.Doc_no    = item.Doc_no;

                order.Mani    = item.Mani;
                order.Liters  = item.Liters;
                order.Density = item.Density;

                orders.Add(order);
            }
        }
        public void SaveTask(Order order)
        {
            MyArirvalActivities.Hidden = false;
            MyArirvalActivities.StartAnimating();

            var oldOrder = orders.Find(t => t.Order_ID == order.Order_ID);

            RefServiceTSE.Service1 proxy  = new RefServiceTSE.Service1();
            RefServiceTSE.Order    orderR = new RefServiceTSE.Order();
            //RefServiceTSE.O

            orderR.End_time            = DateTime.Today;
            orderR.End_timeSpecified   = true;
            orderR.Start_time          = DateTime.Today;
            orderR.Start_timeSpecified = true;
            orderR.Name                 = order.Name;
            orderR.DensitySpecified     = true;
            orderR.Order_id             = order.Order_ID;
            orderR.Order_idSpecified    = true;
            orderR.Status               = order.Status;
            orderR.Flight_idSpecified   = true;
            orderR.LitersSpecified      = true;
            orderR.Movement_idSpecified = true;
            orderR.X_name               = order.X_name;
            orderR.Mani                 = order.Mani;
            orderR.Density              = order.Density;
            orderR.Doc_no               = order.Doc_no;
            orderR.Flight_id            = order.Flight_id;
            orderR.Liters               = order.Liters;

            try
            {
                if (oldOrder.Order_ID == 0)
                {
                    //Қосамыз
                    proxy.kosytOrdersArrivalFlightsCompleted += kosyOrderCallBack;
                    proxy.kosytOrdersArrivalFlightsAsync(orderR);
                }
                else
                {
                    //Жаңартамыз
                    proxy.updateOrdersArrivalFlightsCompleted += updateCallBack;
                    proxy.updateOrdersArrivalFlightsAsync(orderR);
                }

                //proxy.updateOrdersArrivalFlights(orderR,out resultb,out resultorderB);


                NavigationController.PopViewController(true);
            }
            catch (Exception ex)
            {
            }
        }
示例#3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            // Perform any additional setup after loading the view, typically from a nib.

            RefServiceTSE.Service1 proxy = new RefServiceTSE.Service1();

            RefServiceTSE.Flight[] flightsF = proxy.getFlightArrivals(DateTime.Today, true);


            RefServiceTSE.Flight flightF = new RefServiceTSE.Flight();

            Flight flight;

            foreach (var item in flightsF)
            {
                flight = new Flight();
                flight.FlightNumber   = item.FlightNumber;
                flight.ScheduledTime  = item.ScheduledTime;
                flight.FlightUniqueID = item.FlightUniqueID;
                flights.Add(flight);
            }


            //XmlElement root = proxy.GetFlights("d2ad08e1-8e92-46e5-9788-1e4e56457c18", DateTime.Today, true, DateTime.Today.AddHours(5), true, "TSE", TSEService.AirportIdentifierType.IATACode, true);
            //XElement rootX = XmlElementToXelement(root);
            //Functional.getFlights(rootX);
            ////Functional.ArrivalFligts
            //oflight = Functional.ArrivalFligts;


            FlightTableView.Source = new FlightsTVS(flights);

            FlightTableView.Delegate = new FlightsDelegate();

            FlightTableView.RowHeight          = UITableView.AutomaticDimension;
            FlightTableView.EstimatedRowHeight = 90f;
            FlightTableView.ReloadData();
        }
        public void DeleteTask(Order order)
        {
            MyArirvalActivities.Hidden = false;
            MyArirvalActivities.StartAnimating();

            var oldOrder = orders.Find(t => t.Flight_id == order.Flight_id);

            orders.Remove(oldOrder);
            RefServiceTSE.Service1 proxy  = new RefServiceTSE.Service1();
            RefServiceTSE.Order    orderR = new RefServiceTSE.Order();

            try
            {
                proxy.owiryOrdersArrivalFlightsCompleted += owiryOrderCallBack;

                proxy.owiryOrdersArrivalFlightsAsync(order.Order_ID, true);

                NavigationController.PopViewController(true);
            }
            catch (Exception ex)
            {
            }
        }