From 62d77d3bb8e7215d9da9ecf6f5aeda0b69f805f8 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期二, 08 十二月 2020 18:57:15 +0800 Subject: [PATCH] 20201208 --- HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs | 26 +++++++++++++++----------- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs index d8b5df8..0b17f56 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs @@ -3,6 +3,9 @@ namespace HDL_ON.UI { + /// <summary> + /// 鍔熻兘鍒嗛厤鎴块棿BLL + /// </summary> public partial class ChooseRoomPage { /// <summary> @@ -43,19 +46,20 @@ } } } - function.roomIdList.Clear(); - foreach (var room in Entity.DB_ResidenceData.residenceData.rooms) + function.roomIds.Clear(); + foreach (var room in Entity.DB_ResidenceData.residenceData.Rooms) { if (btnChooseAll.IsSelected) { - function.roomIdList.Add(room.sid); + function.roomIds.Add(room.uid); } else { - function.roomIdList.Remove(room.sid); + function.roomIds.Remove(room.uid); } + function.SaveFunctionData(true); } - Entity.DB_ResidenceData.residenceData.SaveResidenceData(); + Entity.SpatialInfo.CurrentSpatial.InitRoomFunction(); }; } @@ -66,16 +70,16 @@ { if (isAdd) { - function.roomIdList.Add(room.sid); - room.functionData.Add(function); + function.roomIds.Add(room.uid); + room.AddRoomFunction(function); } else { - function.roomIdList.Remove(room.sid); - room.functionData.Remove(function); + function.roomIds.Remove(room.uid); + room.RemoveRoomFunction(function); } - Entity.DB_ResidenceData.residenceData.SaveResidenceData(); - if (function.roomIdList.Count == Entity.DB_ResidenceData.residenceData.rooms.Count) + function.SaveFunctionData(true); + if (function.roomIds.Count == Entity.DB_ResidenceData.residenceData.Rooms.Count) { btnChooseAll.IsSelected = true; } -- Gitblit v1.8.0