using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Model { public partial class Room { public bool IsAvailable() { //判断当前房间是否可用,需要判断父区域是否可用,如果父区域不可用,则所有子区域都不可用 // 有值且是 false,表示不可用 if (this.IsActive.HasValue && this.IsActive.Value == false) return false; return this.Region.IsAvailable(); //这里增加根据房间排程判定在指定时间段内房间是否可用 } } } /// /// Room 的摘要描述 ///