update from old git
This commit is contained in:
23
web/App_Code/Model/Partial/Room.cs
Normal file
23
web/App_Code/Model/Partial/Room.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
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();
|
||||
//这里增加根据房间排程判定在指定时间段内房间是否可用
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Room 的摘要描述
|
||||
/// </summary>
|
||||
Reference in New Issue
Block a user