| | |
| | | return;
|
| | | }
|
| | | //搜索ID
|
| | | this.SearchMemberInfo(qrCode);
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | this.SearchMemberInfo(qrCode);
|
| | | });
|
| | | },
|
| | | Language.StringByID(R.MyInternationalizationString.uCancel),
|
| | | Language.StringByID(R.MyInternationalizationString.uFlashlamp),
|
| | |
| | | /// <summary>
|
| | | /// 初始化成员列表
|
| | | /// </summary>
|
| | | private async void InitMemberList()
|
| | | private void InitMemberList()
|
| | | {
|
| | | //开启进度条
|
| | | this.ShowProgressBar();
|
| | |
|
| | | var pra = new MemberListInfoPra();
|
| | | string result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra);
|
| | | if (result == null)
|
| | | string result = UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra);
|
| | | if (string.IsNullOrEmpty(result) == true)
|
| | | {
|
| | | //关闭进度条
|
| | | this.CloseProgressBar(ShowReLoadMode.YES);
|
| | |
| | | //关闭进度条
|
| | | this.CloseProgressBar();
|
| | |
|
| | | //先清空成员列表信息
|
| | | UserCenterResourse.ListMemberInfo.Clear();
|
| | |
|
| | | List<string> listCheck = new List<string>();
|
| | | List<MemberInfoRes> listShowInfo = new List<MemberInfoRes>();
|
| | | foreach (MemberInfoRes infoRes in listInfo)
|
| | | {
|
| | | if (listCheck.Contains(infoRes.DistributedMark) == true
|
| | |
| | |
|
| | | listCheck.Add(infoRes.DistributedMark);
|
| | | //添加成员信息的缓存
|
| | | UserCenterResourse.ListMemberInfo.Add(infoRes);
|
| | | listShowInfo.Add(infoRes);
|
| | | }
|
| | | listInfo.Clear();
|
| | | //保存成员信息的缓存到本地文件
|
| | | UserCenterLogic.SaveLocalMemberListInfo();
|
| | | if (UserCenterResourse.ListMemberInfo.Count == 0)
|
| | | if (listShowInfo.Count == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //添加成员列表
|
| | | this.AddMemberListRowByData();
|
| | | this.AddMemberListRowByData(listShowInfo);
|
| | | });
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 添加成员列表
|
| | | /// </summary>
|
| | | private void AddMemberListRowByData()
|
| | | private void AddMemberListRowByData(List<MemberInfoRes> listNewInfo)
|
| | | {
|
| | | if (this.Parent == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var listNewInfo = UserCenterResourse.ListMemberInfo;
|
| | |
|
| | | int count = listNewInfo.Count - 1;
|
| | | for (int i = 0; i < listNewInfo.Count; i++)
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | var pra = new AccountInfoPra();
|
| | | foreach (var keys in dicMemberAccount.Keys)
|
| | |
| | | return;
|
| | | }
|
| | | pra.Account = dicMemberAccount[keys];
|
| | | var result = await UserCenterLogic.GetByteResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra, new List<string>() { "NotSetAgain" });
|
| | | var result = UserCenterLogic.GetByteResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra);
|
| | | if (result == null)
|
| | | {
|
| | | continue;
|
| | |
| | | /// </summary>
|
| | | /// <param name="accountId">成员ID</param>
|
| | | /// <param name="txtMsg">信息控件</param>
|
| | | private async void SearchMemberInfo(string accountId)
|
| | | private void SearchMemberInfo(string accountId)
|
| | | {
|
| | | var pra = new AccountInfoPra();
|
| | | pra.Account = accountId;
|
| | | string result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra, new List<string>() { "AccountNoExists" });
|
| | | if (result == null)
|
| | | var byteData = UserCenterLogic.GetByteResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra, new List<string>() { "AccountNoExists" });
|
| | | 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();
|
| | |
| | | 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);
|