Example #1
0
        public bool InsertVehicleToGarage(Vehicle i_Vehicle, string i_OwnersName, string i_OwnerPhone)
        {
            bool vehicleAlreadyInside = CarsInTheGarage.ContainsKey(i_Vehicle.LicenseNumber);

            if (vehicleAlreadyInside == true)
            {
                vehicleAlreadyInside = true;
                ChangeVehicleStatus(i_Vehicle.LicenseNumber, eStatus.InRepairs);
            }
            else
            {
                CarsInTheGarage.Add(i_Vehicle.LicenseNumber, new VehicleInGarage(i_OwnersName, i_OwnerPhone, i_Vehicle));
            }

            return(vehicleAlreadyInside);
        }
Example #2
0
        public void AddNewVehicleToGarage(Vehicle i_NewVehicleToAdd, string i_ClientName, string i_ClientPhone)
        {
            VehicleInGarage newVehicleToAdd = new VehicleInGarage(i_ClientName, i_ClientPhone, i_NewVehicleToAdd);

            CarsInTheGarage.Add(i_NewVehicleToAdd.LicenseNumber, newVehicleToAdd);
        }