private void TryPrintVehicles(List <Vehicle> vehicles) { if (Company.NumberOfOwnedVehicles() > 0) { PrintVehicles(vehicles); } else { StandardMessage.NoVehiclesOwned(); } }
public void SearchForVehicles() { if (Company.NumberOfOwnedVehicles() > 0) { int minimumCapacity = InputVehicle.CatchVehicleCapacity(); int minimumVolume = InputVehicle.CatchVehicleVolume(); TryFindVehicles(Company.SearchForVehicles(minimumCapacity, minimumVolume)); } else { StandardMessage.NoVehiclesOwned(); } }
public void OwnedVehiclesWithDriversAssigned() { List <Vehicle> vehicles = Company.ListOfOwnedVehicles(); if (vehicles != null) { foreach (var vehicle in vehicles) { Console.WriteLine($"{"ID",-10}{"NAME",-31}{"CAPACITY",-10}{"VOLUME",-10}{"ON THE ROAD",-13}{"NUMBER OF COURSES"}"); PrintVehicle(vehicle); DriverController DriverController = new DriverController(Company); DriverController.TryPrintAssignedDrivers(vehicle.AssignedDrivers); } } else { StandardMessage.NoVehiclesOwned(); } }
public void EditVehicleInformations() { if (Company.NumberOfOwnedVehicles() > 0) { OwnedVehicles(); Vehicle Vehicle = new Vehicle(); Vehicle.Id = InputVehicle.CatchVehicleId(); if (Company.DoesVehicleExist(Vehicle.Id)) { CatchVehicleData(Vehicle); StandardMessage.ValidationSummary(Company.UpdateVehicleInfo(Vehicle)); } else { StandardMessage.NoVehicleFound(); } } else { StandardMessage.NoVehiclesOwned(); } }