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) { } }
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) { } }