Beispiel #1
0
        /// <summary>
        /// Gets new status from user and changes the vehicle status if exists
        /// </summary>
        private void changeVehicleStatus()
        {
            string licenseNumber = getLicenceNumberFromUser();

            Vehicle vehicle = m_Garage.GetVehicle(licenseNumber);

            if (vehicle != null)
            {
                printVehicleStatusMenu(false);
                eVehicleStatus status = getVehicleStatusFromUser();
                m_Garage.ChangeStatus(vehicle, status);
            }
            else
            {
                write(String.Format("No such vehicle in the garage: {0}", licenseNumber));
            }
        }