示例#1
0
        public List <CarStatus> SearchBy(string key)
        {
            List <Car>       foundCars = RegisteredCar.FindAll(rcar => rcar.NumberPlate.ToLower() == key.ToLower());
            List <CarStatus> carStatus = new List <CarStatus>();
            CarStatus        cs;

            foreach (var car in foundCars)
            {
                cs               = new CarStatus();
                cs.car           = car;
                cs.checkInStatus = isCarCheckedIn(car.ID);
                carStatus.Add(cs);
            }
            return(carStatus);
        }
示例#2
0
 public List <Car> getAllCheckedInCars()
 {
     return(RegisteredCar.FindAll(rcar => CheckedInCar.Contains(rcar.ID)));
 }