Beispiel #1
0
        private int CheckEquipmentAvailability(TransferEquipmentDTO transferEquipmentDTO)
        {
            int roomNumber = -1;

            foreach (var e in _examinationRepository.GetFollowingExaminationsByRoom(transferEquipmentDTO.StartingRoomNumber).Where(e => e.DateAndTime.CompareTo(transferEquipmentDTO.DateAndTimeOfTransfer) > 0))
            {
                if (_equipmentInExaminationRepository.GetEquipmentInExaminationByExaminationId(e.Id).Find(eie => eie.EquipmentTypeID == transferEquipmentDTO.EquipmentTypeId) != null)
                {
                    roomNumber = transferEquipmentDTO.StartingRoomNumber;
                }
            }
            return(roomNumber);
        }
Beispiel #2
0
 public List <EquipmentInExamination> GetEquipmentInExaminationFromExaminationID(int examinationID)
 {
     return(_equipmentInExaminationRepository.GetEquipmentInExaminationByExaminationId(examinationID));
 }