private void LockBankAccount(BankAccountsDTO bankAccount) { if (bankAccount == null || !BankAccounts.Contains(bankAccount)) { return; } var result = MessageBox.Show("Biztos benne?", "Figyelmeztetés", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes; if (result) { _model.LockBankAccount(bankAccount); } }