示例#1
0
        public IEnumerable <RoomBLL> findByState(string state)
        {
            PGRoomRepository      repository = repositoryFactory.getRoomRepository();
            IEnumerable <RoomDAL> list       = repository.findByState(state);

            return(list.Select(r => new RoomBLL
            {
                number = r.number,
                stage = r.stage,
                state = r.state,
                block = r.block,
                capacity = r.capacity,
                amountOfStudents = r.amountOfStudents
            }));
        }
示例#2
0
        public IEnumerable <RoomBLL> getNotAvailableForAccomodation()
        {
            PGRoomRepository      repository = repositoryFactory.getRoomRepository();
            IEnumerable <RoomDAL> list       = repository.getNotAvailableForAccomodation();

            return(list.Select(r => new RoomBLL
            {
                number = r.number,
                stage = r.stage,
                state = r.state,
                block = r.block,
                capacity = r.capacity,
                amountOfStudents = r.amountOfStudents
            }));
        }
示例#3
0
        public void updateState(RoomBLL updatedRoom)
        {
            RoomDAL roomDAL = new RoomDAL
            {
                number           = updatedRoom.number,
                stage            = updatedRoom.stage,
                state            = updatedRoom.state,
                block            = updatedRoom.block,
                capacity         = updatedRoom.capacity,
                amountOfStudents = updatedRoom.amountOfStudents
            };

            PGRoomRepository repository = repositoryFactory.getRoomRepository();

            repository.updateState(roomDAL);
        }