Esempio n. 1
0
        public MainViewModel(UnitOfWork UnitOfWork)
        {
            _CottagerInfoList = new ObservableCollection<CottagerInfo>();

            _UnitOfWork = UnitOfWork;
            _MonthList = _UnitOfWork.MonthDAO.getAll().ToList();

            RefreshList(_selectedMonthId);
        }
Esempio n. 2
0
 public StatementViewModel(UnitOfWork UnitOfWork, StatementView view, List<Month> MonthList, int SelectMonthId)
 {
     _selectedMonthId = SelectMonthId;
     _MonthList = MonthList;
    
     _instanceWindow = view;
     _UnitOfWork = UnitOfWork;
     _statementList = _UnitOfWork.StatementDAO.getAll().ToList();
     CurentStatement = _statementList.Where(x => x.MonthId == _selectedMonthId).FirstOrDefault();
 }
Esempio n. 3
0
        private void OnStartup(object sender, StartupEventArgs e)
        {
            UnitOfWork _uf = new UnitOfWork();
            
                MainView view = new MainView();

                MainViewModel MainVM = new MainViewModel(_uf);
                view.DataContext = MainVM;
                view.Show();
            
        }
Esempio n. 4
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;
        }
Esempio n. 5
0
 public PumpStationBL(UnitOfWork UnitOfWork)
 {
     _UnitOfWork = UnitOfWork;
 }
Esempio n. 6
0
 public TariffViewModel(UnitOfWork UnitOfWork, TariffView view)
 {
     _UnitOfWork = UnitOfWork;
     _instanceWindow = view;
     _Tarriff = _UnitOfWork.TariffDAO.getAll().FirstOrDefault();
 }