public void AddCarBalance() { Write("Enter car id: "); try { var id = int.Parse(ReadLine()); Write("Enter funds: "); var funds = decimal.Parse(ReadLine()); _parking.AddBalance(id, funds); WriteLineSuccess("Success!"); WriteLine("\nPlease enter any key to continue..."); ReadKey(); Navigation.SelectedCars(); } catch (NotExistException ex) { WriteLineError("Error: " + ex.Message); WriteLine("\nPlease enter any key to continue..."); ReadKey(); Navigation.SelectedCars(); } catch (ArgumentException ex) { WriteLineError("Error: " + ex.Message); WriteLine("\nPlease enter any key to continue..."); ReadKey(); Navigation.SelectedCars(); } }
public void AddCarBalance(int id, decimal funds) { parkingInstance.AddBalance(id, funds); }