Пример #1
0
        public List <string> ListOfAllVehiclesInTheGarage(eSearchFilter i_FilterStatus)
        {
            List <string> listOfVehicles = new List <string>();

            if (i_FilterStatus == eSearchFilter.None)
            {
                foreach (RegistrationForm costumer in r_CostumerDetail)
                {
                    listOfVehicles.Add(costumer.Vehicle.LicenseNumber);
                }
            }
            else
            {
                RegistrationForm.eVehicleStatus status = (RegistrationForm.eVehicleStatus)i_FilterStatus;
                foreach (RegistrationForm costumer in r_CostumerDetail)
                {
                    if (costumer.Status == status)
                    {
                        listOfVehicles.Add(costumer.Vehicle.LicenseNumber);
                    }
                }
            }

            return(listOfVehicles);
        }
Пример #2
0
        private void getListOfVehiclesInGarage()
        {
            eSearchFilter filter   = getSearchFilter();
            List <string> vehicles = r_GarageLogic.ListOfAllVehiclesInTheGarage(filter);

            if (vehicles.Count == 0)
            {
                ConsoleMsg.EmptyGarage();
            }
            else
            {
                ConsoleMsg.VehicleInGarage();
                foreach (string licenseNumber in vehicles)
                {
                    Console.WriteLine(licenseNumber);
                }
            }
        }