From 99253403b560f761d5f9af8b4f5140496996433a Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 20 十一月 2020 16:49:50 +0800
Subject: [PATCH] 新云端的代码Ver1.0

---
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs |  102 ++++++++++++++++++++++++--------------------------
 1 files changed, 49 insertions(+), 53 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs
index aee5ff4..34f7364 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs
@@ -16,7 +16,7 @@
         /// <param name="doorLock"></param>
         /// <param name="accountObj"></param>
         /// <param name="entryType"></param>
-        public EntryStatusPage(ZigBee.Device.DoorLock doorLock, Shared.Phone.UserCenter.MemberInfoRes accountObj, string entryType)
+        public EntryStatusPage(ZigBee.Device.DoorLock doorLock, MemberInfoRes accountObj, string entryType)
         {
             this.doorLock = doorLock;
             this.curAccountObj = accountObj;
@@ -32,7 +32,7 @@
         /// <summary>
         /// 褰撳墠璐︽埛
         /// </summary>
-        Shared.Phone.UserCenter.MemberInfoRes curAccountObj;
+        MemberInfoRes curAccountObj;
         /// <summary>
         /// 褰撳墠绫诲瀷
         /// </summary>
@@ -43,8 +43,8 @@
         FrameLayout bottomFrameLayout;
         #endregion
 
-        /// <summary>
-        /// UI鏄剧ず 
+        /// <summary>
+        /// UI鏄剧ず 
         /// </summary>
         public void Show()
         {
@@ -233,14 +233,7 @@
                 btnPasswordRemarkContent.PlaceholderText = Language.StringByID(R.MyInternationalizationString.IcCard) + "ID" + doorLock.doorLockProgrammingEventNotificationCommand.UserID;
             }
 
-            if (!string.IsNullOrEmpty(curAccountObj.UserName))
-            {
-                btnMatchPersonContent.Text = curAccountObj.UserName;
-            }
-            else
-            {
-                btnMatchPersonContent.Text = curAccountObj.Account;
-            }
+            btnMatchPersonContent.Text = curAccountObj.ShowName;
 
             completeBtn.MouseDownEventHandler += async (sender, e) =>
              {
@@ -250,13 +243,15 @@
                      return;
                  }
                  var addLockInfo = new ZigBee.Device.DoorLock.AddDoorLockData();
-                 if (UserCenterResourse.UserInfo.AuthorityNo != 1)
+                 if (HdlUserCenterResourse.ResidenceOption.AuthorityNo != 1)
                  {
-                     addLockInfo.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
+                     //鈽嗐優銉笺偗鈽�
+                     //addLockInfo.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
                      addLockInfo.IsOtherAccountCtrl = true;
                  }
 
-                 addLockInfo.CloudAccountId = curAccountObj.SubAccountDistributedMark;
+                 //鈽嗐優銉笺偗鈽�
+                 //addLockInfo.CloudAccountId = curAccountObj.SubAccountDistributedMark;
                  if (doorLock.DeviceAddr != null)
                  {
                      addLockInfo.DoorLockId = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
@@ -278,49 +273,50 @@
                      var result = await ZigBee.Device.DoorLock.SendDoorLockToServer("DoorLock/AddDoorLock", addLockInfo);
                      if (result != null)
                      {
-                         if (result.StateCode == "Success")
+                         if (result.Code == HttpMessageEnum.A鎴愬姛)
                          {
                              if (doorLock.localDoorLockUserList.ContainsKey(doorLock.doorLockProgrammingEventNotificationCommand.UserID))
                              {
+                                 //鈽嗐優銉笺偗鈽�
                                  //瀛橀棬閿佷俊鎭�
-                                 var resultList = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetCloudLocalDoorLocklist(doorLock, curAccountObj.SubAccountDistributedMark);
-                                 if (resultList != null)
-                                 {
-                                     if (resultList.ContainsKey(doorLock.doorLockProgrammingEventNotificationCommand.UserID) == true)
-                                     {
-                                         var a = resultList[doorLock.doorLockProgrammingEventNotificationCommand.UserID];
-                                         if (a?.ConnectedAccount == curAccountObj.SubAccountDistributedMark)
-                                         {
-                                             completeBtn.Enable = true;
-                                             this.RemoveFromParent();
-                                             for (int i = UserView.HomePage.Instance.ChildrenCount - 1; i >= 0; i--)
-                                             {
-                                                 var form = UserView.HomePage.Instance.GetChildren(i);
+                                 //var resultList = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetCloudLocalDoorLocklist(doorLock, curAccountObj.SubAccountDistributedMark);
+                                 //if (resultList != null)
+                                 //{
+                                 //    if (resultList.ContainsKey(doorLock.doorLockProgrammingEventNotificationCommand.UserID) == true)
+                                 //    {
+                                 //        var a = resultList[doorLock.doorLockProgrammingEventNotificationCommand.UserID];
+                                 //        if (a?.ConnectedAccount == curAccountObj.SubAccountDistributedMark)
+                                 //        {
+                                 //            completeBtn.Enable = true;
+                                 //            this.RemoveFromParent();
+                                 //            for (int i = UserView.HomePage.Instance.ChildrenCount - 1; i >= 0; i--)
+                                 //            {
+                                 //                var form = UserView.HomePage.Instance.GetChildren(i);
 
-                                                 if (form is UnLockMethod)
-                                                 {
-                                                     doorLock.currentUserDisplayMethod = "";
-                                                     ((UnLockMethod)form).RefreshList();
-                                                     break;
-                                                 }
-                                                 else
-                                                 {
-                                                     form.RemoveFromParent();
-                                                 }
-                                             }
-                                         }
-                                         else
-                                         {
-                                             completeBtn.Enable = true;
-                                             new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnPasswordRemarkContent);
-                                         }
-                                     }
-                                 }
-                                 else
-                                 {
-                                     completeBtn.Enable = true;
-                                     new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnPasswordRemarkContent);
-                                 }
+                                 //                if (form is UnLockMethod)
+                                 //                {
+                                 //                    doorLock.currentUserDisplayMethod = "";
+                                 //                    ((UnLockMethod)form).RefreshList();
+                                 //                    break;
+                                 //                }
+                                 //                else
+                                 //                {
+                                 //                    form.RemoveFromParent();
+                                 //                }
+                                 //            }
+                                 //        }
+                                 //        else
+                                 //        {
+                                 //            completeBtn.Enable = true;
+                                 //            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnPasswordRemarkContent);
+                                 //        }
+                                 //    }
+                                 //}
+                                 //else
+                                 //{
+                                 //    completeBtn.Enable = true;
+                                 //    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnPasswordRemarkContent);
+                                 //}
 
                              }
                          }

--
Gitblit v1.8.0