From 780e34b3f06f9709150183711ffddd19f97e070d Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 25 十二月 2020 10:11:19 +0800
Subject: [PATCH] 20201225-3
---
HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs
index 0b17f56..62d6a5a 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs
@@ -1,4 +1,5 @@
锘縰sing System;
+using System.Collections.Generic;
using Shared;
namespace HDL_ON.UI
@@ -47,19 +48,19 @@
}
}
function.roomIds.Clear();
- foreach (var room in Entity.DB_ResidenceData.residenceData.Rooms)
+ if (btnChooseAll.IsSelected)
{
- if (btnChooseAll.IsSelected)
+ foreach (var room in Entity.SpatialInfo.CurrentSpatial.RoomList)
{
- function.roomIds.Add(room.uid);
+ if (btnChooseAll.IsSelected)
+ {
+ function.roomIds.Add(room.roomId);
+ }
}
- else
- {
- function.roomIds.Remove(room.uid);
- }
- function.SaveFunctionData(true);
}
- Entity.SpatialInfo.CurrentSpatial.InitRoomFunction();
+
+ function.UpdataRoomIds();
+ Entity.SpatialInfo.CurrentSpatial.InitRoomListFunctions();
};
}
@@ -70,16 +71,16 @@
{
if (isAdd)
{
- function.roomIds.Add(room.uid);
+ function.roomIds.Add(room.roomId);
room.AddRoomFunction(function);
}
else
{
- function.roomIds.Remove(room.uid);
+ function.roomIds.Remove(room.roomId);
room.RemoveRoomFunction(function);
}
- function.SaveFunctionData(true);
- if (function.roomIds.Count == Entity.DB_ResidenceData.residenceData.Rooms.Count)
+ function.UpdataRoomIds();
+ if (function.roomIds.Count == Entity.SpatialInfo.CurrentSpatial.RoomList.Count)
{
btnChooseAll.IsSelected = true;
}
--
Gitblit v1.8.0