wjc
2023-03-28 a9d1161b1df96e7ddad566335989a1444e433ef5
HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs
@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
using HDL_ON.Common;
using HDL_ON.DAL.Server;
using Shared;
namespace HDL_ON.UI
@@ -79,7 +81,37 @@
                function.roomIds.Remove(room.roomId);
                //room.RemoveRoomFunction(function);
            }
            function.UpdataRoomIds();
            //function.UpdataRoomIds();
            new System.Threading.Thread(() =>
            {
                try
                {
                    var pack = ApiUtlis.Ins.HttpRequest.UpdataDevcieBindRoomInfo(function);
                    //直接保存本地,
                    function.SaveFunctionFile();
                    if (pack.Code == StateCode.SUCCESS)
                    {
                        if (UI.RoomPage.bodyView != null)
                        {
                            Application.RunOnMainThread(() =>
                            {
                                UI.RoomPage.bodyView.ReLoadPage();
                            });
                        }
                    }
                    else
                    {
                        IMessageCommon.Current.ShowErrorInfoAlter(pack.Code);
                    }
                }
                catch (Exception ex){
                    MainPage.Log("房间绑定设备异常" + ex.Message);
                }
            })
            { IsBackground = true }.Start();
            if (function.roomIds.Count == Entity.SpatialInfo.CurrentSpatial.RoomList.Count)
            {
                btnChooseAll.IsSelected = true;