private async void coaches_ItemClick(object sender, ItemClickEventArgs e)
        {
            coach = e.ClickedItem as Coach;

            IDictionary <string, string> parameters = train.getParameters(coach);
            string res = await Requests.makeRequestAsync(Requests.CARRIAGE_URL, parameters);

            //debugOutput.Text = coach.Prices.ToString();

            CarriageResponse resp = Factory.Instance.getCarriageResponse(res);

            places.DataContext = resp.Value.Places;
        }
        private static async Task checkRequestsAsyncHelper()
        {
            IEnumerable <Request> requests = AppDataManager.RetrieveRequests();
            int addedForRequests           = 0;

            try
            {
                foreach (Request req in requests)
                {
                    bool         found    = false;
                    TrainRequest trainReq = new TrainRequest()
                    {
                        from      = req.from,
                        to        = req.to,
                        date      = req.depDateFrame.since,
                        time      = req.depTimeFrame.since,
                        roundTrip = false
                    };
                    TrainResponse trainResp;
                    try
                    {
                        trainResp = Factory.Instance.getTrainResponse(
                            await Requests.makeRequestAsync(Requests.TRAIN_URL, trainReq.getParameters()));
                    }
                    catch (Exception) { continue; }
                    foreach (Train train in trainResp.Trains)
                    {
                        int available = 0;
                        foreach (CoachType type in train.CoachTypes)
                        {
                            try
                            {
                                CoachResponse coachResp = Factory.Instance.getCoachResponse(
                                    await Requests.makeRequestAsync(Requests.COACH_URL, train.getParameters(type, false)));
                                foreach (Coach coach in coachResp.Wrapper.Coaches)
                                {
                                    CarriageResponse carResp = Factory.Instance.getCarriageResponse(
                                        await Requests.makeRequestAsync(Requests.CARRIAGE_URL, train.getParameters(coach)));

                                    available += countAvailavle(req, train, type, coach, carResp.Value.Places);
                                }
                            }
                            catch (Exception) { }
                        }

                        if (!req.available.ContainsKey(train.Number))
                        {
                            req.available[train.Number] = 0;
                        }
                        if (available > req.available[train.Number] + 1)
                        {
                            Notification.SendToast(
                                "З'явилось " + (available - req.available[train.Number]) + " місць",
                                train.Number + " " + req.from.Name + " - " + req.to.Name + ", " + train.From.Date,
                                DateTimeOffset.Now.AddSeconds(15),
                                "UZTracer.TrainPage?" + JsonConvert.SerializeObject(train));

                            found = true;
                        }
                        req.available[train.Number] = available;
                    }
                    addedForRequests += found ? 1 : 0;
                }
            }
            catch (Exception) { }
            finally
            {
                Notification.UpdateBadge(addedForRequests);
                AppDataManager.SaveRequests(requests);
            }
        }