Merge pull request #38 from PI20v/dev

хотфикс
This commit is contained in:
Maxim Slipenko 2022-05-25 08:27:39 +03:00 committed by GitHub
commit 9d0c1ccf59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();