Пример #1
0
        public bool Show(Transaction hint, out Transaction transaction)
        {
            transaction = null;

            ITransactionDetailsViewModel viewModel = m_transactionDetailsViewModelFactory.Create(hint);
            var  window = new TransactionDetailsWindow(viewModel);
            bool?result = window.ShowDialog();

            if (result.HasValue && result.Value)
            {
                transaction = viewModel.ToTransaction();
                return(true);
            }

            return(false);
        }
        public bool Show(int transactionId, out Transaction updatedTransaction)
        {
            updatedTransaction = null;

            ITransactionDetailsViewModel viewModel = m_transactionDetailsViewModelFactory.Create(transactionId);
            var  window = new TransactionDetailsWindow(viewModel);
            bool?result = window.ShowDialog();

            if (result.HasValue)
            {
                updatedTransaction = viewModel.ToTransaction();
                return(result.Value);
            }

            return(false);
        }