diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj
index d86e6ce6..d1f7348e 100644
--- a/ENI2/ENI2.csproj
+++ b/ENI2/ENI2.csproj
@@ -236,6 +236,9 @@
ValueMappingsControl.xaml
+
+ ChangePasswordDialog.xaml
+
CompareExcelDialog.xaml
@@ -568,6 +571,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/ENI2/EditControls/ChangePasswordDialog.xaml b/ENI2/EditControls/ChangePasswordDialog.xaml
new file mode 100644
index 00000000..318e3a4b
--- /dev/null
+++ b/ENI2/EditControls/ChangePasswordDialog.xaml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ENI2/EditControls/ChangePasswordDialog.xaml.cs b/ENI2/EditControls/ChangePasswordDialog.xaml.cs
new file mode 100644
index 00000000..8c559bc7
--- /dev/null
+++ b/ENI2/EditControls/ChangePasswordDialog.xaml.cs
@@ -0,0 +1,90 @@
+// Copyright (c) 2017- schick Informatik
+// Description: Users may change their password
+//
+
+using bsmd.database;
+using ENI2.Controls;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace ENI2.EditControls
+{
+ ///
+ /// Interaction logic for ChangePasswordDialog.xaml
+ ///
+ public partial class ChangePasswordDialog : EditWindowBase
+ {
+
+ #region Construction
+
+ public ChangePasswordDialog()
+ {
+ InitializeComponent();
+ }
+
+ #endregion
+
+ #region Properties
+
+ public ReportingParty CurrentUser { get; set; }
+
+ #endregion
+
+ #region event handler
+
+ private void buttonChangePassword_Click(object sender, RoutedEventArgs e)
+ {
+ bool success = false;
+ string message = "";
+ if(!textBoxOldPassword.Password.IsNullOrEmpty())
+ {
+ if(CurrentUser.GetHash(textBoxOldPassword.Password).Equals(CurrentUser.PasswordHash))
+ {
+ if(textBoxNew1Password.Password.IsNullOrEmpty() ||
+ textBoxNew2Password.Password.IsNullOrEmpty() ||
+ !textBoxNew1Password.Password.Equals(textBoxNew2Password.Password))
+ {
+ message = "New passwords are empty or do not match";
+ }
+ else
+ {
+ if (textBoxOldPassword.Password.Equals(textBoxNew1Password.Password))
+ {
+ message = "Old and new password are the same";
+ }
+ else
+ {
+ CurrentUser.SetPassword(textBoxNew1Password.Password);
+ DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(CurrentUser);
+ success = true;
+ }
+ }
+ }
+ else
+ {
+ message = "Old password is not correct";
+ }
+ }
+ else
+ {
+ message = "Old password empty";
+ }
+ if (!success)
+ MessageBox.Show(message, "Changing password failed", MessageBoxButton.OK, MessageBoxImage.Error);
+ else
+ MessageBox.Show("Password successfully changed.", "Password changed", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+
+ private void EditWindowBase_Loaded(object sender, RoutedEventArgs e)
+ {
+ this.textBlockName.Text = CurrentUser.Name;
+ this.AddVisible = false;
+ this.OkVisible = false;
+ var cancelButton = (Button)Template.FindName("buttonCancel", this);
+ cancelButton.Content = "Close";
+ }
+
+ #endregion
+
+ }
+}
diff --git a/ENI2/MainWindow.xaml b/ENI2/MainWindow.xaml
index 3eae5232..e5e5feaf 100644
--- a/ENI2/MainWindow.xaml
+++ b/ENI2/MainWindow.xaml
@@ -97,6 +97,11 @@