public ItemsPage(RoutePoints model, string ticket)
 {
     InitializeComponent();
     routepoints.Clear();
     foreach (RoutePoint routePoint in model.route_points)
     {
         routepoints.Add(routePoint);
     }
     ItemsListView.ItemsSource = RoutePointView;
     Ticket.Text = ticket;
 }
Ejemplo n.º 2
0
        public async void EnterTicketNumber(object sender, EventArgs e)
        {
            string              ticket   = Ticket.Text;
            HttpClient          client   = new HttpClient();
            HttpResponseMessage response = await client.GetAsync("http://192.168.137.187:1489/api/get_points/" + ticket);

            var _response = await response.Content.ReadAsStringAsync();

            try
            {
                RoutePoints result = JsonConvert.DeserializeObject <RoutePoints>(_response);
                AppSettings.AddOrUpdateValue("ticketN", ticket);
                Navigation.PushAsync(new ItemsPage(result, ticket));
            }
            catch { }
        }