private static void setVehiclesMembers(GarageLogic.Garage i_Garage, GarageLogic.Vehicle i_Vehicle) { Console.WriteLine("Please insert licence number"); string licenceNumber = Console.ReadLine(); i_Vehicle.LicenceNumber = licenceNumber; if (i_Garage.InsertNewVehicleToGarage(i_Vehicle)) { Dictionary <string, string> generalVehicleDictionary = i_Vehicle.VehicleInput(); Dictionary <string, string> typeVehicleDictionary = i_Vehicle.NeededInputs(); fillDictionary(generalVehicleDictionary); fillDictionary(typeVehicleDictionary); try { i_Vehicle.ParseVehicleInput(generalVehicleDictionary); i_Vehicle.ParseNeededInput(typeVehicleDictionary); } catch (Exception ex) { i_Garage.DeleteVehicleFromGerage(licenceNumber); catchExceptionAndContinue(i_Garage, ex); } } else { Dictionary <string, string> excistingVehicleDictionary = i_Vehicle.InputForExistingVehicle(); fillDictionary(excistingVehicleDictionary); try { i_Vehicle.ParseExsitcingVehicleInput(excistingVehicleDictionary); } catch (Exception ex) { catchExceptionAndContinue(i_Garage, ex); } i_Vehicle.VehicleState = GarageLogic.Vehicle.eVehicleState.RepairInProgress; } }