public void DeliveryInHire() { Console.Clear(); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Delivery in hire of the car"); Console.ForegroundColor = ConsoleColor.Gray; _pool.ShowCars(_pool.Cars); int id = MotorPool.EnterYearOrId("id for delivery in hire"); int num; for (num = 0; num < _pool.Cars.Count; num++) { if (_pool.Cars[num].Id == id) { _pool.Cars[num].IsHire = true; _client.SetOfTheCar(_pool.Cars[num]); break; } } if (num == _pool.Cars.Count) { Console.WriteLine("In a motor pool there is no car with such id."); } }
public void Show() { Console.Clear(); MenuShow(); switch (MotorPool.EnterNumber(5, () => MenuShow())) { case 1: _pool.ShowCarsNotSorting(); break; case 2: _pool.ShowCarsSortingOnMark(); break; case 3: _pool.ShowCarsSortingOnTypeOfBody(); break; case 4: _pool.ShowCarsSortingOnYearOfRelease(); break; case 5: _pool.ShowCarsSortingAsFuel(); break; } }
public ManagerPool(MotorPool pool, Client client) { _pool = pool; _client = client; }