예제 #1
0
    private static void presentTheNumbersofVehiclesInGarageByStatus(Ex03.GarageLogic.GarageManager i_GarageManager)
    {
        string stringStatusFilterType = getEnumStringFromEnumValues(typeof(Ex03.GarageLogic.GarageManager.eVehicleInGarageStatus));

        Ex03.GarageLogic.GarageManager.eVehicleInGarageStatus vehicleStatusFilterType =
            (Ex03.GarageLogic.GarageManager.eVehicleInGarageStatus)System.Enum.Parse(typeof(Ex03.GarageLogic.GarageManager.eVehicleInGarageStatus), stringStatusFilterType);
        List <string> arrayOfVehiclesNumbersByFilter = i_GarageManager.GenerateVehiclesNumbersListByFilterType(vehicleStatusFilterType);

        auxPresentTheNumbersOfTheVehiclesinVehicleList(arrayOfVehiclesNumbersByFilter, vehicleStatusFilterType);
    }
예제 #2
0
        public List <string> GenerateVehiclesNumbersListByFilterType(Ex03.GarageLogic.GarageManager.eVehicleInGarageStatus i_FilterType)
        {
            List <string> vehiclesNumbersListByFilter = new List <string>();

            foreach (KeyValuePair <string, VehicleInTreatmentDetails> currentVehicleInTreatment in m_VehiclesInGarageByNumber)
            {
                if (currentVehicleInTreatment.Value.VehicleInTreatmentStatus == i_FilterType)
                {
                    vehiclesNumbersListByFilter.Add(currentVehicleInTreatment.Key);
                }
            }

            return(vehiclesNumbersListByFilter);
        }
예제 #3
0
 private static void auxPresentTheNumbersOfTheVehiclesinVehicleList(List <string> i_VehiclesNumbersListByFilter, Ex03.GarageLogic.GarageManager.eVehicleInGarageStatus i_VehicleStatusFilterType)
 {
     if (i_VehiclesNumbersListByFilter.Count == 0)
     {
         System.Console.WriteLine("There are no vehicles in this status - " + i_VehicleStatusFilterType);
     }
     else
     {
         System.Console.WriteLine("Here are all the vehicles in the status - " + i_VehicleStatusFilterType);
         foreach (string vehicleNumber in i_VehiclesNumbersListByFilter)
         {
             System.Console.WriteLine(vehicleNumber);
         }
     }
 }