From f35f1397c980efdc2542dff7aaa23b1a7dbb65e7 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期三, 16 十二月 2020 10:53:34 +0800 Subject: [PATCH] 2020-12-16-1 --- HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs index cc90c39..e57df22 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/AddRoom/AddRoomPage.cs @@ -453,18 +453,17 @@ { deviceIds.Add(f.deviceId); } - var bindResult = FunctionList.List.FunctionsBindRooms(new List<string>() { room.roomId }, deviceIds); - if (bindResult == StateCode.SUCCESS) + if (deviceIds.Count > 0) { - foreach(var f in roomFunctions) + var bindResult = FunctionList.List.FunctionsBindRooms(new List<string>() { room.roomId }, deviceIds); + if (bindResult == StateCode.SUCCESS) { - f.roomIds.Add(room.roomId); + foreach (var f in roomFunctions) + { + f.roomIds.Add(room.roomId); + } + room.GetRoomFunctions(true); } - room.GetRoomFunctions(true); - } - else - { - //Utlis.ShowTip(Language.StringByID(StringId.EditFunctionInfoFail) + "\r\nCode:" + pack.Code); } backAction(room); RemoveFromParent(); -- Gitblit v1.8.0