コード例 #1
0
        public ActionResult Create(TransCreate model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }


            if (_service.CreateTrans(model))
            {
                TempData["SaveResult"] = "Your transaction was created.";
                return(RedirectToAction("Index"));
            }
            ;

            ModelState.AddModelError("", "Transaction could not be created.");

            return(View(model));
        }