From 23fb45dd846ed8b62304c408c6bbe64265d4ac8b Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 20 十二月 2019 18:57:16 +0800
Subject: [PATCH] 代码合并

---
 ZigbeeApp/Shared/Phone/ZigBee/Device/BindObj.cs |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/BindObj.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/BindObj.cs
index 431fa5b..728bea6 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/BindObj.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/BindObj.cs
@@ -44,24 +44,25 @@
                     else if (topic == gatewayID + "/" + "Bind/SetBind_Respon")
                     {
                         var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = ZbGateway.MainGateWay.getGatewayBaseInfo.gwID };
-                        var tempBindList = Newtonsoft.Json.Linq.JArray.Parse(jobject["Data"]["BindList"].ToString());
-                        if (tempBindList == null)
+                        //var tempBindList = Newtonsoft.Json.Linq.JArray.Parse(jobject["Data"]["BindList"].ToString());
+                        var tempResult = Newtonsoft.Json.JsonConvert.DeserializeObject<AddedDeviceBindResponseData>(jobject["Data"].ToString());
+                        if (tempResult == null)
                         {
                             result = new AddedDeviceBindResponseAllData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
                         }
                         else
                         {
-                            var dataBindRes = new AddedDeviceBindResponseData();
-                            for (int m = 0; tempBindList != null && m < tempBindList.Count; m++)
-                            {
-                                var tempBind = tempBindList[m];
-                                dataBindRes.BindList.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<AddBindListResponseObj>(tempBind.ToString()));
-                            }
-                            if (dataBindRes != null)
-                            {
-                                result = new AddedDeviceBindResponseAllData { addedDeviceBindResponseData = dataBindRes };
-                                DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
-                            }
+                            //var dataBindRes = new AddedDeviceBindResponseData();
+                            //for (int m = 0; tempBindList != null && m < tempBindList.Count; m++)
+                            //{
+                            //    var tempBind = tempBindList[m];
+                            //    dataBindRes.BindList.Add(Newtonsoft.Json.JsonConvert.DeserializeObject<AddBindListResponseObj>(tempBind.ToString()));
+                            //}
+                            //if (dataBindRes != null)
+                            //{
+                            result = new AddedDeviceBindResponseAllData { addedDeviceBindResponseData = tempResult };
+                            DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
+                            //}
                         }
                     }
                     //else if (topic == gatewayID + "/" + "Bind/BindResult")
@@ -219,7 +220,7 @@
             /// 0锛氱粦瀹氭墍鏈夌洰鏍囨垚鍔�
             ///<para>1锛氱粦瀹氱洰鏍囧け璐ワ紝缁戝畾璁惧鐩爣鏈夋紡鎺�</para> 
             /// </summary>
-            public int Result;
+            public int Result = -1;
         }
 
         /// <summary>

--
Gitblit v1.8.0