黄学彪
2020-07-06 f23ad1b3f9f6193f35f72104d690b21dc67d5c1f
ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
@@ -66,7 +66,11 @@
                    return;
                }
                //检索成员信息
                this.SearchMemberInfo(txtCode.Text.Trim());
                string strCode = txtCode.Text.Trim();
                HdlThreadLogic.Current.RunThread(() =>
                {
                    this.SearchMemberInfo(strCode);
                });
            });
        }
@@ -79,23 +83,24 @@
        /// </summary>
        /// <param name="accountId">成员ID</param>
        /// <param name="txtMsg">信息控件</param>
        private async void SearchMemberInfo(string accountId)
        private void SearchMemberInfo(string accountId)
        {
            //开启进度条
            this.ShowProgressBar();
            var pra = new AccountInfoPra();
            pra.Account = accountId;
            string result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra, new System.Collections.Generic.List<string>() { "AccountNoExists" });
            var byteData = UserCenterLogic.GetByteResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra, new System.Collections.Generic.List<string>() { "AccountNoExists" });
            //关闭进度条
            this.CloseProgressBar();
            if (result == null)
            if (byteData == null)
            {
                //异常
                return;
            }
            if (result == string.Empty)
            var revertObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.ResponsePack>(System.Text.Encoding.UTF8.GetString(byteData));
            if (revertObj.StateCode == "AccountNoExists")
            {
                //成员不存在
                var form = new MemberNotEsixtForm();
@@ -103,10 +108,10 @@
                return;
            }
            var infoResult = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountInfoResult>(result);
            var infoResult = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountInfoResult>(revertObj.ResponseData.ToString());
            infoResult.Account = accountId;
            Application.RunOnMainThread(() =>
            HdlThreadLogic.Current.RunMain(() =>
            {
                var form = new AddMemberInfoForm();
                form.AddForm(infoResult);