Пример #1
0
        protected async Task EditPassword(PasswordModel model)
        {
            if (model == null)
            {
                EditPasswordViewModel.DialogIsOpen = false;
                return;
            }

            try
            {
                EditPasswordViewModel.ErrorMessage = await Service.UpdatePassword(currentItem, model.OldPassword, model.NewPassword);

                if (string.IsNullOrEmpty(EditPasswordViewModel.ErrorMessage))
                {
                    EditPasswordViewModel.DialogIsOpen = false;
                }
            }
            catch (Exception e)
            {
                Logger.LogError(e, $"{GetUserName()}*Error: AspNetUsers/EditPassword");
                ErrorModel.IsOpen       = true;
                ErrorModel.ErrorContext = e.StackTrace;
                ErrorModel.ErrorMessage = e.Message;
                IsFailed = true;
                StateHasChanged();
            }
        }
Пример #2
0
        public object Clone()
        {
            PasswordModel tempObject = (PasswordModel)this.MemberwiseClone();

            return(tempObject);
        }