Esempio n. 1
0
        public ActionResult AddMoneyToStudent(AddMoneyViewModel addMoneyViewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View("AddMoney"));
            }

            Account currentUser = (Account)Session[UserType.LoggedInUser.ToString()];

            currentUser.BankAccount.Deposit = ElearnerDataLayoutActions.AddMoneyToUser(currentUser.Id, addMoneyViewModel.Amount);

            return(View("Index"));
        }