public void AddJourney(string fromCity, string toCity, string date) { if (JourneysManager.FindJourney(fromCity, toCity, date)) { string timeAndPrice = JourneysManager.FindJourneyTimeAndPrice(fromCity, toCity, date); string[] ArrTimeAndPrice = timeAndPrice.Split(' '); string time = ArrTimeAndPrice[0]; string price = ArrTimeAndPrice[1]; Journey journeyAdd = new Journey(fromCity, toCity, date, time, price); journeysInPannier.Add(journeyAdd); MessageBox.Show("You have added journey to your list in pannier"); } else { MessageBox.Show("Such journey is not available"); } }