/// <summary> /// 处理锁定超时 /// </summary> public void LockOverTime() { try { DateTime nowDateTime = ServiceDateTime.Now; //获取全部的锁定座位 List <Seat> SeatList = T_SM_Seat.GetSeatListByRoomNum(null, true); if (SeatList != null) { foreach (Seat s in SeatList) { if (s.LockedTime.AddMinutes(1.0) < nowDateTime) { T_SM_Seat.UnLockSeat(s.SeatNo); } } } } catch (Exception e) { WriteLog.Write(e.Message); } }