Пример #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
        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);

        }