public AccountSelectView(object context) { _vm = context as AccountSelectViewModel; this.DataContext = _vm; InitializeComponent(); }
async private void setUp(int code) { _vm = await AccountSelectViewModel.CreateAsync(code); //_vm.OnRequestClose += (s, e) => this.Close(); InitializeComponent(); this.DataContext = _vm; }
public AccountTransactionDocumentAccountMapViewModel(IAccountService accountService, AccountTransactionDocumentAccountMap accountTransactionDocumentAccountMap, AccountType masterAccountType, AccountType mappingAccountType) { Model = accountTransactionDocumentAccountMap; AccountSelector = new AccountSelectViewModel(accountService, masterAccountType, Model.AccountName, (x, y) => { Model.AccountId = y; Model.AccountName = x; }); if (mappingAccountType != null) { MappedAccountSelector = new AccountSelectViewModel(accountService, mappingAccountType, Model.MappedAccountName, (x, y) => { Model.MappedAccountId = y; Model.MappedAccountName = x; }); } }
public AccountTransactionDocumentAccountMapViewModel(IAccountService accountService, AccountTransactionDocumentAccountMap accountTransactionDocumentAccountMap, AccountType masterAccountType, AccountType mappingAccountType) { Model = accountTransactionDocumentAccountMap; AccountSelector = new AccountSelectViewModel(accountService, masterAccountType, Model.AccountName, (x, y) => { Model.AccountId = y; Model.AccountName = x; }); if (mappingAccountType != null) { MappedAccountSelector = new AccountSelectViewModel(accountService, mappingAccountType, Model.MappedAccountName, (x, y) => { Model.MappedAccountId = y; Model.MappedAccountName = x; }); } }
public AccountSelectView() { InitializeComponent(); _viewModel = new AccountSelectViewModel(); DataContext = _viewModel; }