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;
        }
Example #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);

        }