public async Task <OrphanageDataModel.FinancialData.Account> getAccount(int Aid)
        {
            var returnedAccount = await _apiClient.Accounts_GetAsync(Aid);

            _CurrentAccount = returnedAccount;
            return(returnedAccount);
        }
Exemple #2
0
        public async void Update(int accountId)
        {
            var sourceAccount = await _apiClient.Accounts_GetAsync(accountId);

            var sourceAccountToReplace = _SourceAccounts.FirstOrDefault(b => b.Id == accountId);
            var sourceAccountIndex     = _SourceAccounts.IndexOf(sourceAccountToReplace);

            _SourceAccounts[sourceAccountIndex] = sourceAccount;

            var accountModel = _mapperService.MapToAccountModel(sourceAccount);

            var accountToEdit      = Accounts.FirstOrDefault(c => c.Id == accountId);
            var accountToEditIndex = Accounts.IndexOf(accountToEdit);

            Accounts[accountToEditIndex] = accountModel;
        }