Пример #1
0
        public KindsListPageViewModel(IDbService dbService, INavigationService navigationService, IDialogService dialogService, IStorageService storageService) : base(navigationService, dbService, storageService)
        {
            this.dialogService = dialogService;

            newKindCommand      = new DelegateCommand(NewKindExecute);
            editKindCommand     = new DelegateCommand(EditKindExecute);
            deleteKindCommand   = new DelegateCommand(DeleteKindExecute);
            kindSelectedCommand = new Base.DelegateCommandWithParameter <Kind>(KindSelectedExecute);

            LoadKinds();
        }
Пример #2
0
        public MovementsListPageViewModel(IDbService dbService, INavigationService navigationService, IDialogService dialogService, IStorageService storageService) : base(navigationService, dbService, storageService)
        {
            this.dialogService = dialogService;

            newMovementCommand      = new DelegateCommand(NewMovementExecute);
            deleteMovementCommand   = new DelegateCommand(DeleteMovementExecute);
            movementSelectedCommand = new Base.DelegateCommandWithParameter <Movement>(MovementSelectedExecute);

            yearChangedCommand  = new DelegateCommand(YearChangedExecute);
            monthChangedCommand = new DelegateCommand(MonthChangedExecute);

            LoadYears();
            LoadMonths();

            DateTime today = DateTime.Today;

            SelectedYear  = today.Year;
            SelectedMonth = today.Month - 1;
            LoadMovements();
        }