Exemple #1
0
        public void ShowChargesAsync()
        {
            ChargesViewModel vm = new ChargesViewModel(this._serviceFactory);

            this._viewService.ExecuteBusyActionAsync <Charge[]>(() =>
            {
                return(this._repositoryService.GetOutstandingChargesForEmployeeAsync(this.CurrentUserEmployeeId));
            }).ContinueWith((charges) =>
            {
                var outstandingCharges = from charge in charges.Result
                                         select new ChargeViewModel(charge, this._serviceFactory);

                vm.LoadCharges(outstandingCharges);
                this.CurrentViewModel = vm;
            });
        }
        public void ShowChargesAsync()
        {
            ChargesViewModel vm = new ChargesViewModel(this._serviceFactory);
            this._viewService.ExecuteBusyActionAsync<Charge[]>(() =>
                {
                    return this._repositoryService.GetOutstandingChargesForEmployeeAsync(this.CurrentUserEmployeeId);
                }).ContinueWith((charges) =>
                {
                    var outstandingCharges = from charge in charges.Result
                                             select new ChargeViewModel(charge, this._serviceFactory);

                    vm.LoadCharges(outstandingCharges);
                    this.CurrentViewModel = vm;
                });
        }