Ejemplo n.º 1
0
 private Driver getDriver(List <DriverCar> driverCars)
 {
     if (driverCars.Count() > 0)
     {
         DriverCar  driverCar  = driverCars.First() as DriverCar;
         DriverList driverList = DriverList.getInstance();
         return(driverList.getItem(driverCar.Driver.ID));
     }
     else
     {
         return(null);
     }
 }
Ejemplo n.º 2
0
        public List <INotification> ToList()
        {
            DriverList           driverList = DriverList.getInstance();
            List <DriverLicense> listNew    = _list.Where(item => !driverList.getItem(item.Driver.ID).Fired&& !driverList.getItem(item.Driver.ID).Decret&& driverList.getItem(item.Driver.ID).IsDriver).ToList();

            List <INotification> listNotification = new List <INotification>();

            foreach (INotification item in listNew)
            {
                listNotification.Add(item);
            }

            return(listNotification);
        }
Ejemplo n.º 3
0
        public List <INotification> ToList()
        {
            DriverList driverList             = DriverList.getInstance();
            IEnumerable <MedicalCert> listNew = list.Where(item => !driverList.getItem(item.Driver.ID).Fired&& !driverList.getItem(item.Driver.ID).Decret&& driverList.getItem(item.Driver.ID).IsDriver);

            var listNotification = new List <INotification>();

            foreach (INotification item in listNew)
            {
                listNotification.Add(item);
            }

            return(listNotification);
        }
Ejemplo n.º 4
0
        public Driver GetDriver(Car car)
        {
            var driverCars = from driverCar in list
                             where driverCar.Car.ID == car.ID
                             orderby driverCar.dateEnd descending, driverCar.Number descending
            select driverCar;

            if ((driverCars.ToList().Count == 0) && (!car.IsGet))
            {
                DriverList driverList = DriverList.getInstance();
                return(driverList.getItem(Convert.ToInt32(car.driverID)));
            }
            else
            {
                return(getDriver(driverCars.ToList()));
            }
        }