New file |
| | |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | |
|
| | | namespace Shared.Phone.UserCenter.Transfer
|
| | | {
|
| | | /// <summary>
|
| | | /// 根据账号名过户的画面
|
| | | /// </summary>
|
| | | public class TransferResidenceByIdForm : EditorCommonForm
|
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 1:移交给用户 2:授权给调试人员
|
| | | /// </summary>
|
| | | private int TransferDiv = 0;
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 初始化_____________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 画面显示(底层会固定调用此方法,借以完成画面创建)
|
| | | /// </summary>
|
| | | /// <param name="i_TransferDiv">1:移交给用户 2:授权给调试人员</param>
|
| | | public void ShowForm(int i_TransferDiv)
|
| | | {
|
| | | this.TransferDiv = i_TransferDiv;
|
| | |
|
| | | //设置标题信息
|
| | | base.SetTitleText(i_TransferDiv == 1
|
| | | ? Language.StringByID(R.MyInternationalizationString.uTransferResidenceAccount)
|
| | | : Language.StringByID(R.MyInternationalizationString.uAuthorizedAccount));
|
| | |
|
| | | //初始化中部控件
|
| | | this.InitMiddleFrame();
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化中部控件
|
| | | /// </summary>
|
| | | private void InitMiddleFrame()
|
| | | {
|
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | var frame = new FrameLayout();
|
| | | frame.Height = Application.GetRealHeight(248);
|
| | | frame.BackgroundColor = UserCenterColor.Current.White;
|
| | | bodyFrameLayout.AddChidren(frame);
|
| | |
|
| | | var rowAccount = new FrameRowControl();
|
| | | rowAccount.UseClickStatu = false;
|
| | | rowAccount.Y = Application.GetRealHeight(23);
|
| | | frame.AddChidren(rowAccount);
|
| | | //底线
|
| | | var btnLine = rowAccount.AddBottomLine();
|
| | |
|
| | | //请输入接收方的手机号或Email
|
| | | var txtCode = new TextInputControl(Application.GetRealWidth(900), rowAccount.Height, false);
|
| | | txtCode.MustInput = true;
|
| | | txtCode.X = ControlCommonResourse.XXLeft;
|
| | | txtCode.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputReceiverPhoneOrEmail);
|
| | | rowAccount.AddChidren(txtCode, ChidrenBindMode.NotBind);
|
| | | //联动线的状态
|
| | | txtCode.btnLine = btnLine;
|
| | |
|
| | | //下一步
|
| | | var btnBottom = new BottomClickButton(688);
|
| | | btnBottom.Y = Application.GetRealHeight(706);
|
| | | btnBottom.TextID = R.MyInternationalizationString.uNextway;
|
| | | btnBottom.CheckForm = true;
|
| | | bodyFrameLayout.AddChidren(btnBottom);
|
| | | btnBottom.ButtonClickEvent += ((sender, e) =>
|
| | | {
|
| | | //检索成员信息
|
| | | string strCode = txtCode.Text.Trim();
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | this.SearchMemberInfo(strCode);
|
| | | });
|
| | | });
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 搜索ID_____________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 搜索指定ID的信息
|
| | | /// </summary>
|
| | | /// <param name="accountId">成员ID</param>
|
| | | /// <param name="txtMsg">信息控件</param>
|
| | | private void SearchMemberInfo(string accountId)
|
| | | {
|
| | | //开启进度条
|
| | | this.ShowProgressBar();
|
| | |
|
| | | var pra = new AccountInfoPra();
|
| | | pra.Account = accountId;
|
| | | var byteData = UserCenterLogic.GetByteResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra, new List<string> { "NotCheck" });
|
| | | //关闭进度条
|
| | | this.CloseProgressBar();
|
| | |
|
| | | if (byteData == null)
|
| | | {
|
| | | //异常
|
| | | return;
|
| | | }
|
| | | var revertObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.ResponsePack>(System.Text.Encoding.UTF8.GetString(byteData));
|
| | | if (revertObj.StateCode == "AccountNoExists")
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //账号信息
|
| | | var form = new Member.MemberNotEsixtForm();
|
| | | form.AddForm(Language.StringByID(R.MyInternationalizationString.uAccountInfo));
|
| | | });
|
| | |
|
| | | return;
|
| | | }
|
| | |
|
| | | var infoResult = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountInfoResult>(revertObj.ResponseData.ToString());
|
| | | infoResult.Account = accountId;
|
| | |
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | var form2 = new AddMemberInfoForm();
|
| | | form2.AddForm(infoResult, this.TransferDiv);
|
| | | });
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | | }
|