private bool DoPayment() { Parking parking = GetDestination(); Payment payment = new Payment(parking); if (payment.MakeTransaction()) { _isPaid = true; return(true); } return(false); }
public void GetParkings() { using (StreamReader streamReader = new StreamReader(_dataBaseRef)) { string data; for (int i = 0; (data = streamReader.ReadLine()) != null; i++) { string[] input = data.Split(','); Random rand = new Random(); Parking parking = new Parking(i, input[0].Split(' ').Select(a => int.Parse(a)).ToArray(), int.Parse(input[1]), int.Parse(input[2]), int.Parse(input[3])); Parkings.Add(parking); } } }
public Payment(Parking parking) { _parking = parking; }