public void ShowExpenseReport(ExpenseReportViewModel expenseReportViewModel)
 {
     EventHandler<EventArgs<ExpenseReportViewModel>> handler = this.ShowExpenseReportRequested;
     if (handler != null)
     {
         handler(this, new EventArgs<ExpenseReportViewModel>(expenseReportViewModel));
     }
 }
        public async Task NewReport()
        {
            ExpenseReportViewModel reportVM = new ExpenseReportViewModel(this._serviceFactory)
            {
                Approver        = this.CurrentUserManager,
                EmployeeId      = this.CurrentUserEmployeeId,
                ExpenseReportId = 0,
            };

            await this.ShowExpenseReportAsync(reportVM);
        }
예제 #3
0
        public async Task ShowExpenseReportAsync(ExpenseReportViewModel expenseReportViewModel)
        {
            await this._viewService.ExecuteBusyActionAsync(
                async() =>
            {
                var editReportVM           = new EditExpenseReportViewModel(this._serviceFactory);
                editReportVM.ExpenseReport = expenseReportViewModel;

                AddChargesViewModel addChargesVM = new AddChargesViewModel(this._serviceFactory);
                await addChargesVM.LoadChargesAsync();
                editReportVM.AddCharges = addChargesVM;

                ExpenseReportChargesViewModel associatedChargesVM = new ExpenseReportChargesViewModel(this._serviceFactory);
                await associatedChargesVM.LoadChargesAsync(expenseReportViewModel.ExpenseReportId);
                editReportVM.AssociatedCharges = associatedChargesVM;

                this.CurrentViewModel = editReportVM;
            });
        }
 private void ViewReport(ExpenseReportViewModel reportViewModel)
 {
     this._navigationService.ShowExpenseReport(reportViewModel);
 }
 private void ViewReport(ExpenseReportViewModel reportViewModel)
 {
     this._navigationService.ShowExpenseReport(reportViewModel);
 }
        public async Task ShowExpenseReportAsync(ExpenseReportViewModel expenseReportViewModel)
        {
            await this._viewService.ExecuteBusyActionAsync(
                async () =>
                {
                    var editReportVM = new EditExpenseReportViewModel(this._serviceFactory);
                    editReportVM.ExpenseReport = expenseReportViewModel;

                    AddChargesViewModel addChargesVM = new AddChargesViewModel(this._serviceFactory);
                    await addChargesVM.LoadChargesAsync();
                    editReportVM.AddCharges = addChargesVM;

                    ExpenseReportChargesViewModel associatedChargesVM = new ExpenseReportChargesViewModel(this._serviceFactory);
                    await associatedChargesVM.LoadChargesAsync(expenseReportViewModel.ExpenseReportId);
                    editReportVM.AssociatedCharges = associatedChargesVM;

                    this.CurrentViewModel = editReportVM;
                });
        }
        public async Task NewReport()
        {
            ExpenseReportViewModel reportVM = new ExpenseReportViewModel(this._serviceFactory)
            {
                Approver = this.CurrentUserManager,
                EmployeeId = this.CurrentUserEmployeeId,
                ExpenseReportId = 0,
            };

            await this.ShowExpenseReportAsync(reportVM);
        }