private void ExecuteSaveAccountCommand() { try { SelectedFinancialAccount.BankName = SelectedBank.DisplayName; var isNewObject = SelectedFinancialAccount.Id; var stat = _financialAccountService.InsertOrUpdate(SelectedFinancialAccount); if (string.IsNullOrEmpty(stat)) { if (isNewObject == 0) { FinancialAccounts.Insert(0, SelectedFinancialAccount); } } else { MessageBox.Show("Got Problem while saving, try again..." + Environment.NewLine + stat, "save error", MessageBoxButton.OK, MessageBoxImage.Error); } } catch (Exception exception) { MessageBox.Show("Got Problem while saving, try again..." + Environment.NewLine + exception.Message, "save error", MessageBoxButton.OK, MessageBoxImage.Error); } }