コード例 #1
0
        public ActionResult Create(TaiKhoanModel taiKhoanModel)
        {
            if (ModelState.IsValid)
            {
                var createTaiKhoan = _taiKhoanRepository.InsertTaiKhoan(taiKhoanModel);

                if (createTaiKhoan.CheckStatus())
                {
                    return(RedirectToAction("Index", "User"));
                }
                else
                {
                    ModelState.AddModelError("", "Tạo tài khoản không thành công");
                }
            }
            return(View("Index"));
        }