Beispiel #1
0
 public IActionResult MarkArmChair(string armChairId, string roomId, StateArmChair state)
 {
     if (string.IsNullOrEmpty(armChairId) || string.IsNullOrEmpty(roomId))
     {
         return(NotFound());
     }
     AdministrationRepository.MarkArmChairByRoomIdAndArmChairId(armChairId, roomId, state);
     return(RedirectToAction("GetRooms"));
 }
 public void MarkArmChairByRoomIdAndArmChairId(string armChairId, string roomId, StateArmChair state)
 {
 }
Beispiel #3
0
        public void MarkArmChairByRoomIdAndArmChairId(string armChairId, string roomId, StateArmChair state)
        {
            var armChair = _context.ArmChairByRoom.Where(x => x.ArmChairId == armChairId && x.RoomId == roomId).ToList();

            foreach (var item in armChair)
            {
                item.StateArmChair = state;
                _context.ArmChairByRoom.Update(item);
            }
            _context.SaveChanges();
        }