예제 #1
0
        public ActionResult Edit(int id, int accountId)
        {
            var context           = _transactionLogic.GetTransactionById(id, accountId);
            var categoriesContext = _transactionLogic.GetCategories();
            var categories        = categoriesContext.Select(category => category.Name).ToList();
            var model             = new TransactionsViewModel(context.TransactionId, accountId, context.TransactionName, context.TransactionAmount, context.Category, context.IconId, context.TimeOfTransaction, _fileProvider.GetDirectoryContents("wwwroot/Icons/Category").ToList().Select(icon => icon.Name).ToList());

            return(View("~/Views/Transaction/EditTransaction.cshtml", model));
        }