private void applyButton_Click(object sender, EventArgs e) { if (roleChanged) { int roleId = UserForEdit.UserRole == "Сотрудник" ? 1 : 2; processor.ChangeUserRole(UserForEdit.EmailAddress, roleId); form.DeblockForm(); this.Close(); } }