private void EditExecute(object obj) { AccountRelationship updatedRelationship; if (m_accountRelationshipEditViewService.Show( SelectedAccountRelationship.AccountRelationshipId, out updatedRelationship)) { AccountRelationships.Remove(SelectedAccountRelationship); SelectedAccountRelationship = m_accountRelationshipItemViewModelFactory.Create(updatedRelationship); AccountRelationships.Add(SelectedAccountRelationship); } }
private void CreateExecute(object obj) { AccountRelationship hint = null; IAccountRelationshipItemViewModel hintViewModel = AccountRelationships.FirstOrDefault(); if (AccountRelationships.Any()) { hint = m_accountRelationshipService.Get(AccountRelationships.First().AccountRelationshipId); } AccountRelationship newRelationship; if (m_accountRelationshipCreateViewService.Show(hint, out newRelationship)) { IAccountRelationshipItemViewModel viewModel = m_accountRelationshipItemViewModelFactory.Create(newRelationship); AccountRelationships.Add(viewModel); } }