public bool Show(int budgetId, out Budget budget)
        {
            budget = null;

            IBudgetDetailsViewModel viewModel = m_budgetDetailsViewModelFactory.Create(budgetId);
            var  window = new BudgetDetailsWindow(viewModel);
            bool?result = window.ShowDialog();

            if (result.HasValue && result.Value)
            {
                budget = viewModel.ToBudget();
                return(true);
            }

            return(false);
        }
示例#2
0
        public BudgetDetailsWindow(IBudgetDetailsViewModel viewModel)
        {
            InitializeComponent();

            DataContext = viewModel;
        }