Ejemplo n.º 1
0
        //// GET: Transaction/Details/5
        //public async Task<IActionResult> Details(int? id)
        //{
        //    if (id == null)
        //    {
        //        return NotFound();
        //    }

        //    var transaction = await _transactionService.GetTransactions()
        //        .Include(t => t.PaymentType)
        //        .Include(t => t.TransactionCategoryDTO)
        //        .FirstOrDefaultAsync(m => m.Id == id);
        //    if (transaction == null)
        //    {
        //        return NotFound();
        //    }

        //    return View(transaction);
        //}

        // GET: Transaction/Create
        public IActionResult Create()
        {
            ViewData["PaymentTypeId"]         = new SelectList(_paymentTypeService.GetPaymentTypes(), "Id", "Name");
            ViewData["TransactionCategoryId"] = new SelectList(_transactionCategoryService.GetTransactionCategories(), "Id", "Name");
            return(View(new TransactionDTO()));
        }
Ejemplo n.º 2
0
 public List <PaymentType> GetPaymentTypes()
 {
     return(PaymentTypes = _paymentTypeService.GetPaymentTypes());
 }