хотфикс

This commit is contained in:
Maxim Slipenko 2022-05-25 08:23:03 +03:00
parent fe4e192538
commit 46cc1d3463
Signed by: Maks1mS
GPG Key ID: 7461AF39A8705FB8

View File

@ -45,14 +45,23 @@ namespace AwesomeEmailExtractor
User editedUser = new User(User.ID, loginTextBox.Text, (UserRoles)roleComboBox.SelectedIndex);
if (passwordTextBox.Text != "")
{
adminUtils.editUser(editedUser, passwordTextBox.Text);
}
else
try
{
adminUtils.editUser(editedUser);
if (passwordTextBox.Text != "")
{
adminUtils.editUser(editedUser, passwordTextBox.Text);
}
else
{
adminUtils.editUser(editedUser);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
this.Close();