private void DoCottagerCmd() { CottagerView cottagerView = new CottagerView(); CottagerViewModel cottagerViewModel = new CottagerViewModel(_UnitOfWork, _MonthList, _selectedMonthId, cottagerView); cottagerView.DataContext = cottagerViewModel; cottagerView.ShowDialog(); if (cottagerView.DialogResult.HasValue && cottagerView.DialogResult.Value) { } RefreshList(_selectedMonthId); }