public MainWindowViewModel(IServiceFactory serviceFactory) { this._serviceFactory = serviceFactory; this._currentIdentityService = serviceFactory.CurrentIdentityService; this._viewService = serviceFactory.ViewService; this._navigationService = serviceFactory.NavigationService; this._repositoryService = serviceFactory.RepositoryService; this.NewChargeCommand = new RelayCommand(() => this.NewCharge()); this.ShowChargesCommand = new RelayCommand(() => this.ShowChargesAsync()); this.NewReportCommand = new RelayCommand(async() => await this.NewReport()); this.ShowSavedReportsCommand = new RelayCommand(async() => await this.ShowSavedReportsAsync()); this.ShowSubmittedReportsCommand = new RelayCommand(async() => await this.ShowSubmittedReportsAsync()); this.ShowApprovedReportsCommand = new RelayCommand(async() => await this.ShowApprovedReportsAsync()); this.ResetDataCommand = new RelayCommand(async() => await this.ResetDataAsync()); }
public ChargesViewModel(IServiceFactory serviceFactory) { this._serviceFactory = serviceFactory; this._navigationService = serviceFactory.NavigationService; this._viewService = serviceFactory.ViewService; this._repositoryService = serviceFactory.RepositoryService; this._currentIdentityService = serviceFactory.CurrentIdentityService; this.Charges = new ObservableCollection <ChargeViewModel>(); this.ViewChargeCommand = new RelayCommand <ChargeViewModel>( (charge) => { this.ViewCharge(charge); }); }
public ChargesViewModel(IServiceFactory serviceFactory) { this._serviceFactory = serviceFactory; this._navigationService = serviceFactory.NavigationService; this._viewService = serviceFactory.ViewService; this._repositoryService = serviceFactory.RepositoryService; this._currentIdentityService = serviceFactory.CurrentIdentityService; this.Charges = new ObservableCollection<ChargeViewModel>(); this.ViewChargeCommand = new RelayCommand<ChargeViewModel>( (charge) => { this.ViewCharge(charge); }); }
public MainWindowViewModel(IServiceFactory serviceFactory) { this._serviceFactory = serviceFactory; this._currentIdentityService = serviceFactory.CurrentIdentityService; this._viewService = serviceFactory.ViewService; this._navigationService = serviceFactory.NavigationService; this._repositoryService = serviceFactory.RepositoryService; this.NewChargeCommand = new RelayCommand(() => this.NewCharge()); this.ShowChargesCommand = new RelayCommand(() => this.ShowChargesAsync()); this.NewReportCommand = new RelayCommand(async () => await this.NewReport()); this.ShowSavedReportsCommand = new RelayCommand(async () => await this.ShowSavedReportsAsync()); this.ShowSubmittedReportsCommand = new RelayCommand(async () => await this.ShowSubmittedReportsAsync()); this.ShowApprovedReportsCommand = new RelayCommand(async () => await this.ShowApprovedReportsAsync()); this.ResetDataCommand = new RelayCommand(async () => await this.ResetDataAsync()); }
public ExpenseReportsViewModel(IServiceFactory serviceFactory) { this._serviceFactory = serviceFactory; this._currentIdentityService = serviceFactory.CurrentIdentityService; this._navigationService = serviceFactory.NavigationService; this._repositoryService = serviceFactory.RepositoryService; this._viewService = serviceFactory.ViewService; this._expenseReports = new ObservableCollection<ExpenseReportViewModel>(); this._groupedExpenseReports = new ObservableCollection<GroupInfoList<object>>(); this.ViewReportCommand = new RelayCommand<ExpenseReportViewModel>( (report) => { this.ViewReport(report); }); }
public ExpenseReportsViewModel(IServiceFactory serviceFactory) { this._serviceFactory = serviceFactory; this._currentIdentityService = serviceFactory.CurrentIdentityService; this._navigationService = serviceFactory.NavigationService; this._repositoryService = serviceFactory.RepositoryService; this._viewService = serviceFactory.ViewService; this._expenseReports = new ObservableCollection <ExpenseReportViewModel>(); this._groupedExpenseReports = new ObservableCollection <GroupInfoList <object> >(); this.ViewReportCommand = new RelayCommand <ExpenseReportViewModel>( (report) => { this.ViewReport(report); }); }
public ExpenseReportViewModel(IServiceFactory serviceFactory) { this._currentIdentityService = serviceFactory.CurrentIdentityService; this._navigationService = serviceFactory.NavigationService; this._repositoryService = serviceFactory.RepositoryService; this._viewService = serviceFactory.ViewService; employeeId = this._currentIdentityService.EmployeeId; employeeName = this._currentIdentityService.Name; approver = this._currentIdentityService.Manager; costCenter = 50992; this.SaveReportCommand = new RelayCommand( async() => { await this.SaveAsync(); }); this.DeleteReportCommand = new RelayCommand( async() => { await this.DeleteAsync(); }); this.SubmitReportCommand = new RelayCommand( async() => { await this.SubmitAsync(); }); this.ApproveReportCommand = new RelayCommand( async() => { await this.ApproveAsync(); }); }
public ExpenseReportsViewModel(IServiceFactory serviceFactory) { this._serviceFactory = serviceFactory; this._currentIdentityService = serviceFactory.CurrentIdentityService; this._navigationService = serviceFactory.NavigationService; this._repositoryService = serviceFactory.RepositoryService; this._viewService = serviceFactory.ViewService; this._expenseReports = new ObservableCollection <ExpenseReportViewModel>(); this._groupedExpenseReports = new ObservableCollection <GroupInfoList <object> >(); this.ViewReportCommand = new RelayCommand <ExpenseReportViewModel>( (report) => { this.ViewReport(report); }); RefreshDataCommand = new Command( async() => await RefreshData()); Title = "Expense Reports"; this._viewService.BusyChanged += _viewService_BusyChanged; }
public ExpenseReportViewModel(IServiceFactory serviceFactory) { this._currentIdentityService = serviceFactory.CurrentIdentityService; this._navigationService = serviceFactory.NavigationService; this._repositoryService = serviceFactory.RepositoryService; this._viewService = serviceFactory.ViewService; employeeId = this._currentIdentityService.EmployeeId; employeeName = this._currentIdentityService.Name; approver = this._currentIdentityService.Manager; costCenter = 50992; this.SaveReportCommand = new RelayCommand( async () => { await this.SaveAsync(); }); this.DeleteReportCommand = new RelayCommand( async () => { await this.DeleteAsync(); }); this.SubmitReportCommand = new RelayCommand( async () => { await this.SubmitAsync(); }); this.ApproveReportCommand = new RelayCommand( async () => { await this.ApproveAsync(); }); }
public RefreshTokenHandlers(ICurrentIdentityService currentIdentityService, ITokenService tokenService) { _currentIdentityService = currentIdentityService; _tokenService = tokenService; }