From eb51679c618d5027070fbd6f3c0519f0f17e7d7d Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期一, 23 十一月 2020 10:07:53 +0800
Subject: [PATCH] Merge branch 'CJL' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into CJL

---
 HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs
index 3e9af2d..86441aa 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs
@@ -47,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)
                     {
@@ -57,9 +57,9 @@
                     {
                         function.roomIdList.Remove(room.sid);
                     }
+                    function.SaveFunctionData();
                 }
                 Entity.DB_ResidenceData.InitRoomFunction();
-                Entity.DB_ResidenceData.residenceData.SaveResidenceData();
             };
         }
 
@@ -71,15 +71,15 @@
             if (isAdd)
             {
                 function.roomIdList.Add(room.sid);
-                room.functions.Add(function);
+                room.AddRoomFunction(function);
             }
             else
             {
                 function.roomIdList.Remove(room.sid);
-                room.functions.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