public IActionResult VerifyWallet(int walletNumber)
        {
            var wallet = _walletService.GetWalletByWalletNumber(walletNumber, includeAccounts: true);

            var model = _mapper.Map <VerifyWalletViewModel>(wallet);

            model.CurrencyList = _mapper.Map <List <CurrencyModel> >(_nomenclatureService.GetCurrencies());

            return(View(model));
        }
        public async Task <IActionResult> ChangeSalary(string email)
        {
            var empSalary = await _managerService.GetEmployeeSalary(email);

            var model = _mapper.Map <UpdateEmployeeSalaryViewModel>(empSalary);

            model.Currencies    = _mapper.Map <List <CurrencyViewModel> >(await _nomenclatureService.GetCurrencies());
            model.SalaryTypes   = _mapper.Map <List <SalaryTypeViewModel> >(await _nomenclatureService.GetSalaryTypes());
            model.StatusMessage = StatusMessage;

            return(View(model));
        }
        public async Task <IActionResult> ChangeSalary(string email)
        {
            if (!(await _managerService.IsManagerToEmployee(User.Identity.Name, email)))
            {
                return(RedirectToAction(nameof(AccountController.AccessDenied), "Account"));
            }

            var empSalary = await _managerService.GetEmployeeSalary(email);

            var model = _mapper.Map <UpdateEmployeeSalaryViewModel>(empSalary);

            model.Currencies    = _mapper.Map <List <CurrencyViewModel> >(await _nomenclatureService.GetCurrencies());
            model.SalaryTypes   = _mapper.Map <List <SalaryTypeViewModel> >(await _nomenclatureService.GetSalaryTypes());
            model.StatusMessage = StatusMessage;

            return(View(model));
        }
Exemple #4
0
        public IActionResult CreateAccountView(int walletId)
        {
            var tempAccount = new AccountModel
            {
                WalletId = walletId
            };

            var currenciesServiceModel = _nomenclatureService.GetCurrencies();

            var currenciesModel = _mapper.Map <List <CurrencyModel> >(currenciesServiceModel);

            TempData.Put("Currencies", currenciesModel);

            return(View(tempAccount));
        }