Beispiel #1
0
        private string CreateVehicleDetails(string i_PlateNumber)
        {
            if (r_VehiclesStorage.ContainsKey(i_PlateNumber) == true)
            {
                GarageVehicleInfo currentVehicleInfo = r_VehiclesStorage[i_PlateNumber];
                Vehicle           currentvehicle     = currentVehicleInfo.Vehicle;

                string Details = string.Format(
                    @"
Owner Name is: {0}
OWner phone number is: {1}
Vehicle status is: {2}
{3}",
                    currentVehicleInfo.OwnerName,
                    currentVehicleInfo.PhoneNumber,
                    currentVehicleInfo.Status,
                    currentvehicle.CreateDetails());

                return(Details);
            }
            else
            {
                throw new ArgumentException("Vehicle does not exist in the garage!");
            }
        }