Example #1
0
        private static void AddVehicle()
        {
            string licensePlateNumber = Utils.GetLicensePlateNumber();

            if (m_Garage.HasVehicleVisited(licensePlateNumber))
            {
                Console.WriteLine("Vehicle under License Plate Number '{0}' already in the system.", licensePlateNumber);
                changeVehicleStatus(licensePlateNumber, eTicketStatus.InProgress.ToString());
            }
            else
            {
                string ownerName                     = Utils.GetOwnerName();
                string ownerPhoneNumber              = Utils.GetOwnerPhoneNumber();
                string vehicleTypeString             = GetVehicleType();
                ArgumentsCollection vehicleArguments = m_Garage.GetArgumentsByVehicleType(vehicleTypeString);

                runArgumentsWithUser(vehicleArguments, licensePlateNumber);
                m_Garage.AddVehicleToGarage(vehicleArguments, vehicleTypeString, ownerName, ownerPhoneNumber);
                Console.WriteLine("The Vehicle was added Successfully.");
            }
        }