| | |
| | | { |
| | | try |
| | | { |
| | | var resultObj = ApiUtlis.Ins.HttpRequest.EditDoorlockUserName(device.deviceId, doorlockUser.extUserId, str); |
| | | if (resultObj.Code == StateCode.SUCCESS) |
| | | var pack = ApiUtlis.Ins.HttpRequest.EditDoorlockUserName(device.deviceId, doorlockUser.extUserId, str); |
| | | if (pack.Code == StateCode.SUCCESS) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | |
| | | else |
| | | { |
| | | //失败提示 |
| | | IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (!string.IsNullOrEmpty(pack.message)) |
| | | { |
| | | var tip = new Tip() |
| | | { |
| | | MaxWidth = Application.GetRealWidth(300), |
| | | Text = $"{pack.message}({pack.Code})", |
| | | CloseTime = 3, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(MainPage.BaseView); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | var pa = new PublicAssmebly(); |
| | | pa.entryMaxLength = 20; |
| | | pa.entryMaxLength = 30; |
| | | pa.LoadDialog_EditParater(StringId.ChangeName, "", callBack, StringId.UesrNameCannotBeEmpty, 0, new List<string>()); |
| | | }; |
| | | btnUserName.MouseUpEventHandler = eventHandler; |