Ejemplo n.º 1
0
        public ActionResult Create(LedgerViewModel ledger)
        {
            if (ModelState.IsValid)
            {
                _ledgerService.Add(new AccountBook
                {
                    Id         = Guid.NewGuid(),
                    Categoryyy = (int)ledger.LedgerType,
                    Amounttt   = ledger.Amount,
                    Dateee     = ledger.Date,
                    Remarkkk   = ledger.Remark
                });

                _ledgerService.Save();
                return(RedirectToAction("Index"));
            }
            return(View("Index", ledger));
        }