示例#1
0
        public ActionResult Index(TallyRecord model)
        {
            if (ModelState.IsValid)
            {
                _tallyService.Add(model);
                _tallyService.Save();

                return(RedirectToAction("Detail"));
            }
            return(View(model));
        }
示例#2
0
        public void Add(TallyRecord model)
        {
            var entity = new AccountBook()
            {
                Id         = Guid.NewGuid(),
                Categoryyy = (int)model.Category,
                Amounttt   = model.Money,
                Dateee     = model.Date,
                Remarkkk   = model.Description
            };

            _accountBook.Insert(entity);
        }