コード例 #1
0
        public CottagerViewModel(UnitOfWork unitOfWork, List <Month> monthList, int monthID, CottagerView view)
        {
            _instanceWindow = view;

            _selectedMonthId = monthID;
            _UnitOfWork      = unitOfWork;
            RefreshList(_selectedMonthId);

            _PumpStationBL = new PumpStationBL(_UnitOfWork);

            _MothList = monthList;
        }
コード例 #2
0
ファイル: MainViewModel.cs プロジェクト: ksander2/PumpStation
        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);
        }