Ejemplo n.º 1
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;
            });
        }
        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;
                });
        }