From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 09:07:13 +0800 Subject: [PATCH] 新云端Ver1.3 --- ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs | 33 +++++++++++++++++---------------- 1 files changed, 17 insertions(+), 16 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs index f9b943a..d2d23d3 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs @@ -47,7 +47,7 @@ //璇疯緭鍏ラ渶瑕佸姞鍏ユ垚鍛樼殑ID(Email/鎵嬫満鍙�) var txtCode = new TextInputControl(Application.GetRealWidth(900), rowAccount.Height, false); - txtCode.X = ControlCommonResourse.XXLeft; + txtCode.X = HdlControlResourse.XXLeft; txtCode.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputAddMenberID); rowAccount.AddChidren(txtCode, ChidrenBindMode.NotBind); //鑱斿姩绾跨殑鐘舵�� @@ -66,7 +66,11 @@ return; } //妫�绱㈡垚鍛樹俊鎭� - this.SearchMemberInfo(txtCode.Text.Trim()); + string strCode = txtCode.Text.Trim(); + HdlThreadLogic.Current.RunThread(() => + { + this.SearchMemberInfo(strCode); + }); }); } @@ -79,37 +83,34 @@ /// </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 result = HdlMemberLogic.Current.SearchNormalInfoByAccount(accountId); //鍏抽棴杩涘害鏉� this.CloseProgressBar(); if (result == null) { - //寮傚父 return; } - if (result == string.Empty) + if (result.Account == string.Empty) { - //鎴愬憳涓嶅瓨鍦� - var form = new MemberNotEsixtForm(); - form.AddForm(); + HdlThreadLogic.Current.RunMain(() => + { + //鎴愬憳涓嶅瓨鍦� + var form = new MemberNotEsixtForm(); + form.AddForm(Language.StringByID(R.MyInternationalizationString.uMemberInformation)); + }); return; } - var infoResult = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountInfoResult>(result); - infoResult.Account = accountId; - - Application.RunOnMainThread(() => + HdlThreadLogic.Current.RunMain(() => { var form = new AddMemberInfoForm(); - form.AddForm(infoResult); + form.AddForm(result); }); } -- Gitblit v1.8.0