Exemple #1
0
        public void Update([FromBody] OrderViewModel orderViewModel)
        {
            OrderDTO orderDTO = configsGenerator.ViewModelToOrderDTO().Map <OrderDTO>(orderViewModel);

            orderDTO.IncludedRooms = configsGenerator.ViewModelToRoomDTO().Map <List <RoomDTO> >(orderViewModel.OrderedRooms);
            OrdersBLRepository.Update(orderDTO);
        }
        public void Update([FromBody] EquipmentViewModel equipmentViewModel)
        {
            EquipmentDTO equipmentDTO = configsGenerator.ViewModelToEquipmentDTO().Map <EquipmentDTO>(equipmentViewModel);

            equipmentDTO.IncludedRooms = configsGenerator.ViewModelToRoomDTO().Map <List <RoomDTO> >(equipmentViewModel.RoomsThatHaveIt);
            EquipmentBLRepository.Update(equipmentDTO);
        }
Exemple #3
0
        public void Update([FromBody] ActivityViewModel viewModel)
        {
            ActivityDTO activityDTO = configsGenerator.ViewModelToActivityDTO().Map <ActivityDTO>(viewModel);

            activityDTO.IncludedRooms = configsGenerator.ViewModelToRoomDTO().Map <List <RoomDTO> >(viewModel.PosibleRooms);
            ActivitiesBLRepository.Update(activityDTO);
        }
        public void Update([FromBody] RoomViewModel roomViewModel)
        {
            RoomDTO roomDTO = configsGenerator.ViewModelToRoomDTO().Map <RoomDTO>(roomViewModel);

            roomDTO.IncludedActivities = configsGenerator.ViewModelToActivityDTO().Map <List <ActivityDTO> >(roomViewModel.PosibleActivities);
            roomDTO.IncludedEquipment  = configsGenerator.ViewModelToEquipmentDTO().Map <List <EquipmentDTO> >(roomViewModel.RoomEquipment);
            roomDTO.IncludedOrders     = configsGenerator.ViewModelToOrderDTO().Map <List <OrderDTO> >(roomViewModel.RoomOrders);
            RoomsBLRepository.Update(roomDTO);
        }