Esempio n. 1
0
        public async Task OnGetAsync(int id, bool correcting = false, string returnPage = "./AccountsList")
        {
            var account = correcting ? null : await _accountQueries.GetById(id);

            Topup = new TopupAccount
            {
                Id          = id,
                Correcting  = correcting,
                AccountName = account?.Name,
                TopupDate   = _timeService.ClientLocalNow.ToStandardString(false),
                ReturnPage  = returnPage,
            };
            IncomeTypes = await _incomeTypeQueries.GetAll();

            Accounts = await _accountQueries.GetAll();

            if (correcting)
            {
                var balanceState = await _inventorizationQueries.GetBalanceState();

                Topup.Amount = balanceState.Balance.ToStandardString();
            }
        }
Esempio n. 2
0
        private async Task PrepareModelsAsync()
        {
            Accounts = await _accountQueries.GetAll();

            IncomeTypes = await _incomeTypeQueries.GetAll();
        }