void EditUser_Loaded(object sender, RoutedEventArgs e) { _vm = this.DataContext as EditUsersViewModel; if (NavigationService != null) userId = PresentationUtility.ParseIdFromUrl(NavigationService.CurrentSource); _vm.SetUp(); _vm.ChangingPassword = false; _vm.LoadByID(userId); }
void ChangeUserPassword_Loaded(object sender, RoutedEventArgs e) { _vm = this.DataContext as EditUsersViewModel; try { _vm.SetUp(); _vm.ChangingPassword = true; _vm.LoadByID(userId); txtOldPassword.Password = _vm.OldPassword; txtNewPassword.Password = _vm.NewPassword; txtPasswordConfirm.Password = _vm.ConfirmPassword; } catch (Exception ex) { MessageBox.Show("Error" + ex.Message); } }