From a715181089be0d31cd737a5367ffd02690b9d77f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 12 十一月 2020 13:36:01 +0800 Subject: [PATCH] 20201112 --- HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs index d8b5df8..86441aa 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> @@ -44,7 +47,7 @@ } } function.roomIdList.Clear(); - foreach (var room in Entity.DB_ResidenceData.residenceData.rooms) + foreach (var room in Entity.DB_ResidenceData.rooms) { if (btnChooseAll.IsSelected) { @@ -54,8 +57,9 @@ { function.roomIdList.Remove(room.sid); } + function.SaveFunctionData(); } - Entity.DB_ResidenceData.residenceData.SaveResidenceData(); + Entity.DB_ResidenceData.InitRoomFunction(); }; } @@ -67,15 +71,15 @@ if (isAdd) { function.roomIdList.Add(room.sid); - room.functionData.Add(function); + room.AddRoomFunction(function); } else { function.roomIdList.Remove(room.sid); - room.functionData.Remove(function); + room.RemoveRoomFunction(function); } - Entity.DB_ResidenceData.residenceData.SaveResidenceData(); - if (function.roomIdList.Count == Entity.DB_ResidenceData.residenceData.rooms.Count) + function.SaveFunctionData(); + if (function.roomIdList.Count == Entity.DB_ResidenceData.rooms.Count) { btnChooseAll.IsSelected = true; } -- Gitblit v1.8.0