wei
2020-12-23 271faaf6664166dc368639b9f2e577f63f901be5
HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using Shared;
namespace HDL_ON.UI
@@ -47,19 +48,19 @@
                    }
                }
                function.roomIds.Clear();
                foreach (var room in Entity.SpatialInfo.CurrentSpatial.RoomList)
                if (btnChooseAll.IsSelected)
                {
                    if (btnChooseAll.IsSelected)
                    foreach (var room in Entity.SpatialInfo.CurrentSpatial.RoomList)
                    {
                        function.roomIds.Add(room.roomId);
                        if (btnChooseAll.IsSelected)
                        {
                            function.roomIds.Add(room.roomId);
                        }
                    }
                    else
                    {
                        function.roomIds.Remove(room.roomId);
                    }
                    function.SaveFunctionData(true);
                }
                Entity.SpatialInfo.CurrentSpatial.InitRoomFunction();
                function.UpdataRoomIds();
                Entity.SpatialInfo.CurrentSpatial.InitRoomListFunctions();
            };
        }
@@ -78,7 +79,7 @@
                function.roomIds.Remove(room.roomId);
                room.RemoveRoomFunction(function);
            }
            function.SaveFunctionData(true);
            function.UpdataRoomIds();
            if (function.roomIds.Count == Entity.SpatialInfo.CurrentSpatial.RoomList.Count)
            {
                btnChooseAll.IsSelected = true;