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; });
     }
 }
Esempio n. 4
0
 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; });
     }
 }
Esempio n. 5
0
 public AccountSelectView()
 {
     InitializeComponent();
     _viewModel  = new AccountSelectViewModel();
     DataContext = _viewModel;
 }